zeromq3-4.0.4+dfsg.orig/0000755000175000017500000000000012307431401013726 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/autogen.sh0000755000175000017500000000300312240736636015741 0ustar ghedoghedo#!/bin/sh # Copyright (c) 2007-2009 iMatix Corporation # Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file # # This file is part of 0MQ. # # 0MQ is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # 0MQ is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . # Script to generate all required files from fresh git checkout. command -v libtool >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2 exit 1 fi command -v autoreconf >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "autogen.sh: error: could not find autoreconf. autoconf and automake are required to run autogen.sh." 1>&2 exit 1 fi mkdir -p ./config if [ $? -ne 0 ]; then echo "autogen.sh: error: could not create directory: ./config." 1>&2 exit 1 fi autoreconf --install --force --verbose -I config if [ $? -ne 0 ]; then echo "autogen.sh: error: autoreconf exited with status $?" 1>&2 exit 1 fi zeromq3-4.0.4+dfsg.orig/zeromq.spec0000644000175000017500000001047612307431401016127 0ustar ghedoghedoName: zeromq Version: 4.0.4 Release: 1%{?dist} Summary: The ZeroMQ messaging library Group: Applications/Internet License: LGPLv3+ URL: http://www.zeromq.org/ Source: http://download.zeromq.org/%{name}-%{version}.tar.gz Prefix: %{_prefix} Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc, make, gcc-c++, libstdc++-devel Requires: libstdc++ %if 0%{?rhel} %if 0%{?rhel} == 6 BuildRequires: libuuid-devel Requires: libuuid %endif %if 0%{?rhel} == 5 BuildRequires: e2fsprogs-devel Requires: e2fsprogs %endif %else BuildRequires: uuid-devel Requires: uuid %endif # Build pgm only on supported archs %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 BuildRequires: python, perl %endif %description The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains the ZeroMQ shared library. %package devel Summary: Development files and static library for the ZeroMQ library Group: Development/Libraries Requires: %{name} = %{version}-%{release}, pkgconfig %description devel The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains ZeroMQ related development libraries and header files. %prep %setup -q %build %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 %configure --with-pgm --with-pic --with-gnu-ld %else %configure %endif %{__make} %{?_smp_mflags} %install [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} # Install the package to build area %{__make} check %makeinstall %post /sbin/ldconfig %postun /sbin/ldconfig %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) # docs in the main package %doc AUTHORS ChangeLog COPYING COPYING.LESSER NEWS README # libraries %{_libdir}/libzmq.so.3 %{_libdir}/libzmq.so.3.0.0 %{_mandir}/man7/zmq.7.gz %files devel %defattr(-,root,root,-) %{_includedir}/zmq.h %{_includedir}/zmq_utils.h %{_libdir}/libzmq.la %{_libdir}/libzmq.a %{_libdir}/pkgconfig/libzmq.pc %{_libdir}/libzmq.so %{_mandir}/man3/zmq_bind.3.gz %{_mandir}/man3/zmq_close.3.gz %{_mandir}/man3/zmq_connect.3.gz %{_mandir}/man3/zmq_disconnect.3.gz %{_mandir}/man3/zmq_ctx_destroy.3.gz %{_mandir}/man3/zmq_ctx_get.3.gz %{_mandir}/man3/zmq_ctx_new.3.gz %{_mandir}/man3/zmq_ctx_set.3.gz %{_mandir}/man3/zmq_ctx_term.3.gz %{_mandir}/man3/zmq_msg_recv.3.gz %{_mandir}/man3/zmq_errno.3.gz %{_mandir}/man3/zmq_getsockopt.3.gz %{_mandir}/man3/zmq_init.3.gz %{_mandir}/man3/zmq_msg_close.3.gz %{_mandir}/man3/zmq_msg_copy.3.gz %{_mandir}/man3/zmq_msg_data.3.gz %{_mandir}/man3/zmq_msg_init.3.gz %{_mandir}/man3/zmq_msg_init_data.3.gz %{_mandir}/man3/zmq_msg_init_size.3.gz %{_mandir}/man3/zmq_msg_move.3.gz %{_mandir}/man3/zmq_msg_size.3.gz %{_mandir}/man3/zmq_msg_get.3.gz %{_mandir}/man3/zmq_msg_more.3.gz %{_mandir}/man3/zmq_msg_recv.3.gz %{_mandir}/man3/zmq_msg_send.3.gz %{_mandir}/man3/zmq_msg_set.3.gz %{_mandir}/man3/zmq_poll.3.gz %{_mandir}/man3/zmq_proxy.3.gz %{_mandir}/man3/zmq_recv.3.gz %{_mandir}/man3/zmq_recvmsg.3.gz %{_mandir}/man3/zmq_send.3.gz %{_mandir}/man3/zmq_sendmsg.3.gz %{_mandir}/man3/zmq_setsockopt.3.gz %{_mandir}/man3/zmq_socket.3.gz %{_mandir}/man3/zmq_socket_monitor.3.gz %{_mandir}/man3/zmq_strerror.3.gz %{_mandir}/man3/zmq_term.3.gz %{_mandir}/man3/zmq_version.3.gz %{_mandir}/man3/zmq_unbind.3.gz %{_mandir}/man7/zmq_epgm.7.gz %{_mandir}/man7/zmq_inproc.7.gz %{_mandir}/man7/zmq_ipc.7.gz %{_mandir}/man7/zmq_pgm.7.gz %{_mandir}/man7/zmq_tcp.7.gz %changelog * Mon Nov 26 2012 Justin Cook 3.2.2 - Update packaged files * Fri Apr 8 2011 Mikko Koppanen 3.0.0-1 - Update dependencies and packaged files * Sat Apr 10 2010 Mikko Koppanen 2.0.7-1 - Initial packaging zeromq3-4.0.4+dfsg.orig/ChangeLog0000644000175000017500000445741012307431401015517 0ustar ghedoghedo# Generated by Makefile. Do not edit. commit 1ac53ed1f75202bbe36dd0b409736f90984638e5 Merge: 2eb6336 7f08204 Author: Pieter Hintjens Date: Mon Mar 10 22:41:14 2014 +0100 Merge pull request #66 from hintjens/master Source package did not build commit 7f08204e9fa0c98cbf29229167d7a9939f61179c Author: Pieter Hintjens Date: Mon Mar 10 22:39:59 2014 +0100 Source package did not build src/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) commit 2eb63360d60097ca6bca5eeffbc789c72994125c Merge: e5473a7 930ef37 Author: Pieter Hintjens Date: Mon Mar 10 13:41:48 2014 +0100 Merge pull request #64 from hintjens/master Bumped NEWS for 4.0.4 release commit 930ef3773861170fba44ab2f8cb1a47e5a3a315d Author: Pieter Hintjens Date: Mon Mar 10 13:40:49 2014 +0100 Bumped NEWS for 4.0.4 release NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5473a7a6998311ef098ca25077ba1a3755df0dd Merge: ebbbdf8 dd5603d Author: Pieter Hintjens Date: Mon Mar 3 12:10:18 2014 +0100 Merge pull request #63 from hintjens/master Backported fix for #909 commit dd5603d6e95e22e8b9f963680e99e11de6a4de3a Author: Josh Blum Date: Wed Feb 12 11:22:37 2014 -0800 Updated NEWS for #909 NEWS | 2 ++ src/Makefile.am | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit 03dc70c3507e2e430d5c065cd64f60d8635f8837 Author: Pieter Hintjens Date: Thu Feb 13 19:21:42 2014 +0100 Updated for #60 NEWS | 2 ++ 1 file changed, 2 insertions(+) commit 97292367ebeb541ae37c83f432bc4970511b6bf9 Author: Pieter Hintjens Date: Thu Feb 13 09:33:14 2014 +0100 Updated NEWS NEWS | 4 ++++ 1 file changed, 4 insertions(+) commit ebbbdf89cb29e68119d24acc55d89e4e95bbe638 Merge: e655fd1 c7a7de1 Author: Pieter Hintjens Date: Thu Feb 13 19:20:28 2014 +0100 Merge pull request #60 from ricnewton/master Fix hang on terminate when inproc is connected but never bound commit c7a7de12a351b26c39758db5bc0d310ae6598c24 Author: Richard Newton Date: Thu Feb 13 14:56:09 2014 +0000 Backported fix for #888 src/ctx.cpp | 10 +++++++++- tests/test_inproc_connect.cpp | 20 +++++++++++++++++++- tests/testutil.hpp | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) commit e655fd138d948800df80959d71da12738a1c4bc1 Merge: 0e147bb 2493a99 Author: Pieter Hintjens Date: Wed Feb 5 21:11:10 2014 +0100 Merge pull request #57 from Debian/counter Fix timestamp counter on s390/s390x commit 0e147bb69144856b81816d57c570aa867e76a2eb Merge: d4f9886 4b9cd77 Author: Pieter Hintjens Date: Wed Feb 5 21:10:49 2014 +0100 Merge pull request #56 from Debian/symbols Only export zmq_* symbols commit 4b9cd7764ab7ee6b9c82f216f0c8801493f33fa2 Author: Alessandro Ghedini Date: Sun Jan 12 12:30:45 2014 +0100 Only export zmq_* symbols src/Makefile.am | 2 +- src/libzmq.vers | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 2493a9973582cb079a2bda5beeb8b1f3e9332b48 Author: Alessandro Ghedini Date: Sun Jan 12 12:31:31 2014 +0100 Fix timestamp counter on s390/s390x Fixes #811 src/clock.cpp | 1 - 1 file changed, 1 deletion(-) commit d4f988649da12415e431001fb7c0b748d4742714 Merge: 0b11c31 830e022 Author: Pieter Hintjens Date: Mon Feb 3 02:55:18 2014 -0800 Merge pull request #55 from hintjens/master Fixed issue #868 commit 830e0229875791641e449ec1429c7e6a7f3fd163 Author: Pieter Hintjens Date: Mon Feb 3 11:20:58 2014 +0100 Fixed #868 NEWS | 2 ++ src/ip.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit 5a576d22dbc3efa3e50832d61a5d73abc02ece28 Author: Pieter Hintjens Date: Thu Jan 16 07:13:29 2014 +0100 Updated NEWS for #584 NEWS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 89c762fb0ae0f7a62b70be12d07139190bf52d97 Author: Pieter Hintjens Date: Wed Jan 1 13:43:14 2014 +0100 Clarified ZMQ_IDENTITY doc for duplicate identities doc/zmq_setsockopt.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 0b11c3174ef4e096dec07d0b4f62bbbeda93933e Merge: 129cb00 63fe43a Author: Pieter Hintjens Date: Wed Jan 15 22:11:50 2014 -0800 Merge pull request #51 from EricMCornelius/master Corrects ypipe initialization when conflate is NOT enabled. commit 129cb00d8f04391fce7db3ba6732cf4fa0be2844 Author: Pieter Hintjens Date: Wed Jan 15 21:39:21 2014 +0100 Update README.md README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6982e69da4acc720f23bce6c7b8fb005ea4bbabe Author: Pieter Hintjens Date: Wed Jan 15 21:39:00 2014 +0100 Update README.md README.md | 6 ++++++ 1 file changed, 6 insertions(+) commit 63fe43a101ac0e70cb254463a4e76081f175d775 Author: Eric Cornelius Date: Wed Jan 15 12:18:50 2014 -0800 Corrects ypipe initialization when conflate is NOT enabled. Fixes LIBZMQ-584 src/pipe.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3f3f9dcec23d4927586a4bf37afe3ee27efa2169 Merge: a37c198 53bef03 Author: Pieter Hintjens Date: Thu Jan 2 14:45:47 2014 -0800 Merge pull request #47 from vortechs2000/fix_news Adjust NEWS to include LIBZMQ-576 commit 53bef03e7bc8199da915d76394f39dff4f257f04 Author: AJ Lewis Date: Thu Jan 2 16:39:03 2014 -0600 Adjust NEWS to include LIBZMQ-576 NEWS | 2 ++ 1 file changed, 2 insertions(+) commit a37c198c7db547129bb47d02597ee5669183478b Merge: 5db0acb 047bd13 Author: Pieter Hintjens Date: Thu Jan 2 13:12:18 2014 -0800 Merge pull request #46 from vortechs2000/fix-libzmq-576 Fix LIBZMQ-576 - Revert "Merge pull request #510 from miniway/master" commit 047bd130cfd885ce76d4c04914adaa5333f4efe7 Author: AJ Lewis Date: Thu Jan 2 11:04:43 2014 -0600 Fix LIBZMQ-576 - Revert "Merge pull request #510 from miniway/master" This reverts commit f27eb67e1abb0484c41050e454404cce30647b63, reversing changes made to a3ae0d4c16c892a4e6c96d626a7c8b7068450336. Conflicts: src/stream_engine.cpp Conflicts were around additional defaults to the constructor after the 'terminating' default. The additional defaults were left alone, and the 'terminating' default was removed. src/encoder.hpp | 5 ----- src/i_encoder.hpp | 1 - src/stream_engine.cpp | 12 ------------ src/stream_engine.hpp | 1 - 4 files changed, 19 deletions(-) commit 5db0acb044ae8feb04f8ba6ae679d7a6050bd009 Merge: 571c668 845ee0c Author: Pieter Hintjens Date: Mon Dec 23 04:18:04 2013 -0800 Merge pull request #44 from hintjens/master Issue 797 commit 845ee0c7bc4a189f612b7a6577454924bce26d56 Author: Pieter Hintjens Date: Mon Dec 23 13:17:38 2013 +0100 Updated NEWS NEWS | 2 ++ 1 file changed, 2 insertions(+) commit 2ba0d159b598e4e7886c917cfb63b48d77991403 Author: Alex Grönholm Date: Sun Dec 22 02:55:18 2013 +0200 Fixed setting TCP keepalive parameters on Windows src/tcp.cpp | 30 ++++++++++-------------------- src/windows.hpp | 1 + 2 files changed, 11 insertions(+), 20 deletions(-) commit 571c668fa2e0b101f607b4c4a34c30da2f174499 Merge: 97e1ecc 0552d91 Author: Pieter Hintjens Date: Fri Dec 6 14:30:23 2013 -0800 Merge pull request #43 from hintjens/master Backporting fixes from master commit 0552d9119bada6a132a612e8284eb82a58ba26b0 Author: Pieter Hintjens Date: Thu Dec 5 16:52:36 2013 +0100 Updated news for #775 NEWS | 2 ++ 1 file changed, 2 insertions(+) commit 3dc89feafcee31ef5169d827015f1fe2a18da08b Author: KIU Shueng Chuan Date: Thu Dec 5 07:04:21 2013 +0800 use enum retired_fd instead of -1 using -1 causes a warning on Windows platform because SOCKET is unsigned. src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97e1ecce228c1465d619db7c3c5a11a9dd36670c Merge: 8b9a824 d958b67 Author: Pieter Hintjens Date: Sun Dec 1 02:55:48 2013 -0800 Merge pull request #40 from hintjens/master Backported fix for #763 commit d958b675c7918c05b92c3e0cfbd49601142cdefd Author: Pieter Hintjens Date: Sun Dec 1 11:54:55 2013 +0100 Updated NEWS for #763 NEWS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ff8f97e7d770651ef2e50e6f2a36069ae78e7814 Author: Martin Hurton Date: Sat Nov 30 21:24:32 2013 +0100 Fix issue #763 src/stream_engine.cpp | 7 +++++++ 1 file changed, 7 insertions(+) commit 75ba4c7292bc09e7fc58dd206447777391d06100 Author: Pieter Hintjens Date: Sun Nov 24 19:00:18 2013 +0100 Updated version number for release 4.0.4 include/zmq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b9a82476b196a200b9698c9345ae8ba50cccb1c Merge: 78b741b 4363b75 Author: Pieter Hintjens Date: Sun Nov 24 09:58:59 2013 -0800 Merge pull request #37 from hintjens/master Fixed test_many_sockets commit 4363b75b4d9aec70b297e96d4b933110ce161a62 Author: Pieter Hintjens Date: Sun Nov 24 18:56:50 2013 +0100 Release notes for 4.0.3 NEWS | 10 ++++++++++ include/zmq.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) commit c022c048dcbe15a2757ab90d2d03d89f615744a8 Author: Pieter Hintjens Date: Tue Nov 19 16:51:06 2013 +0100 Fixed test_many_sockets * failed on systems where process could not allocate 1024 sockets by default * include path for platform.hpp was wrong; fixed it tests/test_many_sockets.cpp | 73 ++++++++++++++++++------------------------- tests/testutil.hpp | 2 +- 2 files changed, 32 insertions(+), 43 deletions(-) commit 78b741bd71995c7b73a2cbe449f2c6028610f7e4 Merge: d743dda ba7c065 Author: Pieter Hintjens Date: Sun Nov 24 03:47:58 2013 -0800 Merge pull request #36 from hintjens/master Updated version number for 4.0.2 commit ba7c065c3dd13453c79d7a07efa1c6c3e56bdf18 Author: Pieter Hintjens Date: Sun Nov 24 12:45:47 2013 +0100 Updated version number for 4.0.2 - also moved macros to top of zmq.h for better visibility include/zmq.h | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit d743ddafda6dd45f178cd6c8bd98c32b1aa4c49b Merge: e193915 84c0caf Author: Pieter Hintjens Date: Sun Nov 24 03:42:01 2013 -0800 Merge pull request #35 from hintjens/master Updated NEWS for release 4.0.2 commit 84c0caf42eae2e1871d880bfd6722a5011c8e531 Author: Pieter Hintjens Date: Sun Nov 24 12:41:16 2013 +0100 Updated NEWS for release 4.0.2 NEWS | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e1939155ff4aab3c7d543e0ef089349a10814895 Merge: 30309d6 9ece2d3 Author: Pieter Hintjens Date: Tue Nov 19 02:01:23 2013 -0800 Merge pull request #34 from hintjens/master Backporting fixes from master commit 9ece2d322a6189d02f1a57bf499dda8510665d16 Author: Pieter Hintjens Date: Wed Nov 13 13:57:53 2013 +0100 Added links to RFCs for socket patterns doc/zmq_socket.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 589bf436dd08066b7a7fdd608c31c41b9a15b936 Author: KIU Shueng Chuan Date: Tue Nov 12 01:12:24 2013 +0800 remove all asserts during critical section the size of the critical section is reduced by only entering the critical section right before the bind(). src/signaler.cpp | 76 ++++++++++++++++++++++-------------------------------- 1 file changed, 31 insertions(+), 45 deletions(-) commit e54e55835e6caa07a5805e1b7d1e7e6e5e098b74 Author: KIU Shueng Chuan Date: Tue Nov 12 00:07:06 2013 +0800 return error to caller on bind error src/signaler.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 111c20dc22709e58ff2c5718c04210eee1a359e5 Author: Richard Newton Date: Mon Nov 11 13:54:58 2013 +0000 Fix signed/unsigned comparison tests/test_many_sockets.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a4896f4a36e6df2d2f7b62b1d64ef7d74774a90 Author: Richard Newton Date: Mon Nov 11 13:53:25 2013 +0000 Fix signed/unsigned comparison tests/test_many_sockets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0855c28069bd87f4c50ecb5606641522654f97a1 Author: Richard Newton Date: Mon Nov 11 13:41:42 2013 +0000 Reduce default maximum number of sockets by 1 so there is room for the reaper socket. include/zmq.h | 2 +- tests/test_many_sockets.cpp | 79 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 65 insertions(+), 16 deletions(-) commit 737b6afc97ef959480fb2ae69192eb8965fe99d6 Author: Richard Newton Date: Mon Nov 11 13:09:23 2013 +0000 Revert "Make FD_SETSIZE = ZMQ_MAX_SOCKETS_DFLT + 1 so there is room for the repear socket." This reverts commit 0b92831b2a82c3bbc0e9371662c546b94915a3ea. CMakeLists.txt | 2 +- builds/mingw32/Makefile.mingw32 | 2 +- builds/msvc/libzmq/libzmq.vcproj | 10 +++++----- builds/msvc/properties/ZeroMQ.props | 2 +- builds/msvc/properties/ZeroMQ_Static.props | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit 8f85bafe372d96212764a51737835fef82e035a8 Author: psl-felipefarinon Date: Mon Nov 11 10:20:28 2013 -0200 issue #583 removing C++11 code. src/clock.cpp | 1 - 1 file changed, 1 deletion(-) commit f72dbb35d5e9d864acb1634f96c7efd7f4ead15f Author: Bruno D. Rodrigues Date: Sun Nov 10 10:19:19 2013 +0000 Fix socket creation above sistem limits for all 'other' OS not covered by eventfd, windows or vms; enhanced test to create sockets up to a bigger limit to really test hitting the OS limit src/signaler.cpp | 2 +- tests/test_many_sockets.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 5d6e7a74c1e50559f0ee3cb37dc61e21ea818c67 Author: Pieter Hintjens Date: Sat Nov 9 09:59:21 2013 +0100 Added test case to ignore .gitignore | 1 + 1 file changed, 1 insertion(+) commit 30309d660e4d3ef72d677ad059ed57f0ca80471c Merge: f745e4c e0c8a11 Author: Pieter Hintjens Date: Sat Nov 9 00:56:52 2013 -0800 Merge pull request #32 from hintjens/master Cherry picking changes from libzmq master commit e0c8a112a43cd13bd3e21696b26e0357037d4759 Author: Pieter Hintjens Date: Sat Nov 9 09:56:21 2013 +0100 Cherry picking fixes from master .gitignore | 1 + NEWS | 13 +++++++------ tests/Makefile.am | 1 - 3 files changed, 8 insertions(+), 7 deletions(-) commit f6293d257d9f649ef82ce40850d1b18cca9a89dd Author: Martin Hurton Date: Wed Oct 9 10:51:30 2013 +0200 Signal that the peer performed orderly shutdown src/stream_engine.cpp | 77 +++++++++++++++++++++++-------------------------- src/stream_engine.hpp | 7 ++--- 2 files changed, 39 insertions(+), 45 deletions(-) commit f33bdcf02e4781943a5c000af707a0d011d59b8f Author: Richard Newton Date: Thu Nov 7 17:50:29 2013 +0000 Fix formatting. src/ctx.cpp | 8 ++++---- src/devpoll.cpp | 2 +- src/devpoll.hpp | 2 +- src/epoll.cpp | 2 +- src/epoll.hpp | 2 +- src/kqueue.cpp | 2 +- src/kqueue.hpp | 2 +- src/poll.cpp | 2 +- src/poll.hpp | 2 +- src/select.cpp | 2 +- src/select.hpp | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) commit fef24a8c1f5c1f806c11e35eb8d93e1fc334bb47 Author: Richard Newton Date: Thu Nov 7 18:26:13 2013 +0000 Make FD_SETSIZE = ZMQ_MAX_SOCKETS_DFLT + 1 so there is room for the repear socket. CMakeLists.txt | 2 +- builds/mingw32/Makefile.mingw32 | 2 +- builds/msvc/libzmq/libzmq.vcproj | 10 +++++----- builds/msvc/properties/ZeroMQ.props | 2 +- builds/msvc/properties/ZeroMQ_Static.props | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit bfc3deb43a271e13c0cb44ed0694fdd80848298d Author: Richard Newton Date: Thu Nov 7 17:46:19 2013 +0000 Get maximum number of sockets it can handle from poller_t src/ctx.cpp | 12 ++++++++++-- src/devpoll.cpp | 5 +++++ src/devpoll.hpp | 2 ++ src/epoll.cpp | 5 +++++ src/epoll.hpp | 2 ++ src/kqueue.cpp | 5 +++++ src/kqueue.hpp | 2 ++ src/poll.cpp | 5 +++++ src/poll.hpp | 2 ++ src/select.cpp | 5 +++++ src/select.hpp | 2 ++ 11 files changed, 45 insertions(+), 2 deletions(-) commit dccf1dce1e12109adc669b68a80398c3b927b804 Author: psl-felipefarinon Date: Thu Nov 7 15:21:42 2013 -0200 Fixing broken build issue #583 src/clock.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 24311dee1b8b53b9280a255e5a05b180f812afdf Author: Richard Newton Date: Thu Nov 7 16:47:55 2013 +0000 Add test case for many sockets Conflicts: CMakeLists.txt tests/Makefile.am CMakeLists.txt | 4 +++- tests/Makefile.am | 5 ++++- tests/test_many_sockets.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) commit 27d20aacc7563ffa376198acb1a509c4fb35f4fb Author: psl-felipefarinon Date: Thu Nov 7 14:06:54 2013 -0200 Fixing issue #583. Using low resolution timer for clock::now_ms src/clock.cpp | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) commit b2698474d2b0036ad27b9056d703e864bd96b706 Author: Pieter Hintjens Date: Thu Nov 7 15:30:25 2013 +0100 Simplified fdpair reset after fork src/signaler.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit 0465e9abe922db5f47e50998c0d495351373b1c1 Author: Pieter Hintjens Date: Thu Nov 7 15:26:56 2013 +0100 Simplified error handling for make_fdpair on Windows src/signaler.cpp | 7 ------- 1 file changed, 7 deletions(-) commit 885c816e5718c406d18cbccbc4093b0e46761821 Author: Pieter Hintjens Date: Thu Nov 7 14:59:53 2013 +0100 Fix for issue 574 src/signaler.cpp | 89 ++++++++++++++++++++++++++------------------------- src/signaler.hpp | 4 +-- src/socket_base.cpp | 82 ++++++++++++++++++++++++----------------------- 3 files changed, 89 insertions(+), 86 deletions(-) commit 7f3d0995cda22fd504bbf106a719a8f8c755ce96 Author: Pieter Hintjens Date: Wed Nov 6 13:30:41 2013 +0100 Removed over-long pauses in tests - used msleep (10) in most places instead of zmq_sleep (1) - may cause failures on slower machines - to change, modify SETTLE_TIME in testutil.h - tested down to 1 msec on fast boxes Conflicts: tests/test_connect_delay_tipc.cpp tests/test_proxy.cpp tests/test_sub_forward_tipc.cpp tests/test_term_endpoint_tipc.cpp tests/testutil.hpp tests/test_conflate.cpp | 7 ++----- tests/test_ctx_destroy.cpp | 2 +- tests/test_immediate.cpp | 3 +-- tests/test_inproc_connect.cpp | 2 +- tests/test_iov.cpp | 2 +- tests/test_monitor.cpp | 6 +++--- tests/test_req_relaxed.cpp | 2 +- tests/test_spec_req.cpp | 2 +- tests/test_sub_forward.cpp | 2 +- tests/test_term_endpoint.cpp | 4 ++-- tests/testutil.hpp | 17 +++++++++++++++++ 11 files changed, 31 insertions(+), 18 deletions(-) commit f745e4ce64d772c40fa7622568f886984f5c7ce2 Merge: 806f57e de239f3 Author: Pieter Hintjens Date: Wed Nov 6 11:26:05 2013 -0800 Merge pull request #31 from hintjens/master Backported fixes for libzmq-39 and other patches. commit de239f358e02c4d42a2c4426ffee893e101c90b2 Author: Richard Newton Date: Wed Nov 6 15:19:04 2013 +0000 Fix race condition on shutdown src/ctx.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 30f470eff56d4b7f778cd83bda0ea689cf752a41 Author: Richard Newton Date: Mon Oct 28 08:34:32 2013 +0000 Fix test warning. tests/test_ctx_options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0b69bba286dcd9689e40674a84cf1ab940a2d81 Author: Richard Newton Date: Mon Oct 28 08:30:31 2013 +0000 Fix test warning. tests/test_router_raw_empty.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60032ef3301316ef00e9bce4f34a9a22d075b83e Author: MinRK Date: Sun Oct 27 22:50:32 2013 -0700 test zmq_msg_close after sending empty message on ROUTER_RAW tests/Makefile.am | 2 ++ tests/test_router_raw_empty.cpp | 65 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit c663f37761c7bebd0061061ede13a4e9aef5b6f4 Author: MinRK Date: Sun Oct 27 22:50:04 2013 -0700 add missing msg->init for ROUTER_RAW with empty message src/router.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 806f57e7f6e93a4c3e333e63fab8cfc003a29368 Merge: 28b7c99 b22c2e4 Author: Pieter Hintjens Date: Mon Nov 4 08:44:38 2013 -0800 Merge pull request #30 from hintjens/master Cherry picking fixes from libzmq commit b22c2e4f8a8c11bfbbe74c43134a481b3a90d104 Author: Pieter Hintjens Date: Mon Nov 4 17:37:15 2013 +0100 Updated NEWS NEWS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 54a3ebcac656d9451e7a3b59f092b1949c9e9ac7 Author: Denis Mingulov Date: Mon Nov 4 15:15:23 2013 +0200 Doc examples with zmq_msg_close usage - parameter is 'zmq_msg_t *' Documentation examples for zmq_msg_get and zmq_msg_more functions have an incorrect call to zmq_msg_close function - with 'zmq_msg_t' as a parameter despite 'zmq_msg_t *' is required, so it is impossible to compile these examples properly. Also for zmq_msg_get example - declaration of zmq_msg_t variable is added (like it is done in other examples). doc/zmq_msg_get.txt | 3 ++- doc/zmq_msg_more.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit aede37e3e5913b6c8abdd286c2991f2784344140 Author: Pieter Hintjens Date: Mon Nov 4 16:04:13 2013 +0100 Fixed issue 578 - corrected type usage src/zmq_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2949f2dbc5c1e73ab50333fb4fae60852bf21c85 Author: Pieter Hintjens Date: Mon Nov 4 15:39:20 2013 +0100 Fixed issue 578 .gitignore | 9 +++++++++ src/zmq_utils.cpp | 11 ++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) commit 28b7c991afe738a88d7f6d0340987898e06b0c7a Merge: c85fbaf 1c70e91 Author: Pieter Hintjens Date: Mon Oct 28 03:58:52 2013 -0700 Merge pull request #28 from hintjens/master Fixed configure error on non-Linux boxes commit 1c70e91c6f0db4418b4ff4eccf935af667ddbfeb Author: Pieter Hintjens Date: Mon Oct 28 11:58:29 2013 +0100 Fixed configure error on non-Linux boxes tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c85fbaf22e5f8ff79039ee2d87dd455484979b75 Merge: cb3c822 b580557 Author: Pieter Hintjens Date: Mon Oct 28 03:49:45 2013 -0700 Merge pull request #27 from hintjens/master Fixed ref to zmq_socket_monitor commit b58055794bda1c25be7b7d9829f96913f1ce2758 Author: Pieter Hintjens Date: Mon Oct 28 11:49:23 2013 +0100 Fixed ref to zmq_socket_monitor NEWS | 2 +- doc/zmq.txt | 6 +++--- tests/Makefile.am | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) commit cb3c82271a7a34ab0ebe0d3353105ba2c14a2d35 Merge: bf97ea8 9bf10a8 Author: Pieter Hintjens Date: Fri Oct 25 01:04:06 2013 -0700 Merge pull request #26 from hintjens/master Backporting fixes from master commit 9bf10a83a17a900640f4658a3ce9b695359a70ce Author: Pieter Hintjens Date: Fri Oct 25 10:03:42 2013 +0200 Updated NEWS NEWS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8efd7affc677cb9d40167137b27d99e9b670affc Author: Pieter Hintjens Date: Wed Oct 23 23:58:39 2013 +0200 test_stream failed when response was broken into frames tests/test_stream.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bf97ea8ed8ecb5b3d13e7a0c7ace631437f7151e Merge: 2b8d86c cd2afeb Author: Pieter Hintjens Date: Wed Oct 23 07:04:20 2013 -0700 Merge pull request #25 from hintjens/master Clarified use of secret/public keys commit cd2afebd0a0f9861f4d90282029822d94aa1c979 Author: Pieter Hintjens Date: Wed Oct 23 16:03:45 2013 +0200 Clarified use of secret/public keys doc/zmq_setsockopt.txt | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 2b8d86c24a092d8622643ea68830daa6477ee227 Merge: 573d7b0 bd411bb Author: Pieter Hintjens Date: Wed Oct 23 03:05:44 2013 -0700 Merge pull request #24 from hintjens/master Fixed man page for CURVE key options commit bd411bbf116d491e08eef9172dee1bc6786196e3 Author: Pieter Hintjens Date: Wed Oct 23 12:04:50 2013 +0200 Fixed man page for CURVE key options doc/zmq_setsockopt.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 573d7b0c0b8abd4a4e616d503f8a2c80a1ecaf40 Merge: 07d7cf6 dcb9312 Author: Pieter Hintjens Date: Sun Oct 13 23:05:54 2013 -0700 Merge pull request #23 from hintjens/master Backporting LIBZMQ-569 fix from master commit dcb9312ba697b3dcb0912344f27d5665ced7d8a2 Author: Pieter Hintjens Date: Mon Oct 14 08:04:57 2013 +0200 Updated NEWS for backport NEWS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 54907946664d6eed2e12e7e9eda7de3f4d9f290f Author: Martin Hurton Date: Fri Jun 21 16:23:38 2013 +0200 Load identity message to decoder at start src/stream_engine.cpp | 7 +++++++ 1 file changed, 7 insertions(+) commit 07d7cf69d03635cb249fc01e082d68669b4f26a6 Merge: 4f2ac39 b24db36 Author: Pieter Hintjens Date: Sun Oct 13 05:47:11 2013 -0700 Merge pull request #22 from hintjens/master Temporary workaround for broken libsodium install commit b24db360570c335b9f420b07574dd0c9873e6136 Author: Pieter Hintjens Date: Sun Oct 13 14:46:08 2013 +0200 Temporary workaround for broken libsodium install .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4f2ac39d2822c5d30554a56db4dbd58b7bb534d5 Merge: 8cdff6f a32c02a Author: Pieter Hintjens Date: Fri Oct 11 03:12:27 2013 -0700 Merge pull request #21 from hintjens/master Backporting fixes from master commit a32c02ae47484a6b60fb7895fb0b9ee39573fc10 Author: Pieter Hintjens Date: Wed Oct 9 19:52:46 2013 +0200 Identity can only be set on sockets that can connect to ROUTER doc/zmq_getsockopt.txt | 6 +++--- doc/zmq_setsockopt.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 622e3b54760a78d6f7d14cc5b1ceba99f3e690ad Author: Martin Hurton Date: Thu Sep 26 09:37:04 2013 +0200 Rename engine's methods to improve code readability src/i_engine.hpp | 4 ++-- src/pgm_receiver.cpp | 4 ++-- src/pgm_receiver.hpp | 4 ++-- src/pgm_sender.cpp | 4 ++-- src/pgm_sender.hpp | 4 ++-- src/session_base.cpp | 4 ++-- src/stream_engine.cpp | 34 +++++++++++++++++----------------- src/stream_engine.hpp | 8 ++++---- 8 files changed, 33 insertions(+), 33 deletions(-) commit 6c036b39ae7de197473c43c5f8de79657b0e8ae6 Author: xantares Date: Thu Oct 10 22:08:54 2013 +0200 Fixed out-of-source build tools/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cdff6fa2e06763bb430a04f4159135e558ca001 Author: Pieter Hintjens Date: Tue Oct 8 17:54:41 2013 +0200 Fixed NEWS NEWS | 3 --- 1 file changed, 3 deletions(-) commit f8cebb460a94ddee613fd7f4ed23300f9cc790ba Author: Pieter Hintjens Date: Tue Oct 8 15:02:58 2013 +0200 Revert "replace macro constants with enum types for user facing constants" This reverts commit 4fb74539250d83e82e40e85d39e2e756eccdb8a3. include/zmq.h | 222 ++++++++++++++++++++++++++------------------------------- 1 file changed, 101 insertions(+), 121 deletions(-) commit d62e7a0734b7a69e199bfa22209275ab5da7a639 Author: Pieter Hintjens Date: Tue Oct 8 15:02:47 2013 +0200 Revert "distinguish between options and defaults" This reverts commit e7db680f5b709ce821f79b1e8956f4cbd1931c11. include/zmq.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit a44bd65d03f1d6a79bf818584c0ae37ef46478d4 Author: Pieter Hintjens Date: Tue Oct 8 10:46:47 2013 +0200 Fixed NEWS for 4.0.1 release NEWS | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 437e4070a37367a4d6c272b4c39ea9b92c31c2b3 Merge: c852620 0bfcd4d Author: Pieter Hintjens Date: Tue Oct 8 01:36:58 2013 -0700 Merge pull request #19 from hintjens/master Updated NEWS for 4.0.1 commit 0bfcd4da2f50c215836c878d00175e73e6fa4d46 Author: Pieter Hintjens Date: Tue Oct 8 10:33:50 2013 +0200 Updated NEWS for 4.0.1 NEWS | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) commit c852620f5f33d50698817be0b66f85fbc7ac59a3 Merge: 163aebb ca122e9 Author: Pieter Hintjens Date: Tue Oct 8 00:20:40 2013 -0700 Merge pull request #18 from hintjens/master Cherry picking changes from libzmq master commit ca122e9d01f44194bb2a107ed1f8275a0b17c319 Author: Volodymyr Korniichuk <9173519@gmail.com> Date: Tue Oct 8 00:40:30 2013 +0300 Typo in type name "emTPy_slots_t" https://zeromq.jira.com/browse/LIBZMQ-565 src/ctx.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e7db680f5b709ce821f79b1e8956f4cbd1931c11 Author: Dylan Cali Date: Fri Oct 4 02:19:07 2013 -0500 distinguish between options and defaults include/zmq.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4fb74539250d83e82e40e85d39e2e756eccdb8a3 Author: Dylan Cali Date: Fri Oct 4 01:45:42 2013 -0500 replace macro constants with enum types for user facing constants include/zmq.h | 222 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 121 insertions(+), 101 deletions(-) commit 813166019e1c6955776ff3fab1918b1b4b4c5445 Author: Brandon Carpenter Date: Mon Oct 7 10:55:40 2013 -0700 Add tests/test_abstract_ipc to .gitignore. .gitignore | 1 + 1 file changed, 1 insertion(+) commit 127cd7585a992a2f9a2a30c172f624fd2dc1196e Author: Brandon Carpenter Date: Mon Oct 7 10:42:39 2013 -0700 Fix detection of abstract ipc pathname and length calculation. Abstract socket pathnames must have a NULL character in the first position, but the second character must also be checked to differentiate an abstract name from the empty string. The address length must also indicate the length of the pathname because the kernel uses the entire address as the name, including NULL characters. ZMQ uses NULL-terminated strings for the address, so the abstract address length is the length of the string following the initial NULL byte plus 3; two bytes for the address family and one for the initial NULL character. src/ipc_address.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 0666152b216fe20e54c082461924e034af2efd11 Author: Brandon Carpenter Date: Mon Oct 7 10:41:20 2013 -0700 Add note on Linux abstract namespace to ipc documentation. doc/zmq_ipc.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 9293153f71e7fa9c34eecb3951fc08f71c9630bb Author: Volodymyr Korniichuk Date: Fri Oct 4 21:54:52 2013 +0300 useless checks were removed src/ctx.cpp | 6 ++---- src/mtrie.cpp | 3 +-- src/session_base.cpp | 3 +-- src/stream_engine.cpp | 9 +++------ src/trie.cpp | 3 +-- src/yqueue.hpp | 6 ++---- 6 files changed, 10 insertions(+), 20 deletions(-) commit 163aebbacfc904bf5b29454a641ddb7a597b3552 Merge: b20573c 80d657a Author: Pieter Hintjens Date: Sat Oct 5 00:20:49 2013 -0700 Merge pull request #17 from hintjens/master Cherry picking changes from libzmq master commit 80d657a2c529a1d847eab4cf6285c2279aae208c Author: Brandon Carpenter Date: Thu Oct 3 16:35:30 2013 -0700 Add test for abstract namespace support in ipc sockets on Linux. See issue 567. configure.ac | 3 +++ tests/Makefile.am | 8 +++++- tests/test_abstract_ipc.cpp | 57 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) commit 668f000cb148ee9e06b90d3b0b9504a16a3e7c52 Author: Brandon Carpenter Date: Thu Oct 3 16:21:42 2013 -0700 Add abstract namespace support for IPC sockets on Linux. Converts an initial strudel or "at sign" (@) in the Unix socket path to a NULL character ('\0') indicating that the socket uses the abstract namespace instead of the filesystem namespace. For instance, binding a socket to 'ipc://@/tmp/tester' will not create a file associated with the socket whereas binding to 'ipc:///tmp/tester' will create the file /tmp/tester. See issue 567 for more information. AUTHORS | 1 + src/ipc_address.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit a570b18931b52ac1d4b26eef88fe7dc630a4d192 Author: KIU Shueng Chuan Date: Sat Oct 5 00:51:47 2013 +0800 WinSock2.h filename should be all lowercase tests/test_system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5493d4d180924f67c755e2c44d615910b25402ce Author: KIU Shueng Chuan Date: Sat Oct 5 00:48:52 2013 +0800 test for _MSC_VER before using MSVC specific code tests/testutil.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b20573c8412f822cde267d93cccb981815251501 Merge: 34471cd 814b93e Author: Pieter Hintjens Date: Fri Oct 4 00:19:57 2013 -0700 Merge pull request #16 from hintjens/master Cherry picking changes from libzmq master commit 814b93e0cff2e2437c6b33b2bcb007ad79ad42ee Author: Martin Hurton Date: Fri Oct 4 08:20:55 2013 +0200 Stop curve handshake when cookie box verification fails src/curve_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d723b08c134e5f07897c48aaa99fc0b7b2afff02 Author: Pieter Hintjens Date: Tue Sep 24 15:31:10 2013 +0200 Updated libzmq CURVE to track RFC 27 * The INITIATE command vouch box is Box[C',S](C->S') instead of Box[C'](C->S), as recommended by https://codesinchaos.wordpress.com/2012/09/09/curvecp-1/, to reduce the risk of client impersonation. * Mirrors the change in libcurve and CurveZMQ specifications. src/curve_client.cpp | 25 ++++++++++++++----------- src/curve_server.cpp | 26 ++++++++++++-------------- 2 files changed, 26 insertions(+), 25 deletions(-) commit 62fd6fa8614f86a25ab9f4b2a3fab548c7eb6eaa Author: Matt Connolly Date: Tue Sep 24 08:07:10 2013 +1000 git ignore test run output files: tests/test*.{log|trs} .gitignore | 2 ++ 1 file changed, 2 insertions(+) commit a78ccf293fbef3d18e05e904a78d54bb7b2d7e0c Author: Pieter Hintjens Date: Wed Oct 2 12:15:31 2013 +0200 Disabled randomly failing part of test tests/test_spec_rep.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d82ba6bd534e20fbad35bae1e8504624967e02fb Author: Pieter Hintjens Date: Wed Oct 2 12:05:14 2013 +0200 Clarified that zmq.h constants are part of the public contract include/zmq.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9da52ddf59127858e89f5c6ca7e54dcd1c769f1e Author: Dylan Cali Date: Wed Oct 2 02:59:44 2013 -0500 fix minor typo in zmq_ctx_get doc example doc/zmq_ctx_get.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a69fa9ecde029db8052cc2df94e4f7ae1eca26ba Author: Pieter Hintjens Date: Mon Sep 30 15:14:02 2013 +0200 Packaging for zmq_curve_keypair function * Added new man page for this * Added test case, in tests/test_security_curve.cpp * Noted in zmq_utils.h that these methods are documented doc/Makefile.am | 2 +- doc/zmq.txt | 9 +++++++ doc/zmq_curve_keypair.txt | 56 +++++++++++++++++++++++++++++++++++++++++ doc/zmq_z85_decode.txt | 2 +- doc/zmq_z85_encode.txt | 1 + include/zmq_utils.h | 24 ++++++++++-------- tests/test_security_curve.cpp | 24 ++++++++++++------ 7 files changed, 98 insertions(+), 20 deletions(-) commit facb96ffca8a6ef505348ba449dd447ba2dcb52e Author: MinRK Date: Sun Sep 29 13:05:27 2013 -0700 use zmq_curve_keypair in curve_keygen tools/curve_keygen.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) commit 3c469d04c1e4879610fae795046c7373abdabd2a Author: MinRK Date: Sun Sep 29 13:07:51 2013 -0700 return NULL and set EINVAL on bad z85 input asserts aren't appropriate for checking user input. src/zmq_utils.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 870233522c4be1202ba2ed333f32d1c2738698d4 Author: MinRK Date: Sun Sep 29 13:02:39 2013 -0700 add zmq_curve_keypair to zmq_utils include/zmq_utils.h | 4 ++++ src/zmq_utils.cpp | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) commit 34471cd59110d5adb9d428a93db3df45ae9a4ec8 Merge: 17d12a6 453ceb6 Author: Pieter Hintjens Date: Sun Sep 29 08:04:10 2013 -0700 Merge pull request #12 from hintjens/master Backporting fixes from master commit 453ceb65b4a5e47fd8afe01035fda6b71512addb Author: Pieter Hintjens Date: Sun Sep 29 17:03:44 2013 +0200 Fixed merge conflict error configure.ac | 1 - 1 file changed, 1 deletion(-) commit 4d82544c34990423a2195385b6a7d0cdb2c0abc0 Author: Matt Connolly Date: Sun Sep 29 21:19:50 2013 +1000 config for libsodium in alternate path, using CPP flags for both C and C++ sources. configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd6bca7c8209a5503eee1e2dba07c4674058e66a Author: MinRK Date: Sat Sep 28 15:42:52 2013 -0700 include missing platform.hpp in curve_keygen it was excluded, so HAVE_SODIUM would never be defined, leading to curve_keygen always reporting "recompile with libsodium" tools/curve_keygen.c | 1 + 1 file changed, 1 insertion(+) commit 087ddac593570b8efb115d592318bafe7b6748e3 Author: MinRK Date: Sat Sep 28 15:42:00 2013 -0700 declare z85_encode / decode in zmq_utils they are used by curve_keygen, but not available include/zmq_utils.h | 6 ++++++ 1 file changed, 6 insertions(+) commit d1b686b644f834b319378d65935a23a59c997b5c Author: Matt Connolly Date: Fri Sep 27 11:20:09 2013 +0000 Disable compiler warning for Solaris configure.ac | 1 + 1 file changed, 1 insertion(+) commit 4dc36c0dba23c93703450ad73ecbd0587d772e31 Author: Matt Connolly Date: Fri Sep 27 11:12:16 2013 +0000 Add '-lssp' linker flag for Solaris. Check for libraries after host specific setup. configure.ac | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) commit 17d12a6be192210f0c67b50eda024a1b65a81d69 Merge: cd452d5 89b97cb Author: Pieter Hintjens Date: Thu Sep 26 05:48:49 2013 -0700 Merge pull request #9 from hintjens/master Cherry picking changes from libzmq master commit 89b97cbe5955d3fd34734656f9a589968d90189c Author: Pieter Hintjens Date: Thu Sep 26 14:32:47 2013 +0200 Updated CMake project for test_issue_566 CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b0059211d53f9d7919fe461c681cee0f0c9ecdbe Author: Pieter Hintjens Date: Thu Sep 26 14:18:40 2013 +0200 Added test case for issue 566 * Tests dealer-to-router connection 100 times * This was failing in ZMQ v4.0.0 RC1 .gitignore | 1 + src/stream_engine.cpp | 2 +- tests/Makefile.am | 4 ++- tests/test_issue_566.cpp | 85 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+), 2 deletions(-) commit cd452d501967d6d753ed132305252970d9608436 Merge: 9cbcc49 dd185e1 Author: Pieter Hintjens Date: Thu Sep 26 03:32:10 2013 -0700 Merge pull request #8 from hintjens/master Backporting fixes from master commit dd185e13bf0e502e38412cc712717ce2bc771302 Author: Pieter Hintjens Date: Thu Sep 26 12:31:43 2013 +0200 Bumped version for 4.0.1 NEWS | 13 +++++++++++++ include/zmq.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) commit 517601de10450635fd9d6cef5f7a8d9ef88a6a56 Author: Pieter Hintjens Date: Thu Sep 26 11:35:52 2013 +0200 curve_keygen needed assert.h tools/curve_keygen.c | 1 + 1 file changed, 1 insertion(+) commit 5e25b32c3679752b40c7a7aa0d25c83150b688d1 Author: Pieter Hintjens Date: Thu Sep 26 11:33:44 2013 +0200 Build/test errors on OS/X with clang++ src/options.cpp | 2 +- tests/test_stream.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit a5152245bdd39caa747ae7f38374faa945cb51ed Author: Martin Hurton Date: Thu Sep 26 09:38:09 2013 +0200 Call flush after writing the identity message src/stream_engine.cpp | 1 + 1 file changed, 1 insertion(+) commit 9cbcc49a4acee8d84890f70698b8233debefb1cf Merge: 2d5bad9 8a931a7 Author: Pieter Hintjens Date: Tue Sep 24 03:32:02 2013 -0700 Merge pull request #6 from ipechorin/master stdint.h is not available on all platforms commit 2d5bad96e3c4b1bc5dd9cd822afca5b4e6f01ce5 Merge: b04df2c c99b727 Author: Pieter Hintjens Date: Tue Sep 24 03:31:08 2013 -0700 Merge pull request #7 from hintjens/master Fixed build for MSVC 2008 commit c99b727f6dbbc8fdfa70d1ca2a5ca538601805a1 Author: Pieter Hintjens Date: Tue Sep 24 12:29:29 2013 +0200 Fixed build for MSVC 2008 include/zmq_utils.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 8a931a7554931d9a387edaa07fd76b5d41257b1e Author: Ivan Pechorin Date: Tue Sep 24 14:00:08 2013 +0400 stdint.h is not available on all platforms include/zmq.h | 3 +++ include/zmq_utils.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) commit b04df2c5309f049202c4f7da78258e3f4fb5432a Merge: ad1bae2 4df7cb0 Author: Pieter Hintjens Date: Tue Sep 24 00:12:03 2013 -0700 Merge pull request #4 from hintjens/master Updated library ABI version commit 4df7cb043e3649550de7fadbc53635056fb2f4ed Author: Pieter Hintjens Date: Tue Sep 24 09:11:17 2013 +0200 Bumped library version and age configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 201454e8660477fd683aa29d9dadc379c60f5c5a Author: Pieter Hintjens Date: Fri Sep 20 23:17:01 2013 +0200 Move away from port 8080 which is occupied on some boxes tests/test_stream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad1bae21608710e3f85253f9ad7fb4ecf1431fc8 Merge: 61d8bf9 77f394a Author: Richard Newton Date: Fri Sep 20 12:48:29 2013 -0700 Merge pull request #3 from vortechs2000/fix_aix Revert "Reference platform.h by ../src/platform.h - AIX is ignoring -I flags" commit 77f394a6813fcf238eb44c9c320116f9921fd1f7 Author: AJ Lewis Date: Fri Sep 20 14:39:01 2013 -0500 Revert "Reference platform.h by ../src/platform.h - AIX is ignoring -I flags" This reverts commit 1e8e4d79c885b27831e2196d94987cc2817e0f04. perf/inproc_lat.cpp | 3 +-- perf/inproc_thr.cpp | 3 +-- tests/testutil.hpp | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) commit 61d8bf9b11e11cfd49302d850dacb5feda33b4aa Merge: c0c8ce5 1e8e4d7 Author: Pieter Hintjens Date: Fri Sep 20 09:54:03 2013 -0700 Merge pull request #2 from vortechs2000/fix_aix Reference platform.h by ../src/platform.h - AIX is ignoring -I flags commit 1e8e4d79c885b27831e2196d94987cc2817e0f04 Author: AJ Lewis Date: Fri Sep 20 11:43:53 2013 -0500 Reference platform.h by ../src/platform.h - AIX is ignoring -I flags perf/inproc_lat.cpp | 3 ++- perf/inproc_thr.cpp | 3 ++- tests/testutil.hpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit c0c8ce550888272b155400457661e8315546822f Author: Pieter Hintjens Date: Fri Sep 20 16:41:08 2013 +0200 File was missing from Makefile.am src/Makefile.am | 1 + 1 file changed, 1 insertion(+) commit 66b1bc6d7f3e04df298270c10f16bf07cc7ef326 Author: Pieter Hintjens Date: Fri Sep 20 16:15:53 2013 +0200 Added link to security tutorial NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5ecc826d963d72affb8cf79c6fd279662fd4b7a Merge: 8f0a757 a31fe95 Author: Pieter Hintjens Date: Fri Sep 20 07:06:48 2013 -0700 Merge pull request #1 from hintjens/master Preparation for 4.0.0 release commit a31fe9565aa26d73aa4d8bbb0091552056cb5751 Author: Pieter Hintjens Date: Fri Sep 20 16:03:14 2013 +0200 Source distribution was broken src/Makefile.am | 1 - tools/Makefile.am | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 2f4905500d862bb9f0f3871c367d67fb020384b0 Author: Pieter Hintjens Date: Fri Sep 20 16:02:55 2013 +0200 Version number is 4.0.0 include/zmq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c10a3ec526a0cc226ad64b74fed6c1b3b04b8daa Author: Pieter Hintjens Date: Fri Sep 20 15:53:27 2013 +0200 Updated NEWS for 4.0.0 NEWS | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 109 insertions(+), 2 deletions(-) commit e0676a2b26c5b215d07061c8b6606b12a9e0c961 Author: Pieter Hintjens Date: Fri Sep 20 15:30:04 2013 +0200 Renamed new socket options to be clearer * ZMQ_REQ_STRICT was negative option (default 1) which goes against the standard, where defaults are zero. I renamed this to ZMQ_REQ_RELAXED. * ZMQ_REQ_REQUEST_IDS felt clumsy and describes the technical solution rather than the problem/requirement. I changed to ZMQ_REQ_CORRELATE which seems more explicit. .gitignore | 4 +- CMakeLists.txt | 4 +- doc/zmq_getsockopt.txt | 4 +- doc/zmq_setsockopt.txt | 26 +++--- include/zmq.h | 4 +- src/req.cpp | 6 +- tests/Makefile.am | 8 +- tests/test_req_correlate.cpp | 177 ++++++++++++++++++++++++++++++++++++++++ tests/test_req_relaxed.cpp | 116 ++++++++++++++++++++++++++ tests/test_req_request_ids.cpp | 177 ---------------------------------------- tests/test_req_strict.cpp | 117 -------------------------- 11 files changed, 321 insertions(+), 322 deletions(-) commit b411a3561d2f9f2de29bf42820ca4d408b602107 Author: Pieter Hintjens Date: Fri Sep 20 14:39:35 2013 +0200 Removed inaccurate note in zmq_poll man page doc/zmq_poll.txt | 4 ---- 1 file changed, 4 deletions(-) commit 4ce9b4240596f3146a15c97d11f5a3068a805883 Author: Pieter Hintjens Date: Fri Sep 20 14:28:06 2013 +0200 Built zmq_send_const man page properly doc/Makefile.am | 2 +- doc/zmq.txt | 1 + doc/zmq_send_const.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit fef4fa8fc54eb267575e534bff35cd0009485d26 Author: Pieter Hintjens Date: Fri Sep 20 14:23:43 2013 +0200 Renamed test_connect_delay to test_immediate * The ZMQ_CONNECT_DELAY option was renamed to ZMQ_IMMEDIATE .gitignore | 2 +- CMakeLists.txt | 2 +- tests/Makefile.am | 4 +- tests/test_connect_delay.cpp | 229 ------------------------------------------ tests/test_immediate.cpp | 229 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 233 insertions(+), 233 deletions(-) commit 4298f71cbf94cf391a9b6f6e6bc9971843f06bd6 Author: Pieter Hintjens Date: Fri Sep 20 13:28:25 2013 +0200 Updated NEWS for 3.2.x releases NEWS | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit 8f0a757f08f66688ccffdc43ca01b9d07464f032 Merge: 90867a4 78cabfe Author: Pieter Hintjens Date: Thu Sep 19 06:09:13 2013 -0700 Merge pull request #671 from ricnewton/master Testing github jenkins integration commit 78cabfe8eabd252cd7a75a6a2b8af8ef1552dd51 Author: Richard Newton Date: Thu Sep 19 12:58:58 2013 +0100 More testing github jenkins integration AUTHORS | 1 - 1 file changed, 1 deletion(-) commit d503e19381e96d7cf0a07d78b33cdb55c880cac4 Merge: 544575d 90867a4 Author: Richard Newton Date: Thu Sep 19 12:37:54 2013 +0100 Merge branch 'master' of https://github.com/zeromq/libzmq commit 544575d18ca4c81827c0becb8fa27c03e78f64bf Author: Richard Newton Date: Thu Sep 19 12:28:21 2013 +0100 Revert "More testing github jenkins integratio" This reverts commit 0640d6d2baa014ad93ba57ad2f692af8f9081eb0. AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 0640d6d2baa014ad93ba57ad2f692af8f9081eb0 Author: Richard Newton Date: Thu Sep 19 12:11:50 2013 +0100 More testing github jenkins integratio AUTHORS | 1 - 1 file changed, 1 deletion(-) commit 575ff39bfe6b9c51b159e1e10d7881c017ef7d62 Author: Richard Newton Date: Thu Sep 19 12:02:17 2013 +0100 Testing github jenkins integration AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 90867a4e8f23c9a360c7b276b93521b1a61b7866 Merge: 39de9be 7a747b5 Author: Pieter Hintjens Date: Thu Sep 19 02:42:31 2013 -0700 Merge pull request #670 from ricnewton/master Fix cmake build commit 7a747b5797e4976012cfe1f96f44e224b5f643f0 Author: Richard Newton Date: Thu Sep 19 09:46:26 2013 +0100 Fix cmake build CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39de9bebcb53ad08f745c29befe8e13c88c0cf57 Merge: de91c73 e055560 Author: Richard Newton Date: Thu Sep 19 00:43:49 2013 -0700 Merge pull request #669 from hintjens/master Renamed inproc connect test (name was too long) commit e05556075f446c1b5004e6854a157648fe077f8b Author: Pieter Hintjens Date: Thu Sep 19 09:36:43 2013 +0200 Renamed inproc connect test (name was too long) .gitignore | 3 +- tests/Makefile.am | 4 +- tests/test_inproc_connect.cpp | 339 +++++++++++++++++++++++++++++ tests/test_inproc_connect_before_bind.cpp | 339 ----------------------------- 4 files changed, 342 insertions(+), 343 deletions(-) commit de91c7362cd6ca64a1a964b126658768c45e2814 Merge: 94c98ab b132305 Author: Richard Newton Date: Wed Sep 18 04:09:51 2013 -0700 Merge pull request #668 from mrothe/no-public-tests tests: don't listen on public ports commit 94c98abba3cfcdbd1127840e7ba5a06d63d467af Merge: dc79171 825052f Author: Richard Newton Date: Wed Sep 18 04:07:35 2013 -0700 Merge pull request #667 from hintjens/master Reverted pull request 666 commit b13230510ceced26f2dd6ee4707d9403f645da15 Author: Markus Rothe Date: Wed Sep 18 12:58:19 2013 +0200 tests: don't listen on public ports tests/test_connect_delay.cpp | 8 ++++---- tests/test_disconnect_inproc.cpp | 2 +- tests/test_probe_router.cpp | 2 +- tests/test_req_request_ids.cpp | 2 +- tests/test_req_strict.cpp | 2 +- tests/test_security_curve.cpp | 2 +- tests/test_security_null.cpp | 12 ++++++------ tests/test_security_plain.cpp | 2 +- tests/test_spec_dealer.cpp | 2 +- tests/test_spec_pushpull.cpp | 2 +- tests/test_spec_rep.cpp | 2 +- tests/test_spec_req.cpp | 2 +- tests/test_spec_router.cpp | 2 +- tests/test_stream.cpp | 4 ++-- 14 files changed, 23 insertions(+), 23 deletions(-) commit 825052f83fd32179d0c52478ae4eb9266e2c4a6b Author: Pieter Hintjens Date: Tue Sep 17 14:05:55 2013 +0200 Revert "makes curve keys symetric as in libcurve + factorisation" This reverts commit bfd472f97cad5e37fa384b687a906f515600bac4. include/zmq.h | 21 +++----- src/curve_client.cpp | 54 +++++++++---------- src/curve_client.hpp | 30 +++++------ src/curve_server.cpp | 54 +++++++++---------- src/curve_server.hpp | 20 +++---- src/options.cpp | 120 ++++++++++++++++++++++++----------------- src/options.hpp | 10 ++-- tests/test_security_curve.cpp | 37 ++++++------- 8 files changed, 178 insertions(+), 168 deletions(-) commit 22eb4d600b237cee894c7f32c6cdc8d5594fb9e3 Author: Pieter Hintjens Date: Tue Sep 17 14:05:41 2013 +0200 Revert "oblige the application to explicitely set the node type for PLAIN" This reverts commit 1206f4572b4b3bb405a14cc60605b75d53b819a0. include/zmq.h | 4 ++-- src/options.cpp | 16 +++++++++------- tests/test_security_curve.cpp | 4 ++-- tests/test_security_plain.cpp | 9 +++------ 4 files changed, 16 insertions(+), 17 deletions(-) commit 9e66685c0874210cbd74eb4a4c1283f249863973 Author: Pieter Hintjens Date: Tue Sep 17 13:33:24 2013 +0200 Reformatted text doc/zmq_setsockopt.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit dc79171fc37597613c827f5ab00aa71fee3d2ac9 Merge: ad0b325 1206f45 Author: Pieter Hintjens Date: Tue Sep 17 04:32:45 2013 -0700 Merge pull request #666 from lalebarde/master curve key names as in libcurve, symetry design, a few logic improvements commit 1206f4572b4b3bb405a14cc60605b75d53b819a0 Author: Laurent Alebarde Date: Tue Sep 17 12:47:21 2013 +0200 oblige the application to explicitely set the node type for PLAIN include/zmq.h | 4 ++-- src/options.cpp | 16 +++++++--------- tests/test_security_curve.cpp | 4 ++-- tests/test_security_plain.cpp | 9 ++++++--- 4 files changed, 17 insertions(+), 16 deletions(-) commit bfd472f97cad5e37fa384b687a906f515600bac4 Author: Laurent Alebarde Date: Tue Sep 17 12:44:14 2013 +0200 makes curve keys symetric as in libcurve + factorisation include/zmq.h | 21 +++++--- src/curve_client.cpp | 54 +++++++++---------- src/curve_client.hpp | 30 +++++------ src/curve_server.cpp | 54 +++++++++---------- src/curve_server.hpp | 20 +++---- src/options.cpp | 120 +++++++++++++++++------------------------ src/options.hpp | 10 ++-- tests/test_security_curve.cpp | 37 +++++++------ 8 files changed, 168 insertions(+), 178 deletions(-) commit ad0b325e4a0f172438700d933b8bcaee7caf4d73 Merge: 67013f1 7bb2b6a Author: Martin Hurton Date: Tue Sep 17 01:53:59 2013 -0700 Merge pull request #665 from hintjens/master Added test case for NULL domains commit 7bb2b6ae11cafd241a6007bb2d564d4765ff8cf9 Author: Pieter Hintjens Date: Tue Sep 17 10:04:57 2013 +0200 Fixed length of domain setting tests/test_security_null.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7735ca5f8dcc98f71e24ca15c980fd6e2715c036 Author: Pieter Hintjens Date: Tue Sep 17 09:48:32 2013 +0200 Added test case for NULL domains tests/test_security_null.cpp | 90 +++++++++++++++++++++++++++++++----------- 1 file changed, 67 insertions(+), 23 deletions(-) commit 67013f19f6fd37c1abe9cc89102e7bb38628ebea Merge: 971b275 321a8ff Author: Ian Barber Date: Mon Sep 16 06:20:21 2013 -0700 Merge pull request #664 from hintjens/master NULL mechanism was not dealing with ZAP denials properly commit 321a8ffea91583535a7cddf7b970cff7f9414b4c Author: Pieter Hintjens Date: Mon Sep 16 15:09:55 2013 +0200 NULL mechanism was not dealing with ZAP denials properly src/null_mechanism.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit 971b275f7acc3573575f5375453dd2a93e2605fd Merge: 276cd1f fe9815a Author: Ian Barber Date: Mon Sep 16 02:04:44 2013 -0700 Merge pull request #663 from hintjens/master Fixed random failures in test_security_plain and _curve commit fe9815a7892404deef3989d9ff35a9e78935bc83 Author: Pieter Hintjens Date: Mon Sep 16 10:56:49 2013 +0200 Fixed random failures in test_security_plain and _curve * ZAP handler thread was not getting time to start up * Code now creates and binds handler socket in parent thread and passes the socket to the zap_handler, so this always gets the authentication requests. tests/test_security_curve.cpp | 55 ++++++++++++++++++++--------------------- tests/test_security_null.cpp | 45 +++++++++++++++++---------------- 2 files changed, 49 insertions(+), 51 deletions(-) commit 276cd1f1dae6e1404a143edfe7e1323314224e16 Merge: fbe1b79 6f35100 Author: Pieter Hintjens Date: Mon Sep 16 01:32:55 2013 -0700 Merge pull request #662 from ricnewton/master Fix windows build commit 6f351007d4a710207ad4730923add9635873af11 Author: Richard Newton Date: Mon Sep 16 09:23:47 2013 +0100 Fix windows build tests/testutil.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbe1b79188eb45deaa67a95e9a21a62a52e54b7e Merge: d76f3f7 dc1f5e9 Author: Pieter Hintjens Date: Sun Sep 15 15:36:00 2013 -0700 Merge pull request #661 from lalebarde/master simplify test_security_curve.cpp with zmq_z85_encode commit dc1f5e9f7c0c2331b0eb5edc487b711f257bc89b Author: Laurent Alebarde Date: Mon Sep 16 00:06:24 2013 +0200 simplify test_security_curve.cpp with zmq_z85_encode tests/test_security_curve.cpp | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) commit d76f3f7c036d02e7ac36d444bec471425cd36d5c Merge: 5c7b392 576e3ca Author: Ian Barber Date: Sun Sep 15 11:37:16 2013 -0700 Merge pull request #660 from hintjens/master Added z85 codec to ZMQ API commit 576e3ca5e0f0d67f673e1ef30ec1071d19cb6b3a Author: Pieter Hintjens Date: Sun Sep 15 20:07:33 2013 +0200 Added z85 codec to ZMQ API * Removed redundant Z85 code and include files from project * Simplified use of headers in test cases (now they all just use testutil.hpp) * Export zmq_z85_encode() and zmq_z85_decode() in API * Added man pages for these two functions doc/Makefile.am | 3 +- doc/zmq_curve.txt | 2 + doc/zmq_z85_decode.txt | 50 +++++++++++++ doc/zmq_z85_encode.txt | 56 +++++++++++++++ include/zmq.h | 6 ++ include/zmq_utils.h | 5 ++ src/Makefile.am | 1 - src/options.cpp | 14 ++-- src/z85_codec.hpp | 109 ----------------------------- src/zmq_utils.cpp | 91 ++++++++++++++++++++++-- tests/test_conflate.cpp | 2 - tests/test_connect_delay.cpp | 6 -- tests/test_connect_resolve.cpp | 3 - tests/test_ctx_destroy.cpp | 3 - tests/test_ctx_options.cpp | 2 - tests/test_disconnect_inproc.cpp | 2 - tests/test_fork.cpp | 10 +-- tests/test_hwm.cpp | 3 - tests/test_inproc_connect_before_bind.cpp | 2 - tests/test_invalid_rep.cpp | 4 +- tests/test_iov.cpp | 5 -- tests/test_last_endpoint.cpp | 2 - tests/test_linger.cpp | 3 - tests/test_monitor.cpp | 4 -- tests/test_msg_flags.cpp | 2 - tests/test_pair_inproc.cpp | 1 - tests/test_pair_ipc.cpp | 1 - tests/test_pair_tcp.cpp | 1 - tests/test_probe_router.cpp | 3 - tests/test_req_request_ids.cpp | 2 - tests/test_req_strict.cpp | 3 - tests/test_reqrep_device.cpp | 3 - tests/test_reqrep_inproc.cpp | 1 - tests/test_reqrep_ipc.cpp | 1 - tests/test_reqrep_tcp.cpp | 1 - tests/test_router_mandatory.cpp | 3 - tests/test_security_curve.cpp | 4 -- tests/test_security_null.cpp | 3 - tests/test_security_plain.cpp | 3 - tests/test_shutdown_stress.cpp | 4 -- tests/test_spec_dealer.cpp | 2 - tests/test_spec_pushpull.cpp | 2 - tests/test_spec_rep.cpp | 2 - tests/test_spec_req.cpp | 3 - tests/test_spec_router.cpp | 2 - tests/test_stream.cpp | 2 - tests/test_sub_forward.cpp | 4 -- tests/test_system.cpp | 15 ++-- tests/test_term_endpoint.cpp | 4 -- tests/test_timeo.cpp | 5 -- tests/testutil.hpp | 14 +++- tools/curve_keygen.c | 46 +----------- tools/z85_codec.h | 109 ----------------------------- 53 files changed, 237 insertions(+), 397 deletions(-) commit 5c7b39275f322799d1baa9be79340943071fa950 Merge: 9066851 193d0bb Author: Ian Barber Date: Sun Sep 15 09:51:09 2013 -0700 Merge pull request #659 from hintjens/master Fixed Z85 methods to be static commit 193d0bb63400d1a0f9a4c970e08c4807358244eb Author: Pieter Hintjens Date: Sun Sep 15 17:30:18 2013 +0200 Fixed Z85 methods to be static and not pollute library src/z85_codec.hpp | 4 ++-- tests/test_security_curve.cpp | 41 +++++++++++++++++++++++++++++++++++++++-- tools/curve_keygen.c | 39 +++++++++++++++++++++++++++++++++++++-- tools/z85_codec.h | 4 ++-- 4 files changed, 80 insertions(+), 8 deletions(-) commit 65ef76bb59255c2614055910748359276656c996 Author: Pieter Hintjens Date: Sun Sep 15 15:45:37 2013 +0200 Minor simplification to makefile tools/Makefile.am | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 90668517da4d29383470a794c51bb1647b2cc8ab Merge: 133c32d 4e6c56e Author: Pieter Hintjens Date: Sun Sep 15 06:19:00 2013 -0700 Merge pull request #658 from ricnewton/inproc_connect_before_bind Support high water mark on inproc socket connect before bind. commit 4e6c56e081a00f9963af337f5d49c73e2ac8afc3 Merge: b929882 133c32d Author: Richard Newton Date: Sun Sep 15 13:36:07 2013 +0100 Merge branch 'master' of https://github.com/zeromq/libzmq into inproc_connect_before_bind commit b9298823b4b42dd5beeedfcf8e06cb5f57ecd3bb Author: Richard Newton Date: Sun Sep 15 13:35:44 2013 +0100 Set hwm on connect socket before bind has happend to just that of connects hwm. src/pipe.cpp | 4 +- src/socket_base.cpp | 8 ++- tests/test_hwm.cpp | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 163 insertions(+), 5 deletions(-) commit 7841b0dd0f94e050bce753c394cd034ab3184ee9 Author: Richard Newton Date: Sat Sep 14 17:27:18 2013 +0100 Support high water mark on inproc socket connect before bind. src/ctx.cpp | 97 ++++++++++++++++++++++--------------- src/ctx.hpp | 2 + src/object.hpp | 3 +- src/pipe.cpp | 5 ++ src/pipe.hpp | 3 ++ tests/test_hwm.cpp | 134 +++++++++++++++++++++++++++++++++++++++------------- 6 files changed, 171 insertions(+), 73 deletions(-) commit 133c32d5ed523c8bd7976f1fd43663083d9456ff Merge: 3298e5a 0db2bbe Author: Richard Newton Date: Fri Sep 13 00:52:12 2013 -0700 Merge pull request #657 from hintjens/master Build didn't work if libsodium wasn't installed commit 0db2bbe29d4b4096ecb863c1702cb29d3eadbd29 Author: Pieter Hintjens Date: Fri Sep 13 09:47:23 2013 +0200 Build didn't work if libsodium wasn't installed tools/curve_keygen.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 3298e5a206ccab9c441c69a165332a97cbf6ccb9 Merge: c1fabf5 b9c0906 Author: Pieter Hintjens Date: Thu Sep 12 13:46:37 2013 -0700 Merge pull request #656 from ricnewton/inproc_connect_before_bind Allow inproc sockets to connect before bind commit b9c09064d5760e015b33c716aace846eb3802c43 Author: Richard Newton Date: Thu Sep 12 21:22:47 2013 +0100 Fix whitespace src/socket_base.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d5bd68b60b0311699b0fad411db0f1a09f3ee030 Merge: 379bcb0 c1fabf5 Author: Richard Newton Date: Thu Sep 12 21:09:30 2013 +0100 Merge branch 'master' of https://github.com/zeromq/libzmq into inproc_connect_before_bind commit 379bcb088153cf4207e46b82bebd50f9fcf7e359 Author: Richard Newton Date: Thu Sep 12 21:07:29 2013 +0100 Send identities when connecting pending sockets. src/ctx.cpp | 39 ++++++++++++---- src/ctx.hpp | 7 +-- src/object.cpp | 2 +- src/object.hpp | 2 +- src/socket_base.cpp | 3 +- tests/test_inproc_connect_before_bind.cpp | 71 +++++++++++++++++++++++++---- 6 files changed, 102 insertions(+), 22 deletions(-) commit c1fabf5ca9e7e9c575ab7a6e8a648a9f0e0ebf2a Merge: 60f4704 345bf14 Author: Ian Barber Date: Thu Sep 12 10:27:57 2013 -0700 Merge pull request #655 from hintjens/master Fixed overwrite in zmq_getsockopt commit 7c3496a76acfad992ebd7f1af1c2b22174b79530 Author: Richard Newton Date: Thu Sep 12 18:09:37 2013 +0100 Fix race condition and support multiple socket connects before bind. .gitignore | 1 + src/command.hpp | 1 + src/ctx.cpp | 43 +++++-- src/ctx.hpp | 4 +- src/object.cpp | 16 ++- src/object.hpp | 3 +- src/socket_base.cpp | 46 +------- tests/Makefile.am | 4 +- tests/test_inproc_connect_before_bind.cpp | 180 ++++++++++++++++++++++++++++- 9 files changed, 232 insertions(+), 66 deletions(-) commit 60f470450d5d541eed604b437252b0c300f1f6ee Merge: 168efb9 6c84a54 Author: Pieter Hintjens Date: Thu Sep 12 09:53:26 2013 -0700 Merge pull request #654 from lalebarde/master add exhaustive comparison in testutil bounce commit 6c84a543882c8ac4e673c5de40df11a27ab76c75 Author: Laurent Alebarde Date: Thu Sep 12 18:17:31 2013 +0200 add exhaustive comparison in testutil bounce tests/testutil.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 345bf146f151cbc62fd8b000dbe1316463d2a82d Author: Pieter Hintjens Date: Thu Sep 12 18:03:23 2013 +0200 Fixed overwrite in zmq_getsockopt On ZMQ_CURVE_xxxKEY fetches, would return 41 bytes into caller's 40-byte buffer. Now these fetches only return 41 bytes if the caller explicitly provides a 41-byte buffer (i.e. the option size is 41). doc/zmq_getsockopt.txt | 12 +++++++----- src/options.cpp | 6 +++--- src/options.hpp | 2 +- src/z85_codec.hpp | 3 ++- tools/z85_codec.h | 3 ++- 5 files changed, 15 insertions(+), 11 deletions(-) commit 6fefa4166acae14edf69473bb739a34d46128a70 Merge: 5f20d63 168efb9 Author: Richard Newton Date: Thu Sep 12 15:13:25 2013 +0100 Merge remote-tracking branch 'upstream/master' into inproc_connect_before_bind commit 5f20d63665c0ddbd3ff8824a9d1eda33bea07735 Author: Richard Newton Date: Thu Sep 12 14:44:44 2013 +0100 First attempt at inproc connect before bind CMakeLists.txt | 3 +- src/ctx.cpp | 28 +++++++ src/ctx.hpp | 13 +++ src/object.cpp | 15 ++++ src/object.hpp | 5 ++ src/socket_base.cpp | 127 ++++++++++++++++++++--------- tests/test_ctx_destroy.cpp | 3 + tests/test_inproc_connect_before_bind.cpp | 114 ++++++++++++++++++++++++++ tests/test_pair_inproc.cpp | 2 +- 9 files changed, 270 insertions(+), 40 deletions(-) commit 168efb9739eb3064bbbffc7c5849e4682e47547b Merge: 0d14efe 0f9e5f6 Author: Martin Hurton Date: Thu Sep 12 05:21:25 2013 -0700 Merge pull request #653 from mattconnolly/master Fix preprocessor typoe commit 6ff65a8aa4c97ddf442c4d72a74a95a81be5057f Author: Pieter Hintjens Date: Thu Sep 12 13:16:22 2013 +0200 Builds and installs curve_keygen tool tools/Makefile.am | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0d14efe73a9c39b263240614ad4a40ac5020e55e Merge: 0f7141c ac8c72c Author: Richard Newton Date: Thu Sep 12 03:56:27 2013 -0700 Merge pull request #652 from hintjens/master Minor fixes to project packaging commit ac8c72cea68235faffe71b248bf45ae57fe5619f Author: Pieter Hintjens Date: Thu Sep 12 12:47:14 2013 +0200 Added test_ctx_destroy to .gitignore .gitignore | 1 + 1 file changed, 1 insertion(+) commit d1ba8a50d2fad55dbb000065326e2e9138bfd1d0 Author: Pieter Hintjens Date: Thu Sep 12 12:46:43 2013 +0200 Extended TravisCI build to use libsodium .travis.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 52370bff4485d6aa3e84ccf49f4f6020b50b76af Author: Pieter Hintjens Date: Thu Sep 12 12:46:23 2013 +0200 Removed debugging printfs tests/test_security_curve.cpp | 2 -- tests/test_security_null.cpp | 2 -- tests/test_security_plain.cpp | 2 -- 3 files changed, 6 deletions(-) commit 0f9e5f60498cdd2146c24a8133356d59d963d806 Author: Matt Connolly Date: Thu Sep 12 20:30:16 2013 +1000 Fix preprocessor typoe tests/test_system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f7141c21a2eb5adc6cb14530b7cce7d048ccbd6 Merge: bba0dd1 8e6b5ad Author: Pieter Hintjens Date: Wed Sep 11 09:33:08 2013 -0700 Merge pull request #651 from ricnewton/master Fix Makefile.am for test_ctx_destroy commit 8e6b5ad17ef963d2ecafa3b25659a226fa1d212c Author: Richard Newton Date: Wed Sep 11 15:02:16 2013 +0100 Fix Makefile.am for test_ctx_destroy tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) commit bba0dd19a1886ed818c537abd8ca7896bafc2f68 Merge: 25c89ca ccf0e61 Author: Pieter Hintjens Date: Tue Sep 10 07:03:40 2013 -0700 Merge pull request #650 from ricnewton/master Implement non-blocking shutdown command commit ccf0e61b770bde35b6ce7d46ca026c15a2101b1c Merge: 64e1c18 25c89ca Author: Richard Newton Date: Tue Sep 10 13:30:11 2013 +0100 Merge remote-tracking branch 'upstream/master' commit 64e1c181f71299614975b2809e112803719221b1 Author: Richard Newton Date: Tue Sep 10 13:30:00 2013 +0100 Implement non-blocking shutdown command that unblocks other threads waiting on blocking operations. CMakeLists.txt | 1 + doc/zmq_ctx_shutdown.txt | 52 +++++++++++++++++++++++++ include/zmq.h | 1 + src/ctx.cpp | 19 ++++++++++ src/ctx.hpp | 9 +++++ src/zmq.cpp | 10 +++++ tests/Makefile.am | 1 + tests/test_ctx_destroy.cpp | 90 ++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 183 insertions(+) commit 25c89cace164c50434ec0300aa2fd50337064561 Merge: 4edad54 6725c46 Author: Martin Hurton Date: Mon Sep 9 12:12:36 2013 -0700 Merge pull request #649 from hintjens/master Fixed minor error in NULL mechanism (spec was wrong) commit 6725c4644f111ba3f3ab3b0aba5a53cea0265391 Author: Pieter Hintjens Date: Mon Sep 9 20:40:34 2013 +0200 Added ZMQ_ZAP_DOMAIN socket option * This is passed to the ZAP handler in the 'domain' field * If not set, or empty, then NULL security does not call the ZAP handler * This resolves the phantom ZAP request syndrome seen with sockets where security was never intended (e.g. in test cases) * This means if you install a ZAP handler, it will not get any requests for new connections until you take some explicit action, which can be setting a username/password for PLAIN, a key for CURVE, or the domain for NULL. doc/zmq_getsockopt.txt | 50 +++++++++++++++++---------- doc/zmq_setsockopt.txt | 76 +++++++++++++++++++++++++---------------- include/zmq.h | 5 +-- src/curve_server.cpp | 7 ++-- src/null_mechanism.cpp | 9 +++-- src/options.cpp | 53 +++++++++++++++++----------- src/options.hpp | 11 +++--- src/plain_mechanism.cpp | 7 ++-- tests/test_security_curve.cpp | 22 ++++++------ tests/test_security_null.cpp | 27 ++++++++------- tests/test_security_plain.cpp | 16 +++++---- 11 files changed, 171 insertions(+), 112 deletions(-) commit c45d91a10611b8a9812691f404fd3e30f002585a Author: Pieter Hintjens Date: Mon Sep 9 19:58:31 2013 +0200 Fixed comments on curve_keygen tool tools/curve_keygen.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 635a03d2404129d0d5cee0ad517591befeba4f14 Author: Pieter Hintjens Date: Mon Sep 9 19:58:18 2013 +0200 Was sending NULL mechanism name with extra null (fixed) src/null_mechanism.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4edad545372774c5d8aaae87d45490f27d171884 Merge: 498dc37 a601b3f Author: Pieter Hintjens Date: Fri Sep 6 03:19:45 2013 -0700 Merge pull request #648 from ricnewton/master Fix tests on windows commit a601b3f6f40e8d5a2926dbf61c00d9b416e33560 Author: Richard Newton Date: Fri Sep 6 10:25:00 2013 +0100 Remove windows debug code. tests/test_system.cpp | 1 - 1 file changed, 1 deletion(-) commit 7485b09cba0d335de271949f41bb6a5b77ee08c4 Author: Richard Newton Date: Fri Sep 6 10:08:11 2013 +0100 Fix tests on windows tests/test_security_curve.cpp | 2 +- tests/test_system.cpp | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) commit 498dc3798878c611392b27064efa1e2161d1d9bf Merge: 1f03710 4c75306 Author: Martin Hurton Date: Fri Sep 6 00:54:51 2013 -0700 Merge pull request #645 from hintjens/master Updated libzmq to match RFCs commit 4c753060236caf12102194b313abfb28dccaa7ff Author: Pieter Hintjens Date: Fri Sep 6 09:22:09 2013 +0200 Fixed test_stream case - was not looping to read all input from peer - broke on OS/X specifically tests/test_stream.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9dd324aab23d8540260c8da93ae3927854542ecb Author: Pieter Hintjens Date: Thu Sep 5 15:18:42 2013 +0200 z85 encoding buffer overrun tests/test_security_curve.cpp | 2 +- tools/curve_keygen.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1f037109806081468f250dda4f2762cec8e1f452 Merge: 7b02f1c 11deee4 Author: Pieter Hintjens Date: Wed Sep 4 12:12:28 2013 -0700 Merge pull request #647 from sebastien/master Clarified zmq_socket.txt ZMQ_STREAM section, added HTTP server example commit 11deee4e3eafb0f97aae95b786e39007e335ca41 Merge: f918884 7b02f1c Author: Sebastien Pierre Date: Wed Sep 4 15:02:50 2013 -0400 Merge branch 'master' of github.com:sebastien/libzmq commit f9188841b02b90fbba493c803f17be082d47f4d1 Author: Sebastien Pierre Date: Wed Sep 4 14:58:07 2013 -0400 Clarified zmq_socket.txt ZMQ_STREAM section, added example doc/zmq_socket.txt | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit 0a9261472f6c28e4092b0564da3960146bdfd743 Author: Pieter Hintjens Date: Wed Sep 4 19:41:33 2013 +0200 Removed test_raw_socket CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32fa426e61b92bdd0929990cebc799839cc335a7 Author: Pieter Hintjens Date: Wed Sep 4 19:38:15 2013 +0200 Added system check at start of selftests - tests that system can provide at least 1,000 sockets - we could expand on this but this covers the main case of OS/X having a too-low default limit of 256 handles per process .gitignore | 1 + tests/Makefile.am | 4 +++- tests/test_system.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) commit 7b02f1c966cc7b615b6cfd5df81f09478be2dcb0 Merge: ef207e4 bb34885 Author: Pieter Hintjens Date: Wed Sep 4 09:42:39 2013 -0700 Merge pull request #646 from minrk/xfail-linger mark test_linger as expected failure commit bb348858f14e797ef125f8ba95a3218ddbc3180a Author: MinRK Date: Wed Sep 4 09:38:54 2013 -0700 mark test_linger as expected failure rather than pretending it passes tests/Makefile.am | 3 ++- tests/test_linger.cpp | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) commit 6612280946a40ae3d0d48ff729a1a81c23046ca8 Author: Pieter Hintjens Date: Wed Sep 4 18:10:47 2013 +0200 Removed temporary patch on tests/Makefile.am tests/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 28b0a5fa2711b43e2378b7c16367ce14604df096 Author: Pieter Hintjens Date: Wed Sep 4 17:59:45 2013 +0200 Updated libzmq to match RFC 23, 24, 25, 26 * Command names changed from null terminated to length-specified * Command frames use the correct flag (bit 2) * test_stream acts as test case for command frames * Some code cleanups src/curve_client.cpp | 24 +++++++-------- src/curve_client.hpp | 8 ++--- src/curve_server.cpp | 24 +++++++-------- src/curve_server.hpp | 8 ++--- src/mechanism.hpp | 8 ++--- src/msg.hpp | 3 +- src/null_mechanism.cpp | 8 ++--- src/null_mechanism.hpp | 4 +-- src/plain_mechanism.cpp | 66 +++++++++++++++++++++-------------------- src/plain_mechanism.hpp | 20 ++++++------- src/stream_engine.cpp | 20 ++++++------- src/stream_engine.hpp | 8 ++--- src/v2_decoder.cpp | 2 ++ src/v2_encoder.cpp | 2 ++ src/v2_protocol.hpp | 3 +- tests/Makefile.am | 3 +- tests/test_security_curve.cpp | 2 +- tests/test_stream.cpp | 8 ++--- 18 files changed, 114 insertions(+), 107 deletions(-) commit 1844a27c82fbd72a83ffd28b59c2e5ab1f2ddab7 Author: Pieter Hintjens Date: Wed Sep 4 15:00:05 2013 +0200 Removed test_raw_sock test case (replaced by test_stream) tests/Makefile.am | 6 +- tests/test_raw_sock.cpp | 166 ----------------------------------------------- 2 files changed, 1 insertion(+), 171 deletions(-) commit ef207e45ce88d5aab6c92b0f8f4322881fb73b44 Merge: 7561ff7 873d80c Author: Pieter Hintjens Date: Wed Sep 4 04:19:34 2013 -0700 Merge pull request #644 from ipechorin/master Fix MSVC 2008 and 2010 project files commit 873d80c9fecc823d903b7e458b959f9877598d8c Author: Ivan Pechorin Date: Wed Sep 4 15:13:14 2013 +0400 fix MSVC 2008 project: include the source files added recently builds/msvc/libzmq/libzmq.vcproj | 62 ++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 9 deletions(-) commit e071d3a4ae1421941127d360e31284eac5451047 Author: Ivan Pechorin Date: Wed Sep 4 15:00:59 2013 +0400 fix MSVC10 project: include the source files added recently builds/msvc/libzmq/libzmq.vcxproj | 10 +++++++++- builds/msvc/libzmq/libzmq.vcxproj.filters | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) commit 7561ff70f36b23f40366c1ac721f1b4fbd16c4fa Merge: 0ff896d 4696f00 Author: Pieter Hintjens Date: Mon Sep 2 16:10:07 2013 -0700 Merge pull request #643 from ricnewton/master Fix cmake file for security tests commit 4696f002ca5c36d19967f414ffd673c9d156a3fc Author: Richard Newton Date: Mon Sep 2 23:41:17 2013 +0100 Fix cmake file for security tests CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0ff896d094100b530ec253b71f2c9c0a76dac1d7 Merge: 3a50aa4 fb67e16 Author: Ian Barber Date: Mon Sep 2 10:30:49 2013 -0700 Merge pull request #642 from hintjens/master Fixed ZAP authentication commit fb67e160a11db104f89043c702000b7c974d7537 Author: Pieter Hintjens Date: Mon Sep 2 18:21:36 2013 +0200 Fixed ZAP authentication - if ZAP server returns anything except 200, connection is closed - all security tests now pass correctly - test_security_curve now does proper client key authentication using test key - test_security_plain now does proper password authentication src/curve_server.cpp | 4 ++++ src/plain_mechanism.cpp | 4 ++++ tests/test_security_curve.cpp | 46 ++++++++++++++++++++++++++--------------- tests/test_security_plain.cpp | 27 ++++++++++++------------ tests/testutil.hpp | 11 +++++----- 5 files changed, 56 insertions(+), 36 deletions(-) commit 3a50aa4473a0d808da3530f1d2977e5298ebe272 Merge: c128fac fba5612 Author: Ian Barber Date: Mon Sep 2 08:32:09 2013 -0700 Merge pull request #641 from hintjens/master Fixed regression tests commit fba56120262c18b8c54902509f85a544f06048d1 Author: Pieter Hintjens Date: Mon Sep 2 17:22:24 2013 +0200 Fixed 'make check' failures - Split off NULL security check from PLAIN - Cleaned up test_linger code a little - Got all tests to pass, added TODOs for outstanding issues - Added ZAP authentication for NULL test case - NULL mechanism was not passing server identity - fixed - cleaned up test_security_plain and removed option double-checks (made code ugly) - lowered timeout on expect_bounce_fail to 150 msec to speed up checks - removed all sleeps from test_fork and simplified code (it still passes :-) .gitignore | 5 + include/zmq_utils.h | 4 +- src/curve_server.cpp | 2 +- src/null_mechanism.cpp | 8 ++ src/plain_mechanism.cpp | 2 +- tests/Makefile.am | 8 +- tests/test_fork.cpp | 115 ++++++---------- tests/test_linger.cpp | 98 +++++++------- tests/test_security.cpp | 292 ----------------------------------------- tests/test_security_curve.cpp | 242 +++++++++++++++------------------- tests/test_security_null.cpp | 109 +++++++++++++++ tests/test_security_plain.cpp | 154 ++++++++++++++++++++++ tests/testutil.hpp | 10 +- 13 files changed, 482 insertions(+), 567 deletions(-) commit 01b336f1f179d62d096e2629956fbcd95c504664 Author: Pieter Hintjens Date: Mon Sep 2 15:08:36 2013 +0200 Whitespace fixes tests/test_security.cpp | 4 ++-- tests/test_security_curve.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit c128fac7a7401421e179bf8fd19c1faf2ecf0bd7 Merge: 6fa274e c646ac9 Author: Pieter Hintjens Date: Mon Sep 2 06:06:58 2013 -0700 Merge pull request #639 from minrk/test_linger add test_linger commit 6fa274ebeff1c5f34e523fc3f2297ea7969bcae8 Merge: 282765c 1771755 Author: Pieter Hintjens Date: Mon Sep 2 06:06:31 2013 -0700 Merge pull request #640 from mattconnolly/fork Adding ability for a context to be terminated in a forked child process commit 282765cab41ca49eb1b4083f56aaa4aaed3c1b12 Merge: ca8ac83 436cad3 Author: Pieter Hintjens Date: Mon Sep 2 06:04:51 2013 -0700 Merge pull request #628 from ianbarber/master Remove delay options commit 1771755888a1b7bb8b17a111d5be93b7f2d4d9be Author: Matt Connolly Date: Mon Sep 2 07:13:46 2013 +1000 test_fork.cpp: adding missing headers for linux tests/test_fork.cpp | 2 ++ 1 file changed, 2 insertions(+) commit c646ac96c084f618d2267ce8c738ca561a5c1bdf Author: MinRK Date: Sun Sep 1 13:50:18 2013 -0700 cast rc to size_t for comparisons avoids -Wall failures comparing int to uint tests/test_linger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c3adc86d6b9da02603e665822df295372778e06c Author: Matt Connolly Date: Mon Sep 2 06:49:30 2013 +1000 Fix unused variable when using eventfd src/signaler.cpp | 2 ++ 1 file changed, 2 insertions(+) commit ca8ac83e97d48e97c332da6935f80dca042b7d58 Merge: 8ef7fbb 9d94640 Author: Pieter Hintjens Date: Sun Sep 1 10:18:50 2013 -0700 Merge pull request #637 from minrk/test_plain_inauth test failed auth for both PLAIN and CURVE commit a3d9d01af87a8f4817df0d369c605931ea9ebf03 Author: Matt Connolly Date: Sun Sep 1 20:40:45 2013 +1000 test_fork: update test to verify communication between parent and child tests/test_fork.cpp | 69 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 14 deletions(-) commit ff2900fd5286013ae37c00fd0d578bc1eab93140 Author: Matt Connolly Date: Sat Aug 31 21:17:11 2013 +1000 Terminate context in a child process of fork() to replace file descriptors to not interfere with parent process's context src/ctx.cpp | 16 ++++++++++++++ src/ctx.hpp | 5 +++++ src/kqueue.cpp | 10 +++++++++ src/kqueue.hpp | 6 ++++++ src/mailbox.cpp | 1 - src/mailbox.hpp | 7 ++++++ src/reaper.cpp | 11 ++++++++++ src/reaper.hpp | 5 +++++ src/signaler.cpp | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/signaler.hpp | 20 +++++++++++++++++- 10 files changed, 141 insertions(+), 2 deletions(-) commit 0478ee04f4f4525715e78f31a3209de6880a0a5e Author: Matt Connolly Date: Sun Sep 1 20:19:58 2013 +1000 Adding test showing failure to close socket/context in forked child .gitignore | 1 + configure.ac | 2 +- tests/Makefile.am | 4 ++- tests/test_fork.cpp | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 2 deletions(-) commit 58b370df699c5f535e2d5ae6e0a631d2ca330435 Author: MinRK Date: Sat Aug 31 18:27:50 2013 -0700 add test_linger tests that default LINGER (-1) ensures message delivery. Note: it fails for large messages ( > 1MB, depending on the system). tests/Makefile.am | 2 + tests/test_linger.cpp | 103 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) commit 8ef7fbb4a4a1b1f9062046ed3d268433c974c38d Merge: 82a00e3 6a18f59 Author: Ian Barber Date: Sat Aug 31 13:35:21 2013 -0700 Merge pull request #638 from shawnjgoff/master Change name of icanhasall to subscribe_to_all commit 6a18f59532e8361384519f0f637baabe17380e2a Author: Shawn J. Goff Date: Sat Aug 31 09:53:47 2013 -0400 Change name of icanhasall to subscribe_to_all icanhasall is cute (for now), but the effect of the variable is clear only after tracking down its origin reading the commit. This change is intended to make it easier for people to have some intuition about its effect from its name. src/dealer.cpp | 6 +++--- src/dealer.hpp | 2 +- src/pair.cpp | 6 +++--- src/pair.hpp | 2 +- src/pull.cpp | 6 +++--- src/pull.hpp | 2 +- src/push.cpp | 6 +++--- src/push.hpp | 2 +- src/router.cpp | 6 +++--- src/router.hpp | 2 +- src/socket_base.cpp | 10 +++++----- src/socket_base.hpp | 4 ++-- src/stream.cpp | 6 +++--- src/stream.hpp | 2 +- src/xpub.cpp | 6 +++--- src/xpub.hpp | 2 +- src/xsub.cpp | 6 +++--- src/xsub.hpp | 2 +- 18 files changed, 39 insertions(+), 39 deletions(-) commit 9d94640edc5b6fc6a7d3a2b66abea680f478921e Author: MinRK Date: Fri Aug 30 17:56:59 2013 -0700 test failed CURVE auth adds expect_bounce_fail test function which is like bounce, but fails if messages arrive. tests/test_security.cpp | 17 +-------- tests/test_security_curve.cpp | 83 ++++++++++++++++++++++++++++++++++++++++- tests/testutil.hpp | 37 ++++++++++++++++++ 3 files changed, 119 insertions(+), 18 deletions(-) commit 0cac56fe524bd5a85c4f1e08f5a4492bab1c2b30 Author: MinRK Date: Fri Aug 30 15:28:16 2013 -0700 test PLAIN auth with failed login This test fails because PLAIN authentication doesn't actually reject connections tests/test_security.cpp | 80 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) commit 82a00e3a985c6c13e34f385fd19624d521620c5d Merge: 22f05fa da52806 Author: Pieter Hintjens Date: Fri Aug 30 13:38:27 2013 -0700 Merge pull request #636 from ricnewton/master Disable failing tests on windows. commit da52806d68cd663495ec9c58a2a712bb5561b64c Author: Richard Newton Date: Fri Aug 30 19:04:32 2013 +0100 Disable failing tests on windows. CMakeLists.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 22f05fa2fa43a72de8a0f9b195514749665447a7 Merge: 4ca6ab2 93a068a Author: Martin Hurton Date: Thu Aug 29 12:37:15 2013 -0700 Merge pull request #635 from guidog/master Fixed silly port number. commit 93a068a832ae64f294e68f54fa828cb6be24f93e Author: Guido Goldstein Date: Thu Aug 29 20:55:23 2013 +0200 Fixed silly port number. tests/test_conflate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ca6ab26fa8b026215515355b6179966e4fa77ed Merge: 83e547f 455739f Author: Martin Hurton Date: Thu Aug 29 04:54:55 2013 -0700 Merge pull request #634 from guidog/master Fixed markup so documentation can be built. commit 455739f94258c021bfdc001f3aa315374058e912 Author: Guido Goldstein Date: Thu Aug 29 09:35:17 2013 +0200 Fixed markup so documentation can be built. doc/zmq_setsockopt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83e547f09f985a4bf1e4a19bdc13f03315f450ef Merge: 2e9385a eaf227d Author: Pieter Hintjens Date: Sat Aug 24 14:31:16 2013 -0700 Merge pull request #633 from eburkitt/vs2012-clean-compile get to clean compile under vs2012 commit eaf227d4deb3bc43c5507f7b86d8c46ec4912b06 Author: Evan Burkitt Date: Fri Aug 23 17:14:03 2013 -0700 get to clean compile under vs2012 Added some missing (but existing in branch) files to libzmq11 project needed to compile as static library by VS2012 (at least), and fixed some warnings. One warning remains in raw_decoder.cpp, which I'm leaving for now because I'm not sure how project owners would like to fix it. builds/msvc/libzmq/libzmq11.vcxproj | 4 ++++ src/dealer.cpp | 2 +- src/mutex.hpp | 2 +- src/req.cpp | 4 ++-- src/router.cpp | 6 +++--- 5 files changed, 11 insertions(+), 7 deletions(-) commit 2e9385ac02d14ce78837deb2c9f76155eacdda14 Merge: d485404 19ca8a0 Author: Pieter Hintjens Date: Wed Aug 21 01:35:43 2013 -0700 Merge pull request #631 from jrossi/master Add the Socket Identity info to the ZAP Messages commit 436cad37ece8bc81d333b8a33d38af4ebaea26db Author: Ian Barber Date: Tue Aug 20 22:49:19 2013 +0100 fix type on HWM src/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9baa051dd42e584d382a62a98fb31bac47674fa Merge: 531d3eb d485404 Author: Ian Barber Date: Tue Aug 20 22:48:04 2013 +0100 Merge in master changes commit d485404aab6efa15a1bdcb881874a4fad4b0b5a8 Merge: cb6b5a6 3f3777d Author: Ian Barber Date: Tue Aug 20 14:37:52 2013 -0700 Merge pull request #626 from dkrikun/master Add ZMQ_CONFLATE socket option commit 19ca8a0fc0a13e3da6af6636bf3756d77397734f Author: Jeremy Rossi Date: Tue Aug 20 13:48:05 2013 -0400 Add the Socket Identity info to the ZAP Messages This change adds the socket identity infomartion from the socket to the zap frames. In doing this the ZAP is able preform different operations based on different sockets. This is not compaitable with the current ZAP RFC, but that can be updated. As the ZAP rfc is currently draft for I did not change the version number. Tests also modified and passing. src/curve_server.cpp | 8 ++++++++ src/plain_mechanism.cpp | 8 ++++++++ tests/test_security.cpp | 5 +++++ tests/test_security_curve.cpp | 5 +++++ 4 files changed, 26 insertions(+) commit cb6b5a65fcee87d343cf6d12b792c28a2625aa77 Merge: bcfe863 fd8b0fe Author: Ian Barber Date: Mon Aug 19 05:55:07 2013 -0700 Merge pull request #629 from ulikoehler/init_data_assert Minor doc & assert fixes commit fd8b0fec077c6f4724b6dd17018ed4edd0bbe6c4 Author: Uli Köhler Date: Mon Aug 19 14:49:29 2013 +0200 Re-add comment line from cmsg branch src/msg.cpp | 2 ++ 1 file changed, 2 insertions(+) commit a28c38efa5084ba92ec98f1f055bbe22881548a6 Author: Uli Köhler Date: Mon Aug 19 14:45:29 2013 +0200 Fix spaces before comments src/msg.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3f3777d05bada63414339bedb7aefc56051836c2 Author: danielkr Date: Mon Aug 19 15:34:11 2013 +0300 Add test for ZMQ_CONFLATE option tests/Makefile.am | 4 ++- tests/test_conflate.cpp | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) commit 9c2740d9fad86fb3b983ba30cde10b4cf5b4c7cc Author: Uli Köhler Date: Sun Aug 18 22:50:50 2013 +0200 Minor fixes to doc ; added zmq_msg_init_data() assert preventing deferred segfault src/msg.cpp | 6 ++++-- src/msg.hpp | 5 ++++- src/zmq.cpp | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) commit bcfe863fd4d8500217ea0b9e22296101249867fa Merge: b3ca7fd 121a838 Author: Ian Barber Date: Mon Aug 19 01:11:07 2013 -0700 Merge pull request #630 from ulikoehler/cmsg Optimized zmq::msg_t for constant messages commit da4a70d59d14f68d5cb463cce01e9a772f6ca5a2 Author: danielkr Date: Mon Aug 19 08:18:20 2013 +0300 Fix indentation src/pipe.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 121a838a0ce824f40ef57dbc24234409f368ebdb Author: Uli Köhler Date: Sun Aug 18 23:40:38 2013 +0200 Added message type for constant messages src/msg.cpp | 44 +++++++++++++++++++++++++++++++------------- src/msg.hpp | 13 ++++++++++++- 2 files changed, 43 insertions(+), 14 deletions(-) commit 531d3ebc096c65b3e2772958acde9bf329136b18 Author: Ian Barber Date: Sun Aug 18 11:16:21 2013 +0100 Remove delay options These were exposed to users, but have subsequently been removed as sockopts. They are currently only being used by ZAP, so I've moved it to a simpl function call (actually it's only used in one case even in that, so there may be a further simplification possible there). src/options.cpp | 2 -- src/options.hpp | 8 -------- src/pipe.cpp | 15 ++++++++++----- src/pipe.hpp | 9 ++++++--- src/session_base.cpp | 10 +++++----- src/socket_base.cpp | 6 ++---- 6 files changed, 23 insertions(+), 27 deletions(-) commit b3ca7fd4253531ad3f001196ba3eafbec931b2f9 Merge: 1011e8a cb35fd7 Author: Pieter Hintjens Date: Sun Aug 18 00:58:03 2013 -0700 Merge pull request #627 from ianbarber/master Attempt to fix disconnect not respecting linger commit 1011e8ad2078e923541f16ec738837550e710b6e Merge: ed272fe 70a1fbe Author: Pieter Hintjens Date: Sun Aug 18 00:51:39 2013 -0700 Merge pull request #624 from ricnewton/master Port tests to windows and add to cmake build. commit cb35fd7bfed767a303da43da523c91b98321a58f Author: Ian Barber Date: Sun Aug 18 07:50:53 2013 +0100 Attempt to fix disconnect not respecting linger Looks like linger is honoured properly, but shutting down the session causes the pipe termination to come from that side - because the local pipe then shuts down right away it seems to trigger a terminated on the other end instead of waiting. This way we trigger the termination from the local end and then terminate the session. src/socket_base.cpp | 20 +++++++++++++------- src/socket_base.hpp | 5 +++-- 2 files changed, 16 insertions(+), 9 deletions(-) commit ed272fe56d3b16c9f111aa4db97432d3327d92d8 Merge: eccfede e23d396 Author: Ian Barber Date: Sat Aug 17 23:27:17 2013 -0700 Merge pull request #625 from ulikoehler/zmq_send_const Add zmq_send_const for constant data commit f59c1a5c5aec15cd6117eee951ad51ac302ca1ad Author: danielkr Date: Sat Aug 17 23:55:00 2013 +0300 Update doc for ZMQ_CONFLATE socket option doc/zmq_setsockopt.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit daa7a8021f6802d12d8fcfd771dda3101d192f15 Author: danielkr Date: Sat Aug 17 23:08:07 2013 +0300 Plug in dbuffer to serve the ZMQ_CONFLATE option ZMQ_CONFLATE option is passed to pipepair() which creates a usual ypipe_t or ypipe_conflate_t and plugs it into pipe_t under a common abstract base. src/Makefile.am | 5 +- src/pipe.cpp | 51 ++++++++++++++----- src/pipe.hpp | 15 ++++-- src/session_base.cpp | 17 +++++-- src/socket_base.cpp | 27 ++++++++-- src/ypipe.hpp | 3 +- src/ypipe_base.hpp | 44 +++++++++++++++++ src/ypipe_conflate.hpp | 127 ++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 263 insertions(+), 26 deletions(-) commit 4c35b88acbc7d1237e86833253737632cfd6a216 Author: danielkr Date: Sat Aug 17 23:00:46 2013 +0300 Implement double buffer for conflate option Add simple double buffer implementation tailored to handle msg_t, i.e invoke msg_t::close instead of destructor and so on. Seems to me mutex is good enough at this point. src/dbuffer.hpp | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) commit d020dd677f9c8c4f89f244b19f1b809fb9b3a635 Author: danielkr Date: Sat Aug 17 22:59:07 2013 +0300 Declare ZMQ_CONFLATE option include/zmq.h | 1 + src/options.cpp | 21 ++++++++++++++++++++- src/options.hpp | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-) commit 4eac7e3e4fc443d3ad058d245f88f52ae7a1a817 Author: danielkr Date: Sat Aug 17 22:55:04 2013 +0300 Add scoped_lock_t syntactic sugar src/mutex.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 87c84a252abc59bf34895a42f799278f2f9e478f Author: danielkr Date: Sat Aug 17 22:54:29 2013 +0300 Add try_lock() to mutex_t src/mutex.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 503da83fceac8c2d6c37ff6fbfac0c4c31e59a91 Author: danielkr Date: Sat Aug 17 22:53:02 2013 +0300 Add #include to string.h in blob.hpp Required for memmove(), memcpy() src/blob.hpp | 1 + 1 file changed, 1 insertion(+) commit e23d3963d337985c80523327a29480625a009d37 Author: Uli Köhler Date: Sat Aug 17 20:39:10 2013 +0200 Fix doc typo doc/zmq_send_const.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 10becae7eb7c43e7ec854c5f7d9f365566e1deef Author: Uli Köhler Date: Sat Aug 17 20:37:07 2013 +0200 Added zmq_send_const test tests/test_pair_inproc.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e2c322cf80e158a59d5b917a76693afc39f5de4e Author: Uli Köhler Date: Sat Aug 17 20:22:50 2013 +0200 Implemented zmq_send_const doc/zmq_send.txt | 1 + doc/zmq_send_const.txt | 103 ++++++++++++++++++++++++++++++++++++++++++++++++ include/zmq.h | 1 + src/zmq.cpp | 26 ++++++++++++ 4 files changed, 131 insertions(+) commit 70a1fbee7a94a7e2ace3c5b5f376c997ccc68ea7 Author: Richard Newton Date: Sat Aug 17 14:39:38 2013 +0100 Fix running tests from cmake on linux. CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e1b2b649fb7459203939cc0dd0446df4f88bb273 Merge: a83baa9 eccfede Author: Richard Newton Date: Sat Aug 17 14:23:42 2013 +0100 Merge branch 'master' of https://github.com/zeromq/libzmq commit a83baa9b0b35a3664d22a48b918e644c77b47114 Author: Richard Newton Date: Sat Aug 17 14:23:22 2013 +0100 Fix up threading code from port tests to windows. include/zmq_utils.h | 4 +++- src/zmq_utils.cpp | 4 ++-- tests/test_monitor.cpp | 15 ++++++--------- tests/test_security.cpp | 5 +---- tests/test_security_curve.cpp | 5 +---- tests/test_shutdown_stress.cpp | 6 ++---- tests/testutil.hpp | 3 +++ 7 files changed, 18 insertions(+), 24 deletions(-) commit 7f74fc7c998cba2efd2bc286ab2aad711fb5c475 Author: Richard Newton Date: Sat Aug 17 13:43:45 2013 +0100 Port tests to windows and add to cmake build. CMakeLists.txt | 52 +++++++++++++++++++++++++++++++++++--- include/zmq_utils.h | 6 +++++ src/zmq_utils.cpp | 15 +++++++++++ tests/test_connect_delay.cpp | 12 ++++----- tests/test_connect_resolve.cpp | 5 ++-- tests/test_ctx_options.cpp | 5 ++-- tests/test_disconnect_inproc.cpp | 3 ++- tests/test_hwm.cpp | 4 +-- tests/test_invalid_rep.cpp | 5 ++-- tests/test_iov.cpp | 10 ++++---- tests/test_last_endpoint.cpp | 5 ++-- tests/test_monitor.cpp | 23 ++++++++--------- tests/test_msg_flags.cpp | 5 ++-- tests/test_pair_inproc.cpp | 1 + tests/test_pair_ipc.cpp | 1 + tests/test_pair_tcp.cpp | 1 + tests/test_probe_router.cpp | 4 +-- tests/test_raw_sock.cpp | 5 ++-- tests/test_req_request_ids.cpp | 2 +- tests/test_req_strict.cpp | 7 +++-- tests/test_reqrep_device.cpp | 5 ++-- tests/test_reqrep_inproc.cpp | 1 + tests/test_reqrep_ipc.cpp | 1 + tests/test_reqrep_tcp.cpp | 1 + tests/test_router_mandatory.cpp | 4 +-- tests/test_security.cpp | 9 +++---- tests/test_security_curve.cpp | 9 +++---- tests/test_shutdown_stress.cpp | 15 +++++------ tests/test_spec_dealer.cpp | 1 + tests/test_spec_pushpull.cpp | 1 + tests/test_spec_rep.cpp | 1 + tests/test_spec_req.cpp | 6 ++--- tests/test_spec_router.cpp | 1 + tests/test_stream.cpp | 5 ++-- tests/test_sub_forward.cpp | 8 +++--- tests/test_term_endpoint.cpp | 12 ++++----- tests/test_timeo.cpp | 16 ++++-------- tests/testutil.hpp | 12 +++++++++ 38 files changed, 171 insertions(+), 108 deletions(-) commit eccfede10d73bf8505a841b3d75c6f200d31728a Merge: 749c391 e16a6af Author: Ian Barber Date: Thu Aug 8 11:42:53 2013 -0700 Merge pull request #623 from ricnewton/master Fix compile error on windows. commit e16a6af0c7430ecc0efac674e75fe3f66b0f6ee5 Author: Richard Newton Date: Thu Aug 8 17:27:49 2013 +0100 Fix compile error on windows. src/ip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 749c391b3414cc57afbb4a108867ebc062b2195f Merge: fe30cc6 423ca36 Author: Ian Barber Date: Sat Aug 3 12:42:53 2013 -0700 Merge pull request #622 from ckamm/req-strict Rename ZMQ_REQ_SEND_RESETS -> ZMQ_REQ_STRICT. commit 423ca36b17264ca7b71b23e4a110aa847fd7ac27 Author: Christian Kamm Date: Sat Aug 3 14:35:18 2013 +0200 Rename ZMQ_REQ_SEND_RESETS -> ZMQ_REQ_STRICT. It defaults to enabled. Switch it off to be able to send a new message before the previous reply has been received. .gitignore | 2 +- doc/zmq_setsockopt.txt | 15 ++--- include/zmq.h | 2 +- src/req.cpp | 10 ++-- src/req.hpp | 4 +- tests/Makefile.am | 4 +- tests/test_req_send_resets.cpp | 120 --------------------------------------- tests/test_req_strict.cpp | 121 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 140 insertions(+), 138 deletions(-) commit fe30cc6d99d82eebb4145575bc0f95888cc9ff8e Merge: 9f4526f f5c5955 Author: Pieter Hintjens Date: Sat Aug 3 02:44:53 2013 -0700 Merge pull request #619 from ckamm/req-send-resets Add ZMQ_REQ_SEND_RESETS option. commit 9f4526f59a4252f75639178d11a716a7250065ba Merge: 637f794 39ddc69 Author: Martin Hurton Date: Mon Jul 29 06:11:03 2013 -0700 Merge pull request #621 from hintjens/master Added note to clarify policy for embedded apps commit 39ddc695bc99905382affa4f075f7512851665cf Author: Pieter Hintjens Date: Mon Jul 29 10:42:15 2013 +0200 Added note about tivotisation COPYING.LESSER | 2 ++ 1 file changed, 2 insertions(+) commit f5c59556bd232064230b39c05d858ce69d59ae09 Author: Christian Kamm Date: Mon Jul 29 09:33:10 2013 +0200 REQ: Unset reply_pipe if it terminates. * Fixes a terminate() call on a dangling pointer in the SEND_RESETS case. * Fixes recv_reply_pipe() never receiving a message once the pipe it is waiting on is terminated. src/req.cpp | 15 +++++++++++---- src/req.hpp | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) commit a0cc87a9d922dd3187f07962536ee676033e0ef8 Author: Christian Kamm Date: Sun Jul 21 13:16:47 2013 +0200 Add ZMQ_REQ_SEND_RESETS option. This allows making a new request on a REQ socket by sending a new message. Without the option set, calling send() after the first message is done will continue to return an EFSM error. It's useful for when a REQ is not getting a response. Previously that meant creating a new socket or switching to DEALER. .gitignore | 1 + doc/zmq_setsockopt.txt | 30 ++++++++-- include/zmq.h | 1 + src/req.cpp | 23 ++++++-- src/req.hpp | 7 ++- tests/Makefile.am | 4 +- tests/test_req_send_resets.cpp | 120 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 174 insertions(+), 12 deletions(-) commit 637f79419325952d0b3e63fe09ead81769884785 Merge: 6473dfd b9646f2 Author: Ian Barber Date: Fri Jul 26 15:41:29 2013 -0700 Merge pull request #620 from ckamm/req-id Add ZMQ_REQ_REQUEST_IDS option. commit b9646f2aacf414eb30044a9be3a03d2bd9230c7f Author: Christian Kamm Date: Fri Jul 26 21:13:43 2013 +0200 Add ZMQ_REQ_REQUEST_IDS option. * Documentation: The default behavior of REQ sockets is to rely on the ordering of messages to match requests and responses and that is usually sufficient. When this option is set to 1, the REQ socket will prefix outgoing messages with an extra frame containing a request id. That means the full message is (request id, 0, user frames...). The REQ socket will discard all incoming messages that don't begin with these two frames. * Behavior change: When a REQ socket gets an invalid reply, it used to discard the message and return EAGAIN. REQ sockets still discard invalid messages, but keep looking at the next one automatically until a good one is found or there are no more messages. * Add test_req_request_ids. .gitignore | 1 + doc/zmq_setsockopt.txt | 17 ++++ include/zmq.h | 1 + src/req.cpp | 77 ++++++++++++++--- src/req.hpp | 12 +++ tests/Makefile.am | 4 +- tests/test_req_request_ids.cpp | 179 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 277 insertions(+), 14 deletions(-) commit 6473dfd8f43beaa62b233f30ea839e25caf47382 Merge: 4944095 4a5358f Author: Ian Barber Date: Thu Jul 18 03:26:21 2013 -0700 Merge pull request #617 from hurtonm/zap_updates Zap updates commit 4a5358f4d0f227844b5e66a5724fd4df930b25e1 Author: Martin Hurton Date: Thu Jul 18 10:10:10 2013 +0200 Implement ZAP for NULL mechanism src/null_mechanism.cpp | 155 +++++++++++++++++++++++++++++++++++++++++++++++- src/null_mechanism.hpp | 16 ++++- src/stream_engine.cpp | 3 +- 3 files changed, 169 insertions(+), 5 deletions(-) commit 53bc53da04a4fb2fe666e6607c29d11bec780984 Author: Martin Hurton Date: Thu Jul 18 09:49:42 2013 +0200 Update PLAIN mechanism to the latest ZAP revision src/plain_mechanism.cpp | 31 ++++++++++++++++++++++--------- src/plain_mechanism.hpp | 3 +++ src/stream_engine.cpp | 3 ++- tests/test_security.cpp | 6 +++++- 4 files changed, 32 insertions(+), 11 deletions(-) commit d65231be1ced9f6411427a1be971525e7f19f5e9 Author: Martin Hurton Date: Thu Jul 18 09:39:19 2013 +0200 Update CURVE mechanism to the latest ZAP revision src/curve_server.cpp | 29 ++++++++++++++++++++++------- src/curve_server.hpp | 3 +++ src/stream_engine.cpp | 6 +++++- src/stream_engine.hpp | 2 ++ tests/test_security_curve.cpp | 5 ++++- 5 files changed, 36 insertions(+), 9 deletions(-) commit 7541debe6de46308ada745e08348eb457623acba Author: Martin Hurton Date: Thu Jul 18 09:28:56 2013 +0200 Add get_peer_ip_address utility function The functon returns string representation of peer's IP address. We will need this to update ZAP implementation. src/ip.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ src/ip.hpp | 7 ++++++- 2 files changed, 46 insertions(+), 1 deletion(-) commit 49440952621cdea052e8539aaa0542de42f6759b Merge: 1068bc0 d46c2ee Author: Ian Barber Date: Mon Jul 15 00:15:55 2013 -0700 Merge pull request #615 from hintjens/master Last step in test_spec_req is still failing; disabled it. commit 1068bc0795f11f6dd543997126150758c8f2b8c4 Merge: 4fb004f 409721b Author: Pieter Hintjens Date: Sun Jul 14 14:48:17 2013 -0700 Merge pull request #616 from steve-o/master Add static libraries to CMake, minor housekeeping. commit 409721b9d2657b937d1de6c7eca7111d16c4a125 Author: Steven McCoy Date: Sun Jul 14 13:58:46 2013 -0400 Add CMake support for static libraries. CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 21fe600848a01f4014aa97b04cc301669502db69 Author: Steven McCoy Date: Sun Jul 14 13:36:30 2013 -0400 Move CMake dependencies together. CMakeLists.txt | 6 +- builds/cmake/Modules/FindAsciiDoc.cmake | 24 + builds/cmake/Modules/TestZMQVersion.cmake | 18 + builds/cmake/Modules/ZMQSourceRunChecks.cmake | 129 ++++ builds/cmake/NSIS.template32.in | 952 ++++++++++++++++++++++++ builds/cmake/NSIS.template64.in | 960 +++++++++++++++++++++++++ cmake/Modules/FindAsciiDoc.cmake | 24 - cmake/Modules/TestZMQVersion.cmake | 18 - cmake/Modules/ZMQSourceRunChecks.cmake | 129 ---- cmake/NSIS.template32.in | 952 ------------------------ cmake/NSIS.template64.in | 960 ------------------------- 11 files changed, 2086 insertions(+), 2086 deletions(-) commit ae86c56d74a4cc549629829714ff189369027a29 Author: Steven McCoy Date: Sun Jul 14 13:26:55 2013 -0400 README file moved to GitHub format and extension, drop from packaging and default to NEWS file for popup. CMakeLists.txt | 7 +++---- cmake/NSIS.template32.in | 2 +- cmake/NSIS.template64.in | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) commit d46c2ee2fc566a6ddceae2820a552dbce1c15bff Author: Pieter Hintjens Date: Sun Jul 14 13:04:31 2013 +0200 Disabled last step in test_spec_req so build can complete tests/test_spec_req.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4fb004f59b81a09a8b428409b61baa79b642712d Merge: bccf3d6 7de23c0 Author: Pieter Hintjens Date: Sun Jul 14 03:00:06 2013 -0700 Merge pull request #614 from ckamm/fix-spec-req-fail Fix intermittent failure in test_spec_req. commit 7de23c0c8dafe9305fc89203ff420da9b191d814 Author: Christian Kamm Date: Sun Jul 14 11:55:57 2013 +0200 Fix intermittent failure in test_spec_req. There still is a problem when a stale peer's message arrives at the REQ just after a request was sent to that peer. tests/test_spec_req.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit bccf3d61268b3809cb609e9c9a4ec98575fee179 Merge: 93b9f90 bbc9a61 Author: Pieter Hintjens Date: Sun Jul 14 02:32:20 2013 -0700 Merge pull request #613 from ckamm/coding-style-spec-tests Fix coding style in spec tests. commit 93b9f9021c76c7812adb592bf29d29ad9eed2ac5 Merge: 524bd7a c56d797 Author: Pieter Hintjens Date: Sun Jul 14 02:30:21 2013 -0700 Merge pull request #608 from ckamm/req-drops-unwanted REQ sockets drop replies from unasked peers. commit bbc9a611979aaa62c67eaa768d7f0735d1f53272 Author: Christian Kamm Date: Sun Jul 14 08:32:35 2013 +0200 Fix coding style in spec tests. tests/test_spec_dealer.cpp | 66 +++++++++++++--------------- tests/test_spec_pushpull.cpp | 99 ++++++++++++++++++------------------------ tests/test_spec_rep.cpp | 57 +++++++++++------------- tests/test_spec_req.cpp | 8 ++-- tests/test_spec_router.cpp | 61 ++++++++++++-------------- 5 files changed, 130 insertions(+), 161 deletions(-) commit c56d797bf915e0774646e651dbbce89b8e566f45 Author: Christian Kamm Date: Tue Jul 2 20:05:20 2013 +0200 REQ sockets drop replies from unasked peers. * Add lb_t::sendpipe() that returns the pipe that was used for sending, similar to fq_t::recvpipe(). * Add forwarder functions to dealer_t to access these two. * Add logic to req_t to ignore replies on pipes that are not the one where the request was sent. * Enable test in test_spec_req. AUTHORS | 1 + src/dealer.cpp | 14 ++++++++++++-- src/dealer.hpp | 4 ++++ src/lb.cpp | 10 +++++++++- src/lb.hpp | 7 +++++++ src/req.cpp | 39 +++++++++++++++++++++++++++++++++++---- src/req.hpp | 9 +++++++++ tests/test_spec_req.cpp | 3 +-- 8 files changed, 78 insertions(+), 9 deletions(-) commit 524bd7ac765d33e537ffcf981e7f3d06899a9aca Merge: 7560910 6bf4ffe Author: Pieter Hintjens Date: Sat Jul 13 16:27:41 2013 -0700 Merge pull request #612 from ulikoehler/markdown Converted README to markdown commit 6bf4ffe7270d5079de5760e471595f24acdcc788 Author: Uli Köhler Date: Sun Jul 14 00:55:40 2013 +0200 Converted README to markdown + added travis build img README | 39 --------------------------------------- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 39 deletions(-) commit 7560910f505c06d29191bdff1659133342ceadfa Merge: 5ac1964 0f28b72 Author: Pieter Hintjens Date: Sat Jul 13 10:39:06 2013 -0700 Merge pull request #611 from pijyoi/master update Makefile to include new files commit 0f28b729140900f6dcb7a560e13cbcd85537f2d1 Author: KIU Shueng Chuan Date: Sat Jul 13 14:31:46 2013 +0800 update to include stream.cpp and curve related builds/mingw32/Makefile.mingw32 | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit 5ac19647d9c097a7657d7532f9dfecb16f471e9c Merge: 08622a7 9ca6898 Author: Ian Barber Date: Mon Jul 8 04:12:06 2013 -0700 Merge pull request #610 from hintjens/master Problem: new spec test cases don't all work commit 9ca6898f24d3c5b4b550f7bd5c8882d2aaf4fcc7 Author: Pieter Hintjens Date: Sun Jul 7 12:49:24 2013 +0200 Got new test cases working with libzmq * disabled the specific tests that do not work (yet) on libzmq * cleaned up one source (test_spec_rep.c) but the others need similar work * added sleep in test_spec_rep to allow connects time to happen; this would not be needed if we connected out to the REP peers instead in from them, but I didn't want to change the logic of the test code. .gitignore | 5 +++ tests/test_spec_dealer.cpp | 41 ++++++++---------- tests/test_spec_pushpull.cpp | 3 +- tests/test_spec_req.cpp | 97 +++++++++++++++++++++--------------------- tests/test_spec_router.cpp | 3 +- tests/testutil.hpp | 16 +++---- 6 files changed, 80 insertions(+), 85 deletions(-) commit 08622a7788f6e14cb26eb15e19f90939a0bd7696 Merge: 5038ef7 dfba19c Author: Pieter Hintjens Date: Fri Jul 5 15:36:14 2013 -0700 Merge pull request #609 from ckamm/tests Make pipeline/reqrep tests try tcp:// endpoints. commit dfba19c4b652fb064138f0b3c47b1f27cc8464a8 Author: Christian Kamm Date: Fri Jul 5 17:58:01 2013 +0200 Make pipeline/reqrep tests try tcp:// endpoints. The inproc:// endpoints sometimes use different code paths so testing with regular tcp:// endpoints as well can show different issues. tests/test_spec_dealer.cpp | 98 ++++++++++++++++++------------- tests/test_spec_pushpull.cpp | 132 ++++++++++++++++++++++++++++++------------ tests/test_spec_rep.cpp | 58 ++++++++++++------- tests/test_spec_req.cpp | 78 +++++++++++++++---------- tests/test_spec_router.cpp | 77 ++++++++++++++++-------- tests/testutil.hpp | 11 ++++ 6 files changed, 300 insertions(+), 154 deletions(-) commit 5038ef74b5bc0aa972cce80e085fcaaa64eaa536 Merge: e093bd9 8fd163c Author: Pieter Hintjens Date: Fri Jul 5 08:18:41 2013 -0700 Merge pull request #606 from ckamm/master Add tests for Request-Reply and Pipeline pattern sockets. commit 8fd163cf5c82eaa483a00ca31a8e0b433a696657 Author: Christian Kamm Date: Fri Jul 5 15:20:42 2013 +0200 Add tests for PUSH/PULL sockets. tests/Makefile.am | 4 +- tests/test_spec_pushpull.cpp | 250 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 253 insertions(+), 1 deletion(-) commit e093bd99234b37bb479889a90bcf467a1cb3fdd4 Merge: 78e4791 7b7f7e4 Author: Pieter Hintjens Date: Wed Jul 3 15:43:09 2013 -0700 Merge pull request #607 from cjuniet/master [LIBZMQ-544] Fix compilation errors with Clang commit 7b7f7e4ebdcba8a52cdd76e4cb911ec7c6e7dbf9 Author: Christophe Juniet Date: Wed Jul 3 22:30:48 2013 +0200 Fix compilation warnings on unsigned comparisons. Fix two unsigned comparisons to zero or more being always true. Clang won't compile this with -Werror. src/options.cpp | 4 ++-- src/z85_codec.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 798b394087d27201e3d4a16594ea867bf5eecf08 Author: Christian Kamm Date: Tue Jul 2 15:04:31 2013 +0200 Add tests for Request-Reply pattern sockets. * See http://rfc.zeromq.org/spec:28/REQREP * Not all testable statements are covered. * At this point, there are several failures: - test_spec_req: The REQ socket does not correctly discard messages from peers that are not currently being talked to. - test_spec_dealer/router: On disconnect, the queues seem to not be emptied. The DEALER can still receive a message the disconnected peer sent, the ROUTER can still send to the identity of the dis- connected peer. tests/Makefile.am | 12 ++- tests/test_spec_dealer.cpp | 248 ++++++++++++++++++++++++++++++++++++++++++++ tests/test_spec_rep.cpp | 144 +++++++++++++++++++++++++ tests/test_spec_req.cpp | 230 ++++++++++++++++++++++++++++++++++++++++ tests/test_spec_router.cpp | 180 ++++++++++++++++++++++++++++++++ tests/testutil.hpp | 80 +++++++++++++- 6 files changed, 891 insertions(+), 3 deletions(-) commit 78e47912d2c5dd2795bf45479c0c2552e3f41d14 Merge: 5a30022 9986106 Author: Pieter Hintjens Date: Mon Jul 1 04:41:46 2013 -0700 Merge pull request #605 from ricnewton/master Fix tab/space formatting issue commit 998610602e6c1494131680ca89030663dc62ab0c Author: Richard Newton Date: Mon Jul 1 12:10:57 2013 +0100 Fix tab/space formatting issue tests/test_monitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a30022045eed8eb3b10acb8bae73bcd2b1af2b0 Merge: a3e16c1 f6e972d Author: Ian Barber Date: Mon Jul 1 04:08:25 2013 -0700 Merge pull request #603 from ricnewton/master Add monitor event for when monitoring is stopped so we can unblock any sockets waiting on monitor socket. commit a3e16c18b19102e6a96f9362cbf1fd7429ba8bee Merge: 1cfee8d 01dd6eb Author: Ian Barber Date: Mon Jul 1 04:07:44 2013 -0700 Merge pull request #604 from ricnewton/cmake_fix Fix cmake build commit 01dd6eb1103da9b38c25209ac25295aa82e8386a Author: Richard Newton Date: Mon Jul 1 11:52:39 2013 +0100 Fix cmake build Fix build on windows, uint isn't a standard type, unsigned int is. CMakeLists.txt | 1 + src/z85_codec.hpp | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) commit f6e972d54619935835604e7bb4dd2f86564c2eab Author: Richard Newton Date: Mon Jul 1 10:31:57 2013 +0000 Fix montior tests to handle the monitor stopped event correctly tests/test_monitor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d4d23caf326409a18cb6677dd7225f9d6550b269 Author: Richard Newton Date: Mon Jul 1 11:00:46 2013 +0100 Add new socket monitor event for when socket monitoring is stopped. include/zmq.h | 4 +++- src/socket_base.cpp | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 1cfee8d1e79264e783b1ce2e48120eb8bc4ffc5b Merge: 2a4aef9 4671108 Author: Pieter Hintjens Date: Mon Jul 1 02:14:07 2013 -0700 Merge pull request #601 from leewoosung/hotfixes/patched [LIBZMQ-541] pub socket sending fail issue commit 2a4aef9223bb8c6b101a882f2d9182666852cd07 Merge: 58b1082 783bb89 Author: Pieter Hintjens Date: Mon Jul 1 02:06:29 2013 -0700 Merge pull request #602 from hurtonm/master Implement socket type checking commit 783bb890a9c7184b8c8acfe7aad6a75fdd60001a Author: Martin Hurton Date: Mon Jul 1 10:04:54 2013 +0200 Check socket types during mechanism handshake src/curve_client.cpp | 9 --------- src/curve_client.hpp | 3 --- src/curve_server.cpp | 9 --------- src/curve_server.hpp | 3 --- src/mechanism.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++---- src/mechanism.hpp | 4 ++++ src/null_mechanism.cpp | 9 --------- src/null_mechanism.hpp | 4 ---- src/plain_mechanism.cpp | 9 --------- src/plain_mechanism.hpp | 5 ----- tests/test_raw_sock.cpp | 2 +- tests/test_stream.cpp | 4 ++-- 12 files changed, 51 insertions(+), 58 deletions(-) commit 4671108e571b442e5565c399c42d5e7c8f48bde8 Author: ganesh.vr Date: Mon Jul 1 15:57:06 2013 +0900 LIBZMQ-541 issue fix src/dist.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 58b1082467ffd7af3294052d921bd097136a4399 Merge: 11947b1 afe9afa Author: Pieter Hintjens Date: Sat Jun 29 23:56:04 2013 -0700 Merge pull request #600 from hurtonm/master Set socket buffers before establishing TCP connection commit afe9afa2a54f092327af62ce23a50547ab94e513 Author: Martin Hurton Date: Sun Jun 30 06:41:36 2013 +0200 Set socket buffers before establishing TCP connection The window scale option carried in SYN segment is computed from socket's receive buffer size. So we need to set this buffer size before calling connect or bind. src/stream_engine.cpp | 19 ------------------- src/tcp.cpp | 22 ++++++++++++++++++++++ src/tcp.hpp | 6 ++++++ src/tcp_connecter.cpp | 6 ++++++ src/tcp_listener.cpp | 6 ++++++ 5 files changed, 40 insertions(+), 19 deletions(-) commit 11947b1ccb8002ee715b791ded6a7f2d14bfbfe9 Merge: a71d64a c9bdb89 Author: Ian Barber Date: Sat Jun 29 09:36:50 2013 -0700 Merge pull request #597 from hintjens/master Problem: working with binary keys is painful commit a71d64ab95880bd01f9d49abe8025e3e1a9c6243 Merge: 7460d00 aef2171 Author: Ian Barber Date: Sat Jun 29 09:34:47 2013 -0700 Merge pull request #599 from hurtonm/master Minor code refactoring commit aef2171e8390864d484186265ba8f7237d0d368c Author: Martin Hurton Date: Sat Jun 29 17:24:30 2013 +0200 Make last_endpoint attribute of socket object src/options.cpp | 8 -------- src/options.hpp | 3 --- src/socket_base.cpp | 20 +++++++++++++++----- src/socket_base.hpp | 3 +++ 4 files changed, 18 insertions(+), 16 deletions(-) commit c9bdb893f8fd9705a79ecdeabb2e7e1a39f35816 Author: Martin Hurton Date: Sat Jun 29 11:24:46 2013 +0200 Use generic session class whenever possible src/dealer.cpp | 12 ------------ src/dealer.hpp | 15 --------------- src/pair.cpp | 12 ------------ src/pair.hpp | 15 --------------- src/pub.cpp | 12 ------------ src/pub.hpp | 15 --------------- src/pull.cpp | 12 ------------ src/pull.hpp | 15 --------------- src/push.cpp | 12 ------------ src/push.hpp | 15 --------------- src/rep.cpp | 12 ------------ src/rep.hpp | 15 --------------- src/req.cpp | 8 ++++---- src/req.hpp | 2 +- src/router.cpp | 12 ------------ src/router.hpp | 15 --------------- src/session_base.cpp | 43 +------------------------------------------ src/stream.cpp | 12 ------------ src/stream.hpp | 15 --------------- src/sub.cpp | 12 ------------ src/sub.hpp | 15 --------------- src/xpub.cpp | 12 ------------ src/xpub.hpp | 15 --------------- src/xsub.cpp | 12 ------------ src/xsub.hpp | 15 --------------- 25 files changed, 6 insertions(+), 344 deletions(-) commit 7460d00bacadf8df1c173daca28ebc3ec197543c Merge: 1beec5e fd7e9b8 Author: Pieter Hintjens Date: Sat Jun 29 02:36:30 2013 -0700 Merge pull request #598 from hurtonm/master Use generic session class whenever possible commit fd7e9b8c4637679a9fe2a142771f7f977120df4a Author: Martin Hurton Date: Sat Jun 29 11:24:46 2013 +0200 Use generic session class whenever possible src/dealer.cpp | 12 ------------ src/dealer.hpp | 15 --------------- src/pair.cpp | 12 ------------ src/pair.hpp | 15 --------------- src/pub.cpp | 12 ------------ src/pub.hpp | 15 --------------- src/pull.cpp | 12 ------------ src/pull.hpp | 15 --------------- src/push.cpp | 12 ------------ src/push.hpp | 15 --------------- src/rep.cpp | 12 ------------ src/rep.hpp | 15 --------------- src/req.cpp | 8 ++++---- src/req.hpp | 2 +- src/router.cpp | 12 ------------ src/router.hpp | 15 --------------- src/session_base.cpp | 43 +------------------------------------------ src/stream.cpp | 12 ------------ src/stream.hpp | 15 --------------- src/sub.cpp | 12 ------------ src/sub.hpp | 15 --------------- src/xpub.cpp | 12 ------------ src/xpub.hpp | 15 --------------- src/xsub.cpp | 12 ------------ src/xsub.hpp | 15 --------------- 25 files changed, 6 insertions(+), 344 deletions(-) commit 70417701089e5918452996d7cbe48c89e35a39e0 Author: Pieter Hintjens Date: Fri Jun 28 22:10:22 2013 +0200 Added Z85 support The use of binary for CURVE keys is painful; you cannot easily copy these in e.g. email, or use them directly in source code. There are various encoding possibilities. Base16 and Base64 are not optimal. Ascii85 is not safe for source (it generates quotes and escapes). So, I've designed a new Base85 encoding, Z85, which is safe to use in code and elsewhere, and I've modified libzmq to use this where it also uses binary keys (in get/setsockopt). Very simply, if you use a 32-byte value, it's Base256 (binary), and if you use a 40-byte value, it's Base85 (Z85). I've put the Z85 codec into z85_codec.hpp, it's not elegant C++ but it is minimal and it works. Feel free to rewrap as a real class if this annoys you. Makefile.am | 6 +-- configure.ac | 12 +++-- doc/zmq_curve.txt | 36 +++++++++++--- doc/zmq_getsockopt.txt | 58 +++++++++++++++++++--- doc/zmq_setsockopt.txt | 32 +++++++----- src/Makefile.am | 1 + src/options.cpp | 39 ++++++++++++++- src/options.hpp | 5 +- src/z85_codec.hpp | 108 +++++++++++++++++++++++++++++++++++++++++ tests/test_security_curve.cpp | 55 +++++++-------------- tools/Makefile.am | 1 + tools/curve_keygen.c | 40 +++++++++++---- tools/z85_codec.h | 108 +++++++++++++++++++++++++++++++++++++++++ 13 files changed, 418 insertions(+), 83 deletions(-) commit 1beec5e960646eead85df5a91e1e9b986af0ce28 Merge: ba1ae7d 76df045 Author: Martin Hurton Date: Fri Jun 28 05:05:54 2013 -0700 Merge pull request #596 from hintjens/master Problem: mechanisms are lagging behind specs commit 76df0459503de64fe5fabb916420faeed2ca667c Author: Pieter Hintjens Date: Fri Jun 28 12:04:01 2013 +0200 Return EINVAL when trying to use CURVE without libsodium src/options.cpp | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) commit 357a9c45fbfb195a23ad42365153c279c49ea8d9 Author: Martin Hurton Date: Fri Jun 28 11:24:14 2013 +0200 Simplify ZMQ_STREAM socket implementation, part II src/stream.cpp | 57 ++++++++++++++++++++------------------------------------ src/stream.hpp | 3 --- 2 files changed, 20 insertions(+), 40 deletions(-) commit 7832addd202a20f65e218d74df6621147c7b8eb9 Author: Pieter Hintjens Date: Fri Jun 28 11:42:54 2013 +0200 Updated security mechanisms to use variable-length commands RFC23, RFC24, RFC26 now use variable-length command names that end in null octet (valid C strings) instead of fixed-length space padded strings. src/curve_client.cpp | 32 +++++------ src/curve_server.cpp | 34 +++++------ src/mechanism.cpp | 2 +- src/null_mechanism.cpp | 10 ++-- src/plain_mechanism.cpp | 12 ++-- tests/Makefile.am | 2 +- tests/test_raw_sock.cpp | 19 +++--- tests/test_security.cpp | 128 +++++++++++------------------------------ tests/test_security_curve.cpp | 105 ++++++++------------------------- tests/test_stream.cpp | 19 +++--- tests/testutil.hpp | 32 +++++++++++ 11 files changed, 153 insertions(+), 242 deletions(-) commit ba1ae7d639aa07bec60687bb70ff99c1a1f753d5 Merge: fe2753d 7b27c12 Author: Pieter Hintjens Date: Fri Jun 28 02:28:23 2013 -0700 Merge pull request #595 from hurtonm/master Another ZMQ_STREAM simplification commit 7b27c125dc3025fe16b1f259695f7bbaa78ee9f0 Author: Martin Hurton Date: Fri Jun 28 11:24:14 2013 +0200 Simplify ZMQ_STREAM socket implementation, part II src/stream.cpp | 57 ++++++++++++++++++++------------------------------------ src/stream.hpp | 3 --- 2 files changed, 20 insertions(+), 40 deletions(-) commit dd14d4e01b5188d89fa45d0c8189cf550b22d1ae Author: Pieter Hintjens Date: Fri Jun 28 10:16:50 2013 +0200 Minor whitespace fixes in man page doc/zmq_setsockopt.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c4ae74f8161b3f68f5933993bc89acc9209d4ced Author: Pieter Hintjens Date: Fri Jun 28 09:41:05 2013 +0200 Fixed zmq_errno function definition src/zmq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe2753da0af6df9931f164aedd04d9d37ebb7f66 Merge: d8f1376 a1bb5e8 Author: Pieter Hintjens Date: Fri Jun 28 01:15:02 2013 -0700 Merge pull request #594 from hurtonm/master Simplify ZMQ_STREAM socket implementation commit a1bb5e83ffd837e9d074bf727152d62583e7a516 Author: Martin Hurton Date: Fri Jun 28 09:08:54 2013 +0200 Simplify ZMQ_STREAM socket implementation src/stream.cpp | 87 +++++++++++++------------------------------------------- src/stream.hpp | 18 ++---------- 2 files changed, 22 insertions(+), 83 deletions(-) commit d8f13760083bd5ae302dd8c38af9c4cd6ac4b1d3 Merge: 4a4d222 ad77937 Author: Martin Hurton Date: Thu Jun 27 14:09:04 2013 -0700 Merge pull request #593 from hintjens/master Problem: ROUTER+RAW was not a clean API commit ad7793795692e93595f01e12773467fb9270e9ec Author: Pieter Hintjens Date: Thu Jun 27 20:47:34 2013 +0200 Added ZMQ_STREAM socket type - designed for TCP clients and servers - added HTTP client / server example in tests/test_stream.cpp - same as ZMQ_ROUTER + ZMQ_ROUTER_RAW + ZMQ_ROUTER_MANDATORY - includes b893ce set ZMQ_IDENTITY on outgoing connect - deprecates ZMQ_ROUTER_RAW .gitignore | 2 + doc/zmq_msg_send.txt | 2 + doc/zmq_send.txt | 2 + doc/zmq_sendmsg.txt | 2 + doc/zmq_setsockopt.txt | 2 + doc/zmq_socket.txt | 42 +++++- include/zmq.h | 1 + src/Makefile.am | 2 + src/mechanism.cpp | 4 +- src/router.cpp | 7 +- src/session_base.cpp | 5 + src/socket_base.cpp | 4 + src/stream.cpp | 335 ++++++++++++++++++++++++++++++++++++++++++++++++ src/stream.hpp | 127 ++++++++++++++++++ tests/Makefile.am | 9 +- tests/test_stream.cpp | 228 ++++++++++++++++++++++++++++++++ 16 files changed, 763 insertions(+), 11 deletions(-) commit 4a4d222ec45c10da66c9514713d3959c31b44709 Merge: e9d11c6 b893ce2 Author: Pieter Hintjens Date: Sun Jun 23 23:29:44 2013 -0700 Merge pull request #592 from gavinmcniff/master Store identity for raw socket commit b893ce250301b408d040c75933993cd85560b1ce Author: Gavin Date: Sun Jun 23 18:16:33 2013 +0100 Store identity for raw socket Identity stored during connect procedure. Can be read using zmq_getsockopt and used as the identity frame when sending messages. This allows the implementation of a raw socket client. src/router.cpp | 3 +++ 1 file changed, 3 insertions(+) commit e9d11c6611f76ad5aebddeaf7ca73a04d6b7d65d Merge: ec943ac b12be41 Author: Ian Barber Date: Sun Jun 23 01:07:59 2013 -0700 Merge pull request #591 from hurtonm/master Rename parse_properties to parse_metadata commit b12be41736ee4bc1e2137a8553f8183f9b60514d Author: Martin Hurton Date: Sun Jun 23 08:52:27 2013 +0200 Rename parse_properties to parse_metadata src/curve_client.cpp | 4 ++-- src/curve_server.cpp | 4 ++-- src/mechanism.cpp | 4 ++-- src/mechanism.hpp | 10 ++++++---- src/null_mechanism.cpp | 2 +- src/plain_mechanism.cpp | 4 ++-- 6 files changed, 15 insertions(+), 13 deletions(-) commit ec943ac5de7a7572b84b75f41c0ba6ae2bccebb7 Merge: 19cf076 99d4974 Author: Ian Barber Date: Sat Jun 22 14:19:02 2013 -0700 Merge pull request #590 from hurtonm/master Refactor how properties are parsed commit 99d4974580bb6c77c0eccf5f92afe81f761e801d Author: Martin Hurton Date: Sat Jun 22 19:02:08 2013 +0200 Refactor how properties are parsed src/curve_client.cpp | 43 +++++------------------------------ src/curve_client.hpp | 3 ++- src/curve_server.cpp | 43 +++++------------------------------ src/curve_server.hpp | 4 +++- src/mechanism.cpp | 50 +++++++++++++++++++++++++++++++++++++++++ src/mechanism.hpp | 14 ++++++++++++ src/null_mechanism.cpp | 57 +++++++++++++---------------------------------- src/null_mechanism.hpp | 4 ++++ src/plain_mechanism.cpp | 43 +++++------------------------------ src/plain_mechanism.hpp | 7 ++++-- 10 files changed, 112 insertions(+), 156 deletions(-) commit 19cf076f8c79ec511a0859d0a50b92c65a747615 Merge: 73e1952 13df8e6 Author: Martin Hurton Date: Sat Jun 22 08:28:03 2013 -0700 Merge pull request #589 from ianbarber/master Add test for CURVE mechanism commit 13df8e6546d85d5308657d6475bd3a867b181e70 Merge: 211bf2b 73e1952 Author: Ian Barber Date: Sat Jun 22 16:19:26 2013 +0100 Merge branch 'master' of git://github.com/zeromq/libzmq commit 211bf2b08e312a7f9ae1e165085f79788854df0c Author: Ian Barber Date: Sat Jun 22 16:17:25 2013 +0100 Added security curve test Test is skipped if no libsodium. Added warning if libsodium not configured configure.ac | 2 +- tests/Makefile.am | 2 + tests/test_security_curve.cpp | 224 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 227 insertions(+), 1 deletion(-) commit 73e195279ae201f99b38c4afcba86c5663c0eea4 Merge: 2bf5124 084e879 Author: Pieter Hintjens Date: Sat Jun 22 07:25:26 2013 -0700 Merge pull request #588 from hurtonm/master Small code cleanup commit 084e8792de2115e08a5d6bb84d176e4fe8302066 Author: Martin Hurton Date: Sat Jun 22 13:40:32 2013 +0200 Small cleanup in pipe.cpp src/pipe.cpp | 20 ++++++++------------ src/pipe.hpp | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) commit 2bf51247feeb02276eddb325883a993e740bfb7f Merge: 8bb79b5 fa0f0e2 Author: Ian Barber Date: Sat Jun 22 07:14:28 2013 -0700 Merge pull request #587 from hurtonm/master Make ZAP optional for CURVE mechanism commit fa0f0e21b82808383e549d872a52a1b7de7e2f37 Author: Martin Hurton Date: Sat Jun 22 16:05:34 2013 +0200 Make ZAP optional for PLAIN mechanism src/plain_mechanism.cpp | 141 ++++++++++++++++++++++++----------------------- src/plain_mechanism.hpp | 6 ++ 2 files changed, 78 insertions(+), 69 deletions(-) commit 8bb79b5eb1fabfd5e430fc09a29a35c661feb053 Merge: acaaaa5 5975e00 Author: Pieter Hintjens Date: Sat Jun 22 06:42:26 2013 -0700 Merge pull request #586 from hurtonm/master Make ZAP optional for CURVE mechanism commit 5975e00fd1bedfcdd99664baf52fffcc7982120a Author: Martin Hurton Date: Sat Jun 22 15:33:44 2013 +0200 Make ZAP optional for CURVE mechanism src/curve_server.cpp | 42 ++++++++++++++++-------------------------- src/curve_server.hpp | 5 ++++- 2 files changed, 20 insertions(+), 27 deletions(-) commit acaaaa53517cbe6f5f20b424e41a65a8240bbc5e Merge: 675bd46 fadfcac Author: Ian Barber Date: Sat Jun 22 05:19:01 2013 -0700 Merge pull request #585 from hintjens/master Problem: allows CURVE security even if libzmq was built without libsodium commit fadfcac1dec8e3b36bf1498b0d38f818e8d233e7 Author: Pieter Hintjens Date: Sat Jun 22 13:50:22 2013 +0200 Fixed compile error, needed unistd.h tests/test_monitor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ea06883c0694486324ed9a7adc2fba4334987f7 Author: Pieter Hintjens Date: Sat Jun 22 13:39:20 2013 +0200 Fixed spelling in comments src/lb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb43d5a0fef8349b49a573a9fc82aea4f62c95f7 Author: Pieter Hintjens Date: Sat Jun 22 13:39:02 2013 +0200 Whitespace fix to man page doc/zmq_setsockopt.txt | 1 + 1 file changed, 1 insertion(+) commit f4848ddb32612be96eba308c3e7e3361c4c33f98 Author: Pieter Hintjens Date: Sat Jun 22 13:38:14 2013 +0200 Prints message and exits if app tries to use CURVE without libsodium src/options.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 675bd4640bf3646b4d8420984681948e7556d33f Merge: 9eb2521 1b86324 Author: Pieter Hintjens Date: Sat Jun 22 04:18:27 2013 -0700 Merge pull request #584 from hurtonm/master Fix test_disconnect_inproc to work on ILP64 systems commit 1b86324396fcbe77455645d2a39f5c5b696beaed Author: Martin Hurton Date: Sat Jun 22 13:00:33 2013 +0200 Fix test_disconnect_inproc to work on ILP64 systems tests/test_disconnect_inproc.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9eb2521537ed1fec2f7be0740b0817802e19c1a9 Merge: 91bc740 694543e Author: Pieter Hintjens Date: Sat Jun 22 03:25:44 2013 -0700 Merge pull request #583 from ianbarber/master Small stream engine issue and test_monitor tidy up commit 694543e3a20f2e6763b12c8930d6351da2c7be45 Merge: f4c51db 91bc740 Author: Ian Barber Date: Sat Jun 22 10:59:16 2013 +0100 Merge branch 'master' of git://github.com/zeromq/libzmq commit f4c51db842f78182a4b0392c96cd706251c770e9 Author: Ian Barber Date: Sat Jun 22 10:58:16 2013 +0100 Fix small streamengine issue w/ term and handshake Also tidy up monitor test a little. src/stream_engine.cpp | 6 ++++++ tests/test_monitor.cpp | 23 +++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) commit 91bc74089ff0655966c6adf566b67796ab12b5ab Merge: c9638fc 8af208f Author: Pieter Hintjens Date: Sat Jun 22 02:57:34 2013 -0700 Merge pull request #582 from hurtonm/master Implement CurveZMQ message encryption and authentication commit 8af208fab7388c1ee37daaf4403d73a887eeb71f Author: Martin Hurton Date: Sat Jun 22 11:48:33 2013 +0200 Implement ZMTP/3.0 CURVE mechanism src/stream_engine.cpp | 57 +++++++++++++++++++++++++++++++++++++++++++++++-- src/stream_engine.hpp | 4 ++++ 2 files changed, 59 insertions(+), 2 deletions(-) commit e4a211870c43d9a8c96ad16c8b751b37a3cfa53d Author: Martin Hurton Date: Sat Jun 22 11:46:40 2013 +0200 Implement CurveZMQ message encryption and authentication src/curve_client.cpp | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/curve_client.hpp | 2 + src/curve_server.cpp | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/curve_server.hpp | 2 + src/mechanism.hpp | 4 ++ 5 files changed, 222 insertions(+) commit c9638fceb4886f13a6aeb7db7bdc521ab923a132 Merge: c5078ea 8c0ded5 Author: Martin Hurton Date: Sat Jun 22 02:12:39 2013 -0700 Merge pull request #581 from hintjens/master Problem: code isn't setting mechanism to CURVE properly commit 8c0ded5076d9f5afe7c272d0dcd17316af7c66d8 Author: Pieter Hintjens Date: Sat Jun 22 11:05:01 2013 +0200 Properly set mechanism to CURVE when setting a curve option src/options.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit c5078ea1b8123f74bcd9361bc52c650c7855eea5 Merge: 92b02b9 20a7978 Author: Ian Barber Date: Sat Jun 22 01:08:35 2013 -0700 Merge pull request #580 from hurtonm/master Stop ZMTP handshake when an unexpected message comes commit 20a7978d679c653eb58e67753f66feb19e55c001 Author: Martin Hurton Date: Sat Jun 22 08:11:55 2013 +0200 Stop ZMTP handshake when an unexpected message comes src/curve_client.cpp | 3 ++- src/curve_server.cpp | 2 +- src/plain_mechanism.cpp | 3 ++- src/stream_engine.cpp | 2 -- 4 files changed, 5 insertions(+), 5 deletions(-) commit 92b02b98cd3d08378033eac6cb9ea347b20e8fbd Merge: 1fe7820 cabf4e6 Author: Pieter Hintjens Date: Fri Jun 21 09:00:18 2013 -0700 Merge pull request #579 from ianbarber/master Clean up socket_type_string commit cabf4e658f2e4ad4d18377b53566d3a4a353c274 Author: Ian Barber Date: Fri Jun 21 16:56:45 2013 +0100 Comments to clarify the socket name function src/mechanism.hpp | 2 ++ src/stream_engine.hpp | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1fe7820629f5f8bf5441ddf810901060984da797 Merge: c5a9fa5 10f69c1 Author: Ian Barber Date: Thu Jun 20 11:09:20 2013 -0700 Merge pull request #577 from hintjens/master API for CURVE configuration commit c5a9fa5b5e56ede6c794e8ca6b2bd0cab27f665d Merge: 65c84ab 3b355fe Author: Pieter Hintjens Date: Thu Jun 20 09:47:22 2013 -0700 Merge pull request #578 from gonzus/master Changes to sanity tag in ctx commit 3b355fec9ac5825ccd5b241aa3e4fbdbbfb989a9 Author: Gonzalo Diethelm Date: Thu Jun 20 12:43:32 2013 -0400 Introduced private constants for the context sanity tag values. Ignored more MSVC intermmediate files. .gitignore | 2 +- src/ctx.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) commit 10f69c1500af39e7405b8a07b16be11c01827d70 Author: Pieter Hintjens Date: Thu Jun 20 18:30:30 2013 +0200 Clarified man pages on mixed security doc/zmq_curve.txt | 13 ++++++++----- doc/zmq_setsockopt.txt | 6 ++++-- 2 files changed, 12 insertions(+), 7 deletions(-) commit d9bb16725ebe52faa3655ddd39cf2b8d0c82d0a3 Author: Pieter Hintjens Date: Thu Jun 20 18:09:12 2013 +0200 Added options for CURVE security - ZMQ_CURVE_PUBLICKEY for clients and servers - ZMQ_CURVE_SECRETKEY for clients - ZMQ_CURVE_SERVERKEY for clients - ZMQ_CURVE_SERVER for servers - added tools/curve_keygen.c as example - updated man pages .gitignore | 2 ++ doc/zmq.txt | 6 ++-- doc/zmq_curve.txt | 41 ++++++++++++++++++++++------ doc/zmq_setsockopt.txt | 71 +++++++++++++++++++++++++++++++++++++++++++----- include/zmq.h | 9 +++--- src/curve_client.cpp | 11 ++------ src/curve_server.cpp | 3 +- src/options.cpp | 57 ++++++++++++++++++++++++++++++++++++++ src/options.hpp | 15 +++++----- tools/curve_keygen.c | 47 ++++++++++++++++++++++++++++++++ 10 files changed, 222 insertions(+), 40 deletions(-) commit 65c84abdb538de24de4cfa9dac7b4db789a0787e Merge: 9273022 37b99c0 Author: Pieter Hintjens Date: Thu Jun 20 05:27:49 2013 -0700 Merge pull request #576 from hurtonm/zmtp_curve Implement ZMTP/3.0 CURVE handshake commit 37b99c0b4b706437e4298de7440c681b1b6ff218 Author: Martin Hurton Date: Tue Jun 18 23:38:24 2013 +0200 Implement ZMTP/3.0 CURVE handshake CMakeLists.txt | 2 + src/Makefile.am | 4 + src/curve_client.cpp | 344 +++++++++++++++++++++++++++++++ src/curve_client.hpp | 109 ++++++++++ src/curve_server.cpp | 547 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/curve_server.hpp | 113 +++++++++++ src/options.hpp | 9 + 7 files changed, 1128 insertions(+) commit 927302226096c6cbbc2fec28d1e293588f35887d Merge: 1195092 9bd8d9a Author: Pieter Hintjens Date: Mon Jun 17 06:38:33 2013 -0700 Merge pull request #575 from murphybytes/master Missing files in cmake generated build. commit 9bd8d9a7269c0a04704e4dda978d1486a759b1b9 Author: John Murphy Date: Sun Jun 16 18:42:51 2013 -0500 added missing files required to build CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) commit 1195092c61befa2fceb9d16780a4570ec3f9f4a7 Merge: 5c54bc3 3832792 Author: Ian Barber Date: Sat Jun 15 01:27:38 2013 -0700 Merge pull request #574 from pijyoi/master fix memory leak in ipc_listener wildcard commit 38327927ceda89422ae32f9223f40a0532f60b57 Author: xinchuan Date: Sat Jun 15 16:11:50 2013 +0800 fix memory leak in tempnam() usage src/ipc_listener.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 5c54bc358e8d6fb1f4bc5bfc4ef64c26b84b2a4f Merge: 6b8569d 627190c Author: Pieter Hintjens Date: Mon Jun 10 03:34:23 2013 -0700 Merge pull request #573 from shripchenko/master another iteration on ZMQ_PROBE_ROUTER commit 627190c8bee128032d74ce27e218e28323b535fd Author: shripchenko Date: Mon Jun 10 02:31:00 2013 -0700 another iteration on ZMQ_PROBE_ROUTER now it properly works for ROUTER src/dealer.cpp | 4 ++-- src/router.cpp | 29 +++++++++++++---------------- tests/test_probe_router.cpp | 4 +--- 3 files changed, 16 insertions(+), 21 deletions(-) commit 6b8569d78abb16f764cf366bbe62cfbc61d1c226 Merge: 210fcbb 6ff51ee Author: Martin Hurton Date: Fri Jun 7 07:33:25 2013 -0700 Merge pull request #572 from hintjens/master Updated ZAP PLAIN request to follow latest draft commit 6ff51ee909fd3389f038ac5b1767a4a88716f3a6 Author: Pieter Hintjens Date: Fri Jun 7 15:50:36 2013 +0200 Updated ZAP request for changed protocol draft - username and password sent as two string frames - fixed test case to match src/plain_mechanism.cpp | 21 ++++++++++--------- tests/test_security.cpp | 51 +++++++++++++++++++---------------------------- 2 files changed, 32 insertions(+), 40 deletions(-) commit 656ff5b208bbb06335b7b32453d054d7f668636e Author: Pieter Hintjens Date: Fri Jun 7 13:28:47 2013 +0200 Small fixes to documentation - REQ and REP sockets don't have HWM issues - ZMQ_DONTWAIT applies to DEALER and PUSH only doc/zmq_msg_send.txt | 7 ++++--- doc/zmq_send.txt | 7 ++++--- doc/zmq_sendmsg.txt | 7 ++++--- doc/zmq_socket.txt | 20 ++++---------------- 4 files changed, 16 insertions(+), 25 deletions(-) commit 210fcbbbeb927a63271374a60ed7923b2db158d0 Merge: 7a43c02 2928c91 Author: Ian Barber Date: Thu Jun 6 04:41:55 2013 -0700 Merge pull request #571 from hurtonm/master Add ZAP support commit 2928c91a6dba5ba19f5e481ead40c00100169aed Author: Martin Hurton Date: Thu Jun 6 13:13:10 2013 +0200 Implement ZAP and integrate it with PLAIN mechanism src/i_engine.hpp | 2 + src/mechanism.hpp | 3 + src/pgm_receiver.hpp | 1 + src/pgm_sender.hpp | 1 + src/plain_mechanism.cpp | 152 ++++++++++++++++++++++++++++++++++++++++++++--- src/plain_mechanism.hpp | 9 ++- src/session_base.cpp | 143 +++++++++++++++++++++++++++++++++++++------- src/session_base.hpp | 15 +++++ src/stream_engine.cpp | 48 ++++++++------- src/stream_engine.hpp | 8 +-- tests/test_security.cpp | 131 ++++++++++++++++++++++++++++++++++++++++ 11 files changed, 458 insertions(+), 55 deletions(-) commit 4e47084dd4ca9244158c2d55b2e6e315ee23dfc4 Author: Martin Hurton Date: Thu Jun 6 11:00:41 2013 +0200 Minor cleanups src/pipe.cpp | 2 +- src/plain_mechanism.cpp | 17 ++++++++--------- src/session_base.cpp | 8 ++++---- src/session_base.hpp | 4 ++-- 4 files changed, 15 insertions(+), 16 deletions(-) commit c3e40736ded9c96981ddd2e399cd1b43c9f5980f Author: Martin Hurton Date: Tue May 28 16:49:24 2013 +0200 Rename terminated->pipe_terminated src/dealer.cpp | 6 +++--- src/dealer.hpp | 2 +- src/dist.cpp | 2 +- src/dist.hpp | 2 +- src/fq.cpp | 2 +- src/fq.hpp | 2 +- src/lb.cpp | 2 +- src/lb.hpp | 2 +- src/pair.cpp | 2 +- src/pair.hpp | 2 +- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/pull.cpp | 4 ++-- src/pull.hpp | 2 +- src/push.cpp | 4 ++-- src/push.hpp | 2 +- src/router.cpp | 4 ++-- src/router.hpp | 2 +- src/session_base.cpp | 2 +- src/session_base.hpp | 2 +- src/socket_base.cpp | 4 ++-- src/socket_base.hpp | 4 ++-- src/xpub.cpp | 4 ++-- src/xpub.hpp | 2 +- src/xsub.cpp | 6 +++--- src/xsub.hpp | 2 +- 26 files changed, 36 insertions(+), 36 deletions(-) commit 7a43c02aaf331e3821fdf15841798ca5512d9e65 Merge: d5f6036 a9679da Author: Ian Barber Date: Thu Jun 6 01:18:37 2013 -0700 Merge pull request #570 from hintjens/master Packaging of probe function commit a9679da764a279b368603b9160c0f81a419c2160 Author: Pieter Hintjens Date: Wed Jun 5 15:55:15 2013 +0200 Packaging on ZMQ_PROBE_ROUTER - renamed to ZMQ_PROBE_ROUTER .gitignore | 2 +- doc/zmq_setsockopt.txt | 14 ++++---- include/zmq.h | 2 +- src/dealer.cpp | 14 ++++---- src/dealer.hpp | 4 +-- src/router.cpp | 16 ++++----- src/router.hpp | 4 +-- tests/Makefile.am | 4 +-- tests/test_probe_router.cpp | 77 +++++++++++++++++++++++++++++++++++++++++++ tests/test_router_probe.cpp | 75 ----------------------------------------- 10 files changed, 105 insertions(+), 107 deletions(-) commit 2344131db3800e95a05e3ed11ca0e31aed468166 Author: Pieter Hintjens Date: Wed Jun 5 15:25:52 2013 +0200 Packaging of ZMQ_PROBE - Cleaned up man page a little - Wrote test case tests/test_router_probe.cpp .gitignore | 1 + doc/zmq_setsockopt.txt | 26 ++++++++------- tests/Makefile.am | 2 ++ tests/test_router_probe.cpp | 75 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 12 deletions(-) commit dbd58f8e151681dfe210af93be3e2b72c10dc40f Author: Pieter Hintjens Date: Wed Jun 5 12:42:25 2013 +0200 Fixed out-of-date reference doc/zmq_socket.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c980e17dd6f83bc01f9b4442fe90d53e9562850 Author: shripchenko Date: Fri May 24 07:09:53 2013 -0700 changed option name. +documentation changes doc/zmq_setsockopt.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 97324398a7d647c3a2cdba7597db2b8057c60c30 Author: shripchenko Date: Thu May 23 01:49:40 2013 -0700 refactored ZMQ_ROUTER_ANNOUNCE_SELF code. renamed it to ZMQ_PROBE_NEW_PEERS. implement it for DEALER tocket. +documentation doc/zmq_setsockopt.txt | 10 ++++------ src/dealer.cpp | 6 +++--- src/router.cpp | 7 +++++-- 3 files changed, 12 insertions(+), 11 deletions(-) commit d5f603690f48c219c35419726f796a9ceb4de369 Merge: d1f011d 42ab0e8 Author: Pieter Hintjens Date: Sat Jun 1 01:08:48 2013 -0700 Merge pull request #569 from jpoliv/master Make "./configure --with-system-pgm" detect the OpenPGM 5.2 system library. commit 42ab0e82176f98aa80bed1e874dd36b72bc314b4 Author: Jose Pedro Oliveira Date: Sat Jun 1 03:39:40 2013 +0100 Make ./configure --with-system-pgm detect the OpenPGM 5.2 system library. Note that OpenPGM installs a versioned pkgconfig file (openpgm-5.2.pc, openpgm-5.1.pc). configure.ac | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit d1f011d7e5087649b51e0e6dde9c8e8832e7ea86 Merge: 6caa173 43d0497 Author: Pieter Hintjens Date: Fri May 31 16:14:02 2013 -0700 Merge pull request #568 from jmgao/patch-2 Fold constant expression into constant. commit 43d049741f86a2385d7743d6065336d971c73118 Author: Josh Gao Date: Fri May 31 13:22:51 2013 -0700 Fix mistaken use of xor in "2^31 - 1". src/mechanism.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6caa17373b766a002e32906c6cacea0f743114a2 Merge: 240eff3 9a0b2c8 Author: Pieter Hintjens Date: Wed May 29 14:13:13 2013 -0700 Merge pull request #567 from ianbarber/master Fixed memory leak in stream engine commit 9a0b2c897039b6fa35287e065b3803104b622ac2 Author: Ian Barber Date: Wed May 29 21:58:20 2013 +0100 Pieter's change to fix memory leak on mechanism src/stream_engine.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 240eff384aa924e366c1709f41b9afa94d0d7890 Merge: 9d63ebf f805e4d Author: Pieter Hintjens Date: Wed May 29 09:03:54 2013 -0700 Merge pull request #563 from shripchenko/master Refactoring of 'ZMQ_ROUTER_ANNOUNCE_SELF' commit 9d63ebf6d624d374bedfe0d9050d145665a0c92c Merge: f781eb7 4e4803e Author: Pieter Hintjens Date: Tue May 28 04:51:47 2013 -0700 Merge pull request #564 from hurtonm/master Rename pipe states so they are more mnemonic commit 4e4803e07faad51b17fe05bddad300e863ed1afa Author: Martin Hurton Date: Tue May 28 13:18:19 2013 +0200 Rename pipe states to make it more mnemonic src/pipe.cpp | 76 ++++++++++++++++++++++++++++++---------------------------- src/pipe.hpp | 30 ++++++++++++----------- 2 files changed, 56 insertions(+), 50 deletions(-) commit f805e4dd03d012e644b4153866c70e99490b0349 Author: shripchenko Date: Fri May 24 07:09:53 2013 -0700 changed option name. +documentation changes doc/zmq_setsockopt.txt | 10 ++++++---- include/zmq.h | 2 +- src/dealer.cpp | 2 +- src/router.cpp | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) commit aec989fb5dcdbd9043057c94035621dbac8b8e33 Author: shripchenko Date: Thu May 23 02:02:18 2013 -0700 small refactoring src/dealer.cpp | 6 +++--- src/router.cpp | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) commit 51750a7d2a0ddceb1c51096cac7cd79a442bce42 Author: shripchenko Date: Thu May 23 01:49:40 2013 -0700 refactored ZMQ_ROUTER_ANNOUNCE_SELF code. renamed it to ZMQ_PROBE_NEW_PEERS. implement it for DEALER tocket. +documentation doc/zmq_setsockopt.txt | 15 +++++++++++++++ include/zmq.h | 2 +- src/dealer.cpp | 41 ++++++++++++++++++++++++++++++++++++++++- src/dealer.hpp | 4 ++++ src/router.cpp | 35 ++++++++++++++++++++++------------- src/router.hpp | 8 ++++---- 6 files changed, 86 insertions(+), 19 deletions(-) commit f781eb7e7bb53c8fa7bd5f9ff1116c7abadc2076 Merge: 13643b2 fbd1729 Author: Martin Hurton Date: Wed May 22 07:05:20 2013 -0700 Merge pull request #562 from hintjens/master Removed tracing on router option setting commit fbd1729cbda254442c48c272f827c1f7bbaad551 Author: Pieter Hintjens Date: Wed May 22 00:17:03 2013 +0200 Removed tracing for Travis builds src/router.cpp | 6 ------ 1 file changed, 6 deletions(-) commit 13643b2aec307fb7d799fe0371e88918f9875b40 Merge: d113495 910b469 Author: Pieter Hintjens Date: Tue May 21 14:32:05 2013 -0700 Merge pull request #561 from shripchenko/master Add ROUTER socket option to introduce self(send an empty message) to new peers, to allow ROUTER<->ROUTER auto-discovery problem. commit 910b46922419c0622a5917ea02f6af820b14c578 Merge: ed3a115 ec7f711 Author: shripchenko Date: Tue May 21 10:26:11 2013 -0700 Merge branch 'master' of https://github.com/shripchenko/libzmq commit ed3a115da9111766d010f45db615503def10dfed Author: shripchenko Date: Tue May 21 10:20:24 2013 -0700 Add ROUTER socket option to introduce self(send an empty message) to new peers, to allow ROUTER<->ROUTER auto-discovery problem. include/zmq.h | 1 + src/router.cpp | 19 ++++++++++++++++++- src/router.hpp | 3 +++ 3 files changed, 22 insertions(+), 1 deletion(-) commit ec7f711c5883299eb4062fd98adb239ba1c06320 Author: root Date: Tue May 21 10:20:24 2013 -0700 Add ROUTER socket option to introduce self(send an empty message) to new peers, to allow ROUTER<->ROUTER auto-discovery problem. include/zmq.h | 1 + src/router.cpp | 19 ++++++++++++++++++- src/router.hpp | 3 +++ 3 files changed, 22 insertions(+), 1 deletion(-) commit c7c865da75c8ba2d7db2455e4a9ce273f54e197f Author: Pieter Hintjens Date: Tue May 21 18:52:44 2013 +0200 Whitespace fixes tests/test_connect_delay.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d11349550092bc50cfe3984cddc73a4db15b4d24 Merge: 536ea4f 4112693 Author: Pieter Hintjens Date: Tue May 21 09:03:51 2013 -0700 Merge pull request #560 from hintjens/master Working on Travis builds commit 4112693051909cbfee5d9ab8a5c7f895f65f547b Author: Pieter Hintjens Date: Tue May 21 15:15:16 2013 +0200 Cleaned up router option code - made consistent with options.cpp code - added trace print for ongoing issue with Travis CI builds src/router.cpp | 51 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 18 deletions(-) commit 536ea4fc24f08f2821449ea2f8b05fc87ce58647 Merge: e9e44c6 bf96cb4 Author: Ian Barber Date: Tue May 21 00:39:58 2013 -0700 Merge pull request #559 from hintjens/master Adding support for Travis CI commit bf96cb44e24faf2ae3c3983263c0693d156b369b Author: Pieter Hintjens Date: Tue May 21 09:32:13 2013 +0200 Fixed name of Travis file .travis.yaml | 2 -- .travis.yml | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 59a164d2b5beafce60971b5a35902e69581e0aa2 Author: Pieter Hintjens Date: Tue May 21 09:20:39 2013 +0200 Added support for Travis CI .travis.yaml | 2 ++ 1 file changed, 2 insertions(+) commit e9e44c6b09e4bada7ec89b45bf116722d784dbdf Merge: 5d2a8b1 31ee92f Author: Martin Hurton Date: Sun May 19 02:05:57 2013 -0700 Merge pull request #558 from hintjens/master stdint.h isn't available on all platforms commit 31ee92f2fda594be8be57652a4fd5f83720f0ee8 Author: Pieter Hintjens Date: Sun May 19 10:01:33 2013 +0100 stdint.h is not available on all platforms include/zmq.h | 16 +++++++++++++++- src/mechanism.hpp | 3 +-- 2 files changed, 16 insertions(+), 3 deletions(-) commit 73562112b831c61c95688d7ce3957ab2193b475d Author: Pieter Hintjens Date: Sat May 18 11:53:20 2013 +0100 Whitespace fixes src/plain_mechanism.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit fa5c0e18e304946cdad4fa747f52af141a561934 Author: Pieter Hintjens Date: Sat May 18 11:53:10 2013 +0100 Trivial fix to man page doc/zmq_curve.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d2a8b18e5fabe748b7dc3a00ef5420a6915dc27 Merge: 342e576 f06abca Author: Martin Hurton Date: Fri May 17 09:46:53 2013 -0700 Merge pull request #557 from hintjens/master Added as_server to options commit f06abca04683d0e50e298cb5617b5afdbed562ee Author: Pieter Hintjens Date: Fri May 17 17:26:54 2013 +0100 Disable failing test for now tests/test_security.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f909b9c7222a8265cfeb8538900add46abd0f2f7 Author: Pieter Hintjens Date: Fri May 17 17:46:30 2013 +0200 plain_mechanism now uses options.as_server - we need to switch to PLAIN according to options.mechanism - we need to catch case when both peers are as-server (or neither is) - and to use username/password from options, for client src/ipc_connecter.cpp | 2 +- src/ipc_listener.cpp | 2 +- src/options.cpp | 10 ++-- src/options.hpp | 3 +- src/plain_mechanism.cpp | 123 +++++++++++++++++++++-------------------------- src/plain_mechanism.hpp | 2 +- src/stream_engine.cpp | 10 ++-- src/stream_engine.hpp | 4 +- src/tcp_connecter.cpp | 2 +- src/tcp_listener.cpp | 2 +- tests/test_security.cpp | 84 +++++++++++++++++++++++++------- 11 files changed, 140 insertions(+), 104 deletions(-) commit da1e9a178a0651431d20ec440b5a366ea7153ba4 Author: Pieter Hintjens Date: Thu May 16 20:29:55 2013 +0200 Cleaned up test pingpong code tests/testutil.hpp | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit 342e576ec83653a51fb788cf68aec095ed1794f5 Merge: fbcbb06 182a224 Author: Pieter Hintjens Date: Fri May 17 09:20:16 2013 -0700 Merge pull request #556 from hurtonm/master Use socket options to select security mechanism commit 182a224bb0607c59a5951034e994fdaf72a96450 Author: Martin Hurton Date: Fri May 17 15:49:26 2013 +0200 Use socket options to select security mechanism src/plain_mechanism.cpp | 11 +++++------ src/stream_engine.cpp | 8 ++++++-- 2 files changed, 11 insertions(+), 8 deletions(-) commit fbcbb06b466865a87264a2b7263d41ce57200dbf Merge: 593010f e1f797b Author: Pieter Hintjens Date: Wed May 15 08:56:06 2013 -0700 Merge pull request #555 from hintjens/master Added options for PLAIN security commit e1f797b0482d7887bd44238bdec28194b0c83628 Author: Pieter Hintjens Date: Wed May 15 17:54:03 2013 +0200 Added configuration for PLAIN security * ZMQ_PLAIN_SERVER, ZMQ_PLAIN_USERNAME, ZMQ_PLAIN_PASSWORD options * Man page changes to zmq_setsockopt and zmq_getsockopt * Man pages for ZMQ_NULL, ZMQ_PLAIN, and ZMQ_CURVE * Test program test_security .gitignore | 1 + doc/Makefile.am | 5 +- doc/zmq.txt | 17 ++ doc/zmq_curve.txt | 40 +++ doc/zmq_getsockopt.txt | 58 ++++- doc/zmq_null.txt | 27 ++ doc/zmq_plain.txt | 37 +++ doc/zmq_setsockopt.txt | 76 +++++- include/zmq.h | 12 + src/options.cpp | 631 ++++++++++++++++++++++++----------------------- src/options.hpp | 9 +- src/zmq.cpp | 4 +- tests/Makefile.am | 2 + tests/test_security.cpp | 117 +++++++++ 14 files changed, 710 insertions(+), 326 deletions(-) commit 8ea779c8f72e72ee1a62a5703d32ddc79972761a Author: Pieter Hintjens Date: Wed May 15 14:11:15 2013 +0200 Fixed sizeof usage in man pages doc/zmq_msg_recv.txt | 2 +- doc/zmq_recvmsg.txt | 2 +- doc/zmq_setsockopt.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 593010fbeb965a1b945d16c7e887c8b0065b2499 Merge: 131b0a7 4eecda8 Author: Pieter Hintjens Date: Tue May 14 14:02:52 2013 -0700 Merge pull request #554 from hurtonm/master Implement ZMTP/3.0 PLAIN mechanism commit 4eecda8af371b8c6afd43d499c86ae79aa788a05 Author: Martin Hurton Date: Tue May 14 10:41:37 2013 +0200 Implement ZMTP/3.0 PLAIN mechanism This implements protocol handshake. We still need to design and implement 1) API changes so a user can set username and password, and 2) a mechanism for engine to authenticate users. src/Makefile.am | 2 + src/ipc_connecter.cpp | 3 +- src/ipc_listener.cpp | 3 +- src/plain_mechanism.cpp | 359 +++++++++++++++++++++++++++++++++++++++++++++++ src/plain_mechanism.hpp | 74 ++++++++++ src/stream_engine.cpp | 15 +- src/stream_engine.hpp | 6 +- src/tcp_connecter.cpp | 3 +- src/tcp_listener.cpp | 3 +- 9 files changed, 460 insertions(+), 8 deletions(-) commit d47295db708cb19a46070bc5f88d76d117abc339 Author: Martin Hurton Date: Mon May 13 22:34:27 2013 +0200 Abstract security mechanism src/Makefile.am | 4 ++ src/mechanism.cpp | 73 +++++++++++++++++++ src/mechanism.hpp | 73 +++++++++++++++++++ src/null_mechanism.cpp | 152 +++++++++++++++++++++++++++++++++++++++ src/null_mechanism.hpp | 51 +++++++++++++ src/stream_engine.cpp | 185 ++++++++++++------------------------------------ src/stream_engine.hpp | 11 +-- 7 files changed, 406 insertions(+), 143 deletions(-) commit 131b0a7148eaf7abda8a234aa60028136b178c74 Merge: 3ef3b94 e918fd4 Author: Ian Barber Date: Wed May 8 11:51:02 2013 -0700 Merge pull request #553 from hintjens/master Some changes to building and packaging commit e918fd4d694c795e32327bf6383b3d4b9c97bb17 Author: Pieter Hintjens Date: Tue May 7 14:47:07 2013 +0200 Use correct libsodium call for detection configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff268b7c8a364a29cfb7e90dd943bef46502fe50 Author: Pieter Hintjens Date: Tue May 7 14:44:55 2013 +0200 Fixed packaging for Windows - was missing errno sources builds/msvc/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fa346fddd39369fe93478ecf5ac87f54ec4adb72 Author: Pieter Hintjens Date: Sat Apr 27 17:08:32 2013 +0200 Added configure check for libsodium configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3ef3b9405c9994533eba9dd39be2b9f85cc7cdd8 Merge: df01235 a7032e9 Author: Pieter Hintjens Date: Sun Apr 28 09:37:23 2013 -0700 Merge pull request #552 from hurtonm/master Implement ZMTP/3.0 NULL mechanism commit a7032e9ca8a75fea4c599c51dd9fce5e9ca7c9f3 Author: Martin Hurton Date: Sun Apr 28 10:40:52 2013 +0200 Update test_raw_sock to work with ZMTP/3.0 tests/test_raw_sock.cpp | 57 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 16 deletions(-) commit cd4d8bb15a18831e1f4d45f2c5bee11d0c30b436 Author: Martin Hurton Date: Sun Apr 28 10:15:25 2013 +0200 Implement ZMTP/3.0 NULL mechanism src/stream_engine.cpp | 203 +++++++++++++++++++++++++++++++++++++++++++++++-- src/stream_engine.hpp | 33 ++++++-- 2 files changed, 224 insertions(+), 12 deletions(-) commit df012358712d4ec150a264edd0d80d4c9339cb9d Merge: 522765b cb2ee7a Author: Ian Barber Date: Sat Apr 27 06:27:24 2013 -0700 Merge pull request #551 from hintjens/master zmq_msg_close clarification in man pages commit cb2ee7a5c21d50289ffc82a5417c6e39999e25e7 Author: Pieter Hintjens Date: Sat Apr 27 14:52:19 2013 +0200 Fixed up test_iov case .gitignore | 1 + tests/Makefile.am | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 7e129a405ce42724df42cfbd2102e5938b3595cd Author: Pieter Hintjens Date: Sat Apr 27 12:48:29 2013 +0200 Clarified zmq_msg_close not needed after zmq_msg_send doc/zmq_msg_close.txt | 3 ++- doc/zmq_msg_send.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 522765be1ee7a32e687a3777c969a7a310fe1d09 Merge: 0bf5a31 56ead84 Author: Pieter Hintjens Date: Thu Apr 25 14:28:11 2013 -0700 Merge pull request #550 from JonDyte/iovec Experimental function zmq_recviov doesnt work correctly in a couple of c... commit 56ead8449092ef2f6ea056f1d070dd7c73af29c5 Author: Jon Dyte Date: Thu Apr 25 21:58:26 2013 +0100 Experimental function zmq_recviov doesnt work correctly in a couple of cases 1) VSM - you cannot hand out the 'data' address as it was not allocated on the heap 2) for other messages the 'data' address cannot be handed out either, as it not the address originally returned by malloc and hence cannot be passed to 'free'. see msg.cpp u.lmsg.content = (content_t*) malloc (sizeof (content_t) + size_); .... u.lmsg.content->data = u.lmsg.content + 1; So the function is changed to always malloc a data buffer and copy the data into it. There is a possible optimisation using memmove for the non-VSM case but that is not done yet. src/zmq.cpp | 23 +++++------ tests/Makefile.am | 3 +- tests/test_iov.cpp | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+), 12 deletions(-) commit 0bf5a31494604f6d1769b458bf410a2fdd0425c1 Merge: 9703dd8 b5e5e10 Author: Martin Hurton Date: Tue Apr 23 17:20:04 2013 -0700 Merge pull request #549 from methodmissing/sigpipe-declare-err Fix return code redeclaration for platforms with SO_NOSIGPIPE commit b5e5e101263d6ab7ccb14eaa3944e9a4a3aab3e1 Author: Lourens Naudé Date: Tue Apr 23 22:58:28 2013 +0100 Fix return code redeclaration for platforms with SO_NOSIGPIPE src/stream_engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9703dd806a4bf70377edce9c6916109efd9c1df7 Merge: 0880d5b 710f38f Author: Ian Barber Date: Tue Apr 23 05:28:25 2013 -0700 Merge pull request #548 from hintjens/master Fixed issue LIBZMQ-526 commit 710f38f1cca6e2fc4d886541073325c09e074c33 Author: Pieter Hintjens Date: Mon Apr 22 15:12:53 2013 +0200 Fixed syntax error src/tcp_connecter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4dbccd4fb230c6f911c518619cf97b84fa20dbb Author: Pieter Hintjens Date: Mon Apr 22 14:50:56 2013 +0200 Fix for LIBZMQ-526 src/tcp_connecter.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 0880d5b8ed976305e98a4748af2f1c7926dedf46 Merge: d0c58d2 f0cf409 Author: Martin Hurton Date: Thu Apr 18 08:30:50 2013 -0700 Merge pull request #547 from hintjens/master Fixed issue LIBZMQ-525 commit f0cf4095b5055eb41e9cd8f841542944ddf7e771 Author: Pieter Hintjens Date: Thu Apr 18 17:23:57 2013 +0200 Fixed issue #525 - multipart upstreaming from xsub to xpub src/xpub.cpp | 36 +++++++++++++++++++++--------------- src/xpub.hpp | 4 ++-- src/xsub.cpp | 2 +- 3 files changed, 24 insertions(+), 18 deletions(-) commit d0c58d24093264ace762b2a846b8996e21f9b507 Merge: f4a07b3 9df7c70 Author: Ian Barber Date: Mon Apr 15 11:01:37 2013 -0700 Merge pull request #546 from hintjens/master Throughput perf test was borked, fixed it commit 9df7c70abad3b572b8201dca666a055bd3fadf57 Author: Pieter Hintjens Date: Mon Apr 15 17:21:58 2013 +0200 Cleaned up copyright statements in perftest tools perf/inproc_lat.cpp | 4 +--- perf/local_lat.cpp | 4 +--- perf/remote_lat.cpp | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) commit c980820d29d483da05e203858bd1a38b718f334f Author: Pieter Hintjens Date: Mon Apr 15 17:18:03 2013 +0200 I'm reverting the various changes to the throughput test programs since as far as I can see, these didn't work any more. At the very least, the command line API was broken and forced the user to enter new, exotic arguments. Patches should not break existing APIs. But also, the internals of these programs had become weird. If we want to build more complex performance tests, that's fine, but we should make new programs, not break the old ones. We need minimal, safe performance tests in 0MQ. Also, the code was quite horrid. So it's gone. If anyone wants to bring it back please make the code neat, and build new APIs instead of breaking the old ones. Cheers Pieter perf/local_thr.cpp | 283 +++++++---------------------------------- perf/remote_thr.cpp | 348 ++++++--------------------------------------------- 2 files changed, 86 insertions(+), 545 deletions(-) commit 67e02ca8bc78208befd10c6b45bba50e2d6e93ed Author: Pieter Hintjens Date: Thu Apr 11 18:53:02 2013 +0200 Use of named authors on man pages is no longer a good idea since it puts off contributors and doesn't reflect the real process. I've taken out all named authors and referred to the contribution policy. Hopefully this will improve the contributions to the man pages. doc/zmq.txt | 4 ++-- doc/zmq_bind.txt | 4 ++-- doc/zmq_close.txt | 4 ++-- doc/zmq_connect.txt | 4 ++-- doc/zmq_ctx_destroy.txt | 3 ++- doc/zmq_ctx_get.txt | 3 ++- doc/zmq_ctx_new.txt | 3 ++- doc/zmq_ctx_set.txt | 3 ++- doc/zmq_ctx_term.txt | 3 ++- doc/zmq_disconnect.txt | 4 ++-- doc/zmq_errno.txt | 4 ++-- doc/zmq_getsockopt.txt | 4 ++-- doc/zmq_init.txt | 4 ++-- doc/zmq_inproc.txt | 4 ++-- doc/zmq_ipc.txt | 8 ++------ doc/zmq_msg_close.txt | 4 ++-- doc/zmq_msg_copy.txt | 4 ++-- doc/zmq_msg_data.txt | 4 ++-- doc/zmq_msg_get.txt | 4 ++-- doc/zmq_msg_init.txt | 4 ++-- doc/zmq_msg_init_data.txt | 4 ++-- doc/zmq_msg_init_size.txt | 4 ++-- doc/zmq_msg_more.txt | 4 ++-- doc/zmq_msg_move.txt | 4 ++-- doc/zmq_msg_recv.txt | 5 ++--- doc/zmq_msg_send.txt | 5 ++--- doc/zmq_msg_set.txt | 3 ++- doc/zmq_msg_size.txt | 4 ++-- doc/zmq_pgm.txt | 5 +++-- doc/zmq_poll.txt | 4 ++-- doc/zmq_proxy.txt | 3 ++- doc/zmq_recv.txt | 5 ++--- doc/zmq_recvmsg.txt | 5 ++--- doc/zmq_send.txt | 4 ++-- doc/zmq_sendmsg.txt | 5 ++--- doc/zmq_setsockopt.txt | 6 ++++-- doc/zmq_socket.txt | 6 ++++-- doc/zmq_socket_monitor.txt | 4 ++-- doc/zmq_strerror.txt | 5 +++-- doc/zmq_tcp.txt | 4 ++-- doc/zmq_term.txt | 4 ++-- doc/zmq_unbind.txt | 4 ++-- doc/zmq_version.txt | 5 +++-- 43 files changed, 93 insertions(+), 88 deletions(-) commit f4a07b3951979a3cb3dc00f499211dfea4e29bc6 Merge: c5721f9 e52c436 Author: Pieter Hintjens Date: Sun Apr 14 14:27:32 2013 -0700 Merge pull request #545 from hurtonm/master Interoperate with higher versions of ZMTP protocol commit e52c43625281f077dda2d584a16692150fd44486 Author: Martin Hurton Date: Sun Apr 14 22:47:17 2013 +0200 Interoperate with higher versions of ZMTP protocol src/stream_engine.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c5721f99883d27bd52bf85092df8ff2cca93f3b5 Merge: d2b5f1f d079190 Author: Pieter Hintjens Date: Sat Apr 13 02:55:02 2013 -0700 Merge pull request #544 from steve-o/libzmq-446 [#LIBZMQ-446] Silence error on setting PGM_TOS on REL 4. commit d079190efa9de7e4a9eb61b005b18a0b54671d72 Author: Steven McCoy Date: Fri Apr 12 23:55:04 2013 -0400 [#LIBZMQ-446] Silence error on setting PGM_TOS due to some platforms raising an error at runtime. Noted are RHEL 4. src/pgm_socket.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d2b5f1f49ecc78635c8239c6e066f878fb91624a Merge: a3713cb a432ea1 Author: Pieter Hintjens Date: Fri Apr 12 13:22:41 2013 -0700 Merge pull request #543 from steve-o/vc110_fix MSVC local_thr & remote_thr dependency fix commit a432ea14d220eb24a494571994b2b8591cf6b296 Author: Steven McCoy Date: Fri Apr 12 11:59:24 2013 -0400 Add vc80 project dependency on platform.hpp for local & remote throughput tests. builds/msvc/c_local_thr/c_local_thr.vcproj | 2 ++ builds/msvc/c_remote_thr/c_remote_thr.vcproj | 2 ++ 2 files changed, 4 insertions(+) commit cd31f67a806839e68ce407b417cd389fe9e961a9 Author: Steven McCoy Date: Fri Apr 12 11:55:27 2013 -0400 Add platform.hpp as project dependency to vc100 and vc110 projects for local & remote throughput tests. builds/msvc/c_local_thr/c_local_thr.vcxproj | 20 ++++++++++++++++++++ builds/msvc/c_local_thr/c_local_thr11.vcxproj | 22 +++++++++++++++++++++- builds/msvc/c_remote_thr/c_remote_thr.vcxproj | 20 ++++++++++++++++++++ builds/msvc/c_remote_thr/c_remote_thr11.vcxproj | 22 +++++++++++++++++++++- 4 files changed, 82 insertions(+), 2 deletions(-) commit a3713cb750b27de7e046ebe3db2f7891a179cfcc Merge: fd42be9 9d79ac2 Author: Pieter Hintjens Date: Fri Apr 12 07:02:04 2013 -0700 Merge pull request #542 from hurtonm/master Use state functions for message flow commit 9d79ac283061c1531c1ab2878a2765afdaba9d77 Author: Martin Hurton Date: Fri Apr 12 11:59:49 2013 +0200 Use state functions for message flow The patch makes the code somewhat simpler and prepares it for more complex initialization handshakes. src/stream_engine.cpp | 100 +++++++++++++++++++++++++------------------------ src/stream_engine.hpp | 24 +++++------- 2 files changed, 62 insertions(+), 62 deletions(-) commit fd42be9dbab047d0ed35572ead3be755177a60d2 Merge: 91f1e13 7942db7 Author: Pieter Hintjens Date: Thu Apr 11 09:57:54 2013 -0700 Merge pull request #541 from hurtonm/rework_message_flow Refactor code so that messages go through engines commit 7942db7606c76f71b77863f8f883047ec69ffc5f Author: Martin Hurton Date: Mon Mar 18 02:00:00 2013 +0100 Refactor code so that messages go through engines src/Makefile.am | 2 - src/decoder.hpp | 94 +++++------------- src/encoder.hpp | 62 ++++++------ src/i_decoder.hpp | 15 +-- src/i_encoder.hpp | 15 ++- src/i_msg_sink.hpp | 43 --------- src/i_msg_source.hpp | 44 --------- src/pgm_receiver.cpp | 137 ++++++++++++++------------ src/pgm_receiver.hpp | 11 ++- src/pgm_sender.cpp | 34 +++++-- src/pgm_sender.hpp | 8 ++ src/raw_decoder.cpp | 66 +++---------- src/raw_decoder.hpp | 25 +++-- src/raw_encoder.cpp | 53 +--------- src/raw_encoder.hpp | 10 +- src/req.cpp | 10 +- src/req.hpp | 1 - src/session_base.cpp | 30 ------ src/session_base.hpp | 25 ++--- src/stream_engine.cpp | 258 +++++++++++++++++++++++++++++++------------------ src/stream_engine.hpp | 37 +++++-- src/v1_decoder.cpp | 73 ++++++-------- src/v1_decoder.hpp | 12 +-- src/v1_encoder.cpp | 51 ++-------- src/v1_encoder.hpp | 10 +- src/v2_decoder.cpp | 82 ++++++---------- src/v2_decoder.hpp | 15 ++- src/v2_encoder.cpp | 53 ++-------- src/v2_encoder.hpp | 13 +-- src/wire.hpp | 8 +- 30 files changed, 527 insertions(+), 770 deletions(-) commit 91f1e13125497683f9c8b604ff70617c540a3946 Merge: c396144 6d19e40 Author: Ian Barber Date: Thu Apr 11 03:10:38 2013 -0700 Merge pull request #540 from hintjens/master Small clarification about connect and ROUTER commit 6d19e400f1c824696d402591d12a8bed13df00f2 Author: Pieter Hintjens Date: Thu Apr 11 09:48:41 2013 +0200 Added clarification about connect on ROUTER doc/zmq_connect.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit c3961442163a57c1a6bf17d2ef2a1b2f1c0f4f27 Merge: 106d962 2aec837 Author: Pieter Hintjens Date: Mon Apr 8 06:33:29 2013 -0700 Merge pull request #539 from TTimo/master Adds a needed Windows system library dependency commit 2aec837218c4b9d2cdea7f33005ce4c3ad57f6c5 Author: Timothee "TTimo" Besset Date: Sun Apr 7 12:44:48 2013 -0500 InitializeSecurityDescriptor needs Advapi32.lib builds/msvc/libzmq/libzmq11.vcxproj | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 106d962311386cba98e708b3c57b2265405c5367 Author: Timothee "TTimo" Besset Date: Sat Apr 6 19:39:06 2013 -0500 restore fixed MSVC 2010 projects, fork new MSVC 2012 projects builds/msvc/c_local_lat/c_local_lat.vcxproj | 6 +- builds/msvc/c_local_lat/c_local_lat11.vcxproj | 91 ++++++ builds/msvc/c_local_thr/c_local_thr.vcxproj | 6 +- builds/msvc/c_local_thr/c_local_thr11.vcxproj | 91 ++++++ builds/msvc/c_remote_lat/c_remote_lat.vcxproj | 6 +- builds/msvc/c_remote_lat/c_remote_lat11.vcxproj | 91 ++++++ builds/msvc/c_remote_thr/c_remote_thr.vcxproj | 6 +- builds/msvc/c_remote_thr/c_remote_thr11.vcxproj | 91 ++++++ builds/msvc/inproc_lat/inproc_lat.vcxproj | 6 +- builds/msvc/inproc_lat/inproc_lat11.vcxproj | 110 +++++++ builds/msvc/inproc_thr/inproc_thr.vcxproj | 6 +- builds/msvc/inproc_thr/inproc_thr11.vcxproj | 110 +++++++ builds/msvc/libzmq/libzmq.vcxproj | 10 +- builds/msvc/libzmq/libzmq11.vcxproj | 346 +++++++++++++++++++++++ builds/msvc/msvc11.sln | 150 ++++++++++ 15 files changed, 1087 insertions(+), 39 deletions(-) commit b5ace90e8ea8ba0b6df0c762a11bdee3b8c2a13a Merge: 1e7db60 44df35c Author: Pieter Hintjens Date: Mon Apr 1 03:09:42 2013 -0700 Merge pull request #538 from TTimo/master MSVC fixes commit 44df35cb1e5bf7f64a01a48bf19e37112c071ad6 Author: Timothee "TTimo" Besset Date: Sun Mar 31 18:18:05 2013 -0500 Use Multithreaded DLL Runtime, Debug/Release accordingly - need consistency for the czmq configurations builds/msvc/libzmq/libzmq.vcxproj | 6 ++++++ 1 file changed, 6 insertions(+) commit 5973b4c665c4a02d4bd5fce2370bd5cfaa821266 Author: Timothee "TTimo" Besset Date: Sun Mar 31 09:10:56 2013 -0500 Windows friendly replacement for gettimeofday perf/local_thr.cpp | 44 ++++++++++++++++++++++++++++++++++++++------ perf/remote_thr.cpp | 42 +++++++++++++++++++++++++++++++++++------- 2 files changed, 73 insertions(+), 13 deletions(-) commit 574fe35b3261edc50956d44d09a1413597af061d Author: Timothee "TTimo" Besset Date: Sun Mar 31 09:09:50 2013 -0500 Fix MSVC project files. builds/msvc/c_local_lat/c_local_lat.vcxproj | 4 ++++ builds/msvc/c_local_thr/c_local_thr.vcxproj | 4 ++++ builds/msvc/c_remote_lat/c_remote_lat.vcxproj | 4 ++++ builds/msvc/c_remote_thr/c_remote_thr.vcxproj | 4 ++++ builds/msvc/inproc_lat/inproc_lat.vcxproj | 6 ++++- builds/msvc/inproc_thr/inproc_thr.vcxproj | 6 ++++- builds/msvc/libzmq/libzmq.vcxproj | 12 ++++++++-- builds/msvc/libzmq/libzmq.vcxproj.filters | 12 +++++----- builds/msvc/msvc10.sln | 32 +++++++++++++++++++++++-- 9 files changed, 72 insertions(+), 12 deletions(-) commit 1e7db60e9ad5a17faa6d307105ceff5aec4974fc Merge: 01fef41 f8e7d46 Author: Pieter Hintjens Date: Sun Mar 24 16:08:45 2013 -0700 Merge pull request #537 from TTimo/master mingw32 fixes commit f8e7d462a6c988c0a06c31ae14297fafe3bfba8a Author: Timothee Besset Date: Sun Mar 24 23:32:21 2013 +0100 mingw32 fixes builds/mingw32/Makefile.mingw32 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01fef415753d00acca7200b60835fe4027adcdf6 Merge: 09a00de 257debf Author: Martin Hurton Date: Sun Mar 24 07:49:25 2013 -0700 Merge pull request #536 from hintjens/master Fixed test_last_endpoint (#80) commit 257debf65903783fc54792ed90ee6439cda87cff Author: Pieter Hintjens Date: Sun Mar 24 15:12:34 2013 +0100 Removed IPC endpoint from test; not portable, and fragile (#80) tests/test_last_endpoint.cpp | 1 - 1 file changed, 1 deletion(-) commit 09a00de80384826bb1fb0d50dcae2417595ee27a Merge: 5ba7445 8c96deb Author: Ian Barber Date: Thu Mar 21 05:07:46 2013 -0700 Merge pull request #534 from hintjens/master Reverted cleanups of copyrghts commit 5ba7445b7aac823688f83f06526e8a5a4e7c0020 Merge: 39214b3 3286bf5 Author: Pieter Hintjens Date: Wed Mar 20 10:34:48 2013 -0700 Merge pull request #535 from ken-tilera/master Optimize atomics implementaiton for the Tile architecture commit 3286bf5ab66c5ea00237af642967a25043581353 Author: Ken Steele Date: Wed Mar 20 12:54:38 2013 -0400 On the Tile architecture, use atomic instructions for atomic ptr and counter. For atomic_counter and atomic_ptr classes, detect the Tile architecture using #if defined __tile__ matching ARM and Solaris and then use the Tile atomic instructions. Without this change, the default Mutex implementation is used, which is slower. AUTHORS | 1 + src/atomic_counter.hpp | 10 ++++++++++ src/atomic_ptr.hpp | 8 ++++++++ 3 files changed, 19 insertions(+) commit 8c96deb900cde8759ade482ef6c660d7fc35a03c Author: Pieter Hintjens Date: Wed Mar 20 11:59:23 2013 +0100 Added corporate copyrights AUTHORS | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 39214b3e40cca54c020368378e9fd8135f54f1eb Merge: 3b132e3 03c2841 Author: Pieter Hintjens Date: Mon Mar 18 02:46:45 2013 -0700 Merge pull request #533 from mika-fischer/workaround-for-496 Work around for LIBZMQ-496 commit 03c28411d892da23ae1a17728a368e38b9a072ad Author: Mika Fischer Date: Tue Feb 19 11:01:13 2013 +0100 Work around for LIBZMQ-496 The problem is that other threads might still be in mailbox::send() when it is destroyed. So as a workaround, we just acquire the mutex in the destructor. Therefore the running send will finish before the mailbox is destroyed. See also the fix for LIBZMQ-281 in zeromq2-x. Signed-off-by: Mika Fischer src/mailbox.cpp | 5 +++++ 1 file changed, 5 insertions(+) commit 3b132e337ee7c99db5d1dc3c1447de496b2f2f04 Merge: 9ea20b8 8181840 Author: Pieter Hintjens Date: Mon Mar 18 01:05:38 2013 -0700 Merge pull request #532 from hurtonm/pgm_build_fix Update PGM with recent changes commit 81818401e83ac31e5746e7a4b6490468b99566f7 Author: Martin Hurton Date: Mon Mar 18 02:05:51 2013 +0100 Update PGM with recent changes src/pgm_receiver.cpp | 5 +++-- src/pgm_receiver.hpp | 6 +++--- src/pgm_sender.hpp | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) commit 16f8ea3e95f3e7897ed9d1a7536e7acccaaf54f0 Author: Pieter Hintjens Date: Sun Mar 17 11:30:49 2013 +0100 Clarified HWM=0 means infinite doc/zmq_getsockopt.txt | 6 ++++-- doc/zmq_setsockopt.txt | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 9ea20b82cc7fffd233d4db854fed4013711ce639 Merge: c7cb5ab c69e797 Author: Pieter Hintjens Date: Wed Mar 13 12:45:37 2013 -0700 Merge pull request #531 from murrekatt/master Fixed CMake building after encoder/decoder changes commit c69e79706e88d8946ea58b173ac041a214f9c780 Author: Tommy Back Date: Wed Mar 13 20:27:49 2013 +0100 Fix to building libzmq with CMake as sub-project (git submodule). CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 601eedb7f3624e1e8c334ce396b64fff91b8a3e8 Author: Tommy Back Date: Wed Mar 13 20:10:00 2013 +0100 Updated CMake building to work after encoder/decoder changes. CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7cb5ab7c0c1d72fe54799cef4ac4f26fa224cc3 Merge: 1810f10 f1738b9 Author: Ian Barber Date: Tue Mar 12 14:00:20 2013 -0700 Merge pull request #530 from hintjens/master Fixed copyrights in sources commit f1738b9b9219ffa78bb57fdedc703590abaf5ac2 Author: Pieter Hintjens Date: Tue Mar 12 17:04:51 2013 +0100 More copyright cleanups tests/test_connect_delay.cpp | 4 ++-- tests/test_connect_resolve.cpp | 3 +-- tests/test_ctx_options.cpp | 3 +-- tests/test_disconnect_inproc.cpp | 19 +++++++++++++++++++ tests/test_hwm.cpp | 4 +--- tests/test_invalid_rep.cpp | 4 +--- tests/test_last_endpoint.cpp | 4 +--- tests/test_monitor.cpp | 4 +--- tests/test_msg_flags.cpp | 4 +--- tests/test_pair_inproc.cpp | 3 +-- tests/test_pair_ipc.cpp | 3 +-- tests/test_pair_tcp.cpp | 4 +--- tests/test_raw_sock.cpp | 3 +-- tests/test_reqrep_device.cpp | 4 +--- tests/test_reqrep_inproc.cpp | 3 +-- tests/test_reqrep_ipc.cpp | 3 +-- tests/test_reqrep_tcp.cpp | 4 +--- tests/test_router_mandatory.cpp | 3 +-- tests/test_shutdown_stress.cpp | 4 +--- tests/test_sub_forward.cpp | 4 +--- tests/test_term_endpoint.cpp | 4 +--- tests/test_timeo.cpp | 4 +--- tests/testutil.hpp | 4 +--- 23 files changed, 42 insertions(+), 57 deletions(-) commit 0e77d65f128251cd63dada27ce95849b3b815d29 Author: Pieter Hintjens Date: Tue Mar 12 16:15:54 2013 +0100 Removed pointless comment src/dealer.cpp | 6 ------ src/router.cpp | 7 ------- 2 files changed, 13 deletions(-) commit 8358d4e8328895456399f8c2ee8a0f273fa3f8dc Author: Pieter Hintjens Date: Tue Mar 12 16:11:19 2013 +0100 Renamed ZMQ_DELAY_ATTACH_ON_CONNECT_COULD_THIS_BE_ANY_LONGER to ZMQ_IMMEDIATE doc/zmq_setsockopt.txt | 15 +++++++++------ include/zmq.h | 10 +++++----- src/options.cpp | 10 +++++----- src/options.hpp | 2 +- src/session_base.cpp | 2 +- src/socket_base.cpp | 4 ++-- 6 files changed, 23 insertions(+), 20 deletions(-) commit 12c7db8c42ac04d3aaed6674ae43af91c39d29bf Author: Pieter Hintjens Date: Tue Mar 12 15:56:10 2013 +0100 Code name clean up src/stream_engine.cpp | 20 ++++++++++---------- src/stream_engine.hpp | 21 ++++++++------------- 2 files changed, 18 insertions(+), 23 deletions(-) commit d826c53b9b163e33952abb515718bb04526b8940 Author: Pieter Hintjens Date: Tue Mar 12 15:38:48 2013 +0100 Bumped ZMTP revision to 2 * Starting draft ZMTP/2.1 protocol (revision 2) * Basis for adding security to the wire protocol * Maintains backward compatibility src/stream_engine.cpp | 24 ++++++++++++------------ src/stream_engine.hpp | 7 +++++++ src/v2_protocol.hpp | 1 - tests/test_raw_sock.cpp | 6 +++--- 4 files changed, 22 insertions(+), 16 deletions(-) commit 785ef41f678399f2d1835492b3d593ca7b54a498 Author: Pieter Hintjens Date: Tue Mar 12 15:26:07 2013 +0100 Refactored codecs to match ZMTP version numbers src/Makefile.am | 10 +-- src/decoder.cpp | 164 ----------------------------------------------- src/decoder.hpp | 31 --------- src/encoder.cpp | 99 ---------------------------- src/encoder.hpp | 24 ------- src/stream_engine.cpp | 55 ++++++++-------- src/tcp_connecter.cpp | 2 +- src/v1_decoder.cpp | 141 ++++++++++++++++++++-------------------- src/v1_decoder.hpp | 21 ++---- src/v1_encoder.cpp | 60 ++++++++--------- src/v1_encoder.hpp | 15 ++--- src/v1_protocol.hpp | 42 ------------ src/v2_decoder.cpp | 160 +++++++++++++++++++++++++++++++++++++++++++++ src/v2_decoder.hpp | 60 +++++++++++++++++ src/v2_encoder.cpp | 100 +++++++++++++++++++++++++++++ src/v2_encoder.hpp | 56 ++++++++++++++++ src/v2_protocol.hpp | 39 +++++++++++ src/xsub.cpp | 8 +-- tests/test_raw_sock.cpp | 2 +- 19 files changed, 570 insertions(+), 519 deletions(-) commit f0f16505e5c3468b9cc598abd797f0aa650447a6 Author: Pieter Hintjens Date: Tue Mar 12 13:17:00 2013 +0100 Removed corporate advertisements from source file headers Copyrights had become ads for Sustrik's corporate sponsors, going against the original agreement to share copyrights with the community (that agreement was: one line stating iMatix copyright + one reference to AUTHORS file). The proliferation of corporate ads is also unfair to the many individual authors. I've removed ALL corporate title from the source files so the copyright statements can now be centralized in AUTHORS and source files can be properly updated on an annual basis. include/zmq.h | 5 +---- include/zmq_utils.h | 3 +-- src/address.cpp | 3 +-- src/address.hpp | 3 +-- src/array.hpp | 4 +--- src/atomic_counter.hpp | 4 +--- src/atomic_ptr.hpp | 4 +--- src/blob.hpp | 3 +-- src/clock.cpp | 3 +-- src/clock.hpp | 3 +-- src/command.hpp | 4 +--- src/config.hpp | 4 +--- src/ctx.cpp | 4 +--- src/ctx.hpp | 4 +--- src/dealer.cpp | 4 +--- src/dealer.hpp | 3 +-- src/decoder.cpp | 4 +--- src/decoder.hpp | 4 +--- src/devpoll.cpp | 4 +--- src/devpoll.hpp | 4 +--- src/dist.cpp | 4 +--- src/dist.hpp | 3 +-- src/encoder.cpp | 5 +---- src/encoder.hpp | 4 +--- src/epoll.cpp | 4 +--- src/epoll.hpp | 4 +--- src/err.cpp | 4 +--- src/err.hpp | 4 +--- src/fd.hpp | 3 +-- src/fq.cpp | 5 +---- src/fq.hpp | 4 +--- src/i_decoder.hpp | 3 +-- src/i_encoder.hpp | 3 +-- src/i_engine.hpp | 4 +--- src/i_msg_sink.hpp | 3 +-- src/i_msg_source.hpp | 3 +-- src/i_poll_events.hpp | 4 +--- src/io_object.cpp | 4 +--- src/io_object.hpp | 4 +--- src/io_thread.cpp | 4 +--- src/io_thread.hpp | 4 +--- src/ip.cpp | 4 +--- src/ip.hpp | 4 +--- src/ipc_address.cpp | 3 +-- src/ipc_address.hpp | 3 +-- src/ipc_connecter.cpp | 3 +-- src/ipc_connecter.hpp | 3 +-- src/ipc_listener.cpp | 3 +-- src/ipc_listener.hpp | 3 +-- src/kqueue.cpp | 4 +--- src/kqueue.hpp | 4 +--- src/lb.cpp | 5 +---- src/lb.hpp | 4 +--- src/likely.hpp | 3 +-- src/mailbox.cpp | 4 +--- src/mailbox.hpp | 4 +--- src/msg.cpp | 6 ++---- src/msg.hpp | 5 +---- src/mtrie.cpp | 4 +--- src/mtrie.hpp | 4 +--- src/mutex.hpp | 4 +--- src/object.cpp | 4 +--- src/object.hpp | 4 +--- src/options.cpp | 5 +---- src/options.hpp | 5 +---- src/own.cpp | 3 +-- src/own.hpp | 3 +-- src/pair.cpp | 4 +--- src/pair.hpp | 4 +--- src/pgm_receiver.cpp | 5 +---- src/pgm_receiver.hpp | 5 +---- src/pgm_sender.cpp | 5 +---- src/pgm_sender.hpp | 5 +---- src/pgm_socket.cpp | 5 +---- src/pgm_socket.hpp | 5 +---- src/pipe.cpp | 5 +---- src/pipe.hpp | 5 +---- src/poll.cpp | 4 +--- src/poll.hpp | 4 +--- src/poller.hpp | 4 +--- src/poller_base.cpp | 3 +-- src/poller_base.hpp | 3 +-- src/precompiled.cpp | 3 +-- src/precompiled.hpp | 3 +-- src/proxy.cpp | 3 +-- src/proxy.hpp | 3 +-- src/pub.cpp | 4 +--- src/pub.hpp | 4 +--- src/pull.cpp | 4 +--- src/pull.hpp | 4 +--- src/push.cpp | 4 +--- src/push.hpp | 4 +--- src/random.cpp | 3 +-- src/random.hpp | 3 +-- src/raw_decoder.cpp | 4 +--- src/raw_decoder.hpp | 4 +--- src/raw_encoder.cpp | 5 +---- src/raw_encoder.hpp | 4 +--- src/reaper.cpp | 3 +-- src/reaper.hpp | 3 +-- src/rep.cpp | 4 +--- src/rep.hpp | 4 +--- src/req.cpp | 5 +---- src/req.hpp | 5 +---- src/router.cpp | 5 +---- src/router.hpp | 5 +---- src/select.cpp | 4 +--- src/select.hpp | 4 +--- src/session_base.cpp | 5 +---- src/session_base.hpp | 5 +---- src/signaler.cpp | 3 +-- src/signaler.hpp | 3 +-- src/socket_base.cpp | 5 +---- src/socket_base.hpp | 5 +---- src/stdint.hpp | 3 +-- src/stream_engine.cpp | 4 +--- src/stream_engine.hpp | 4 +--- src/sub.cpp | 4 +--- src/sub.hpp | 4 +--- src/tcp.cpp | 4 +--- src/tcp.hpp | 4 +--- src/tcp_address.cpp | 4 +--- src/tcp_address.hpp | 4 +--- src/tcp_connecter.cpp | 4 +--- src/tcp_connecter.hpp | 4 +--- src/tcp_listener.cpp | 4 +--- src/tcp_listener.hpp | 4 +--- src/thread.cpp | 4 +--- src/thread.hpp | 4 +--- src/trie.cpp | 5 +---- src/trie.hpp | 5 +---- src/v1_decoder.cpp | 4 +--- src/v1_decoder.hpp | 4 +--- src/v1_encoder.cpp | 5 +---- src/v1_encoder.hpp | 4 +--- src/v1_protocol.hpp | 3 +-- src/windows.hpp | 4 +--- src/wire.hpp | 3 +-- src/xpub.cpp | 4 +--- src/xpub.hpp | 3 +-- src/xsub.cpp | 4 +--- src/xsub.hpp | 3 +-- src/ypipe.hpp | 4 +--- src/yqueue.hpp | 4 +--- src/zmq.cpp | 4 +--- src/zmq_utils.cpp | 4 +--- 146 files changed, 147 insertions(+), 427 deletions(-) commit cb69986d743df388944d7dc5ea4bb12f7c49d2ed Author: Pieter Hintjens Date: Fri Mar 8 14:22:58 2013 +0100 Comment change configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 898ad19851ba81b4175696028bd5427a38c86614 Author: Pieter Hintjens Date: Tue Feb 26 12:43:52 2013 +0100 It's its not it's doc/zmq_pgm.txt | 4 ++-- doc/zmq_socket_monitor.txt | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) commit 1810f1025f633a7d3c6edafb4ac4650b7c06de69 Merge: ba2dda4 d78d497 Author: Pieter Hintjens Date: Fri Mar 8 10:03:19 2013 -0800 Merge pull request #529 from guidog/master Adapted zmq_socket_monitor man page to new API. commit d78d4972ae3eed299ce9245a734c95b94c161af1 Author: Guido Goldstein Date: Fri Mar 8 16:58:04 2013 +0100 Adapted man page to API. doc/zmq_socket_monitor.txt | 229 +++++++++++++++++++------------------------- 1 file changed, 100 insertions(+), 129 deletions(-) commit ba2dda407d73d009851cb19f7fa831d6576f4a76 Merge: 656258c b0b8ab2 Author: Pieter Hintjens Date: Fri Mar 8 05:21:25 2013 -0800 Merge pull request #528 from guidog/master Changed message structure for event notifications commit b0b8ab27c5a3734aa2e9103a61e1a850e14d7dd3 Author: Guido Goldstein Date: Fri Mar 8 13:48:18 2013 +0100 Changed message structure for event notifications. include/zmq.h | 6 ++-- src/socket_base.cpp | 67 +++++++++++++++-------------------------- src/socket_base.hpp | 5 +--- src/zmq.cpp | 10 ------- tests/test_monitor.cpp | 78 ++++++++++++++++++++++++++---------------------- 5 files changed, 70 insertions(+), 96 deletions(-) commit 656258c1d4ec3f3d71f4ea85783d95576aff2bf5 Merge: 068909f 21eeb03 Author: Pieter Hintjens Date: Fri Mar 8 02:24:46 2013 -0800 Merge pull request #527 from guidog/master Simplified zmq_event_t structure. commit 21eeb03b6cab29e5f4cb60b195272314f6375678 Author: Guido Goldstein Date: Fri Mar 8 10:34:25 2013 +0100 Simplified the zmq_event_t structure for easier access and better usability towards language bindings. include/zmq.h | 48 ++++---------------------------------- src/socket_base.cpp | 60 ++++++++++++++++++++++++------------------------ src/zmq.cpp | 37 +++-------------------------- tests/test_monitor.cpp | 39 ++++++++++++------------------- 4 files changed, 52 insertions(+), 132 deletions(-) commit 068909f4445381f597337bd0f51786f45ba0df35 Merge: be11608 7e37cc8 Author: Ian Barber Date: Tue Mar 5 08:00:59 2013 -0800 Merge pull request #526 from breese/master Fixed Linux compilation problem commit 7e37cc8ed471ef06554ea88e20dbf5315dcc2bb9 Author: Bjorn Reese Date: Tue Mar 5 11:52:47 2013 +0100 Linux build fails due to undeclared variable perf/remote_thr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be1160832e91f757a65ff37c3450e4f26ce3daff Merge: f420f0a 679869d Author: Pieter Hintjens Date: Sun Mar 3 01:14:00 2013 -0800 Merge pull request #525 from pijyoi/master remote_thr.cpp: port pthreads usage to win32 api commit 679869d98144adf70e738fa269f4d4c89e2f08a3 Author: KIU Shueng Chuan Date: Sun Mar 3 15:39:44 2013 +0800 add simple Makefile to build with mingw32 builds/mingw32/Makefile.mingw32 | 31 +++++++++++++++++++++++++++++++ builds/mingw32/platform.hpp | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit 3176509e6029ec269e340d266b99059f97b5c065 Author: KIU Shueng Chuan Date: Sun Mar 3 15:28:00 2013 +0800 include source directory version of zmq.h and zmq_utils.h this follows what {local,remote}_lat.cpp and inproc_{thr,lat}.cpp do. perf/local_thr.cpp | 4 ++-- perf/remote_thr.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 402f9fd243dfd150e7dc567ce6e045d3a7d14b50 Author: KIU Shueng Chuan Date: Sun Mar 3 15:18:54 2013 +0800 remote_thr.cpp: port pthreads usage to win32 api perf/remote_thr.cpp | 74 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 25 deletions(-) commit f420f0aff78c1734d335f9304bbca658ba30d7ec Merge: 22d9d95 1e52a45 Author: Ian Barber Date: Thu Feb 28 14:14:31 2013 -0800 Merge pull request #524 from dlittleton/master Windows: Fix rounding error in now_us. [Jira LIBZMQ-514] commit 1e52a451d68bd274635d7338f114ff708bc0294f Author: Duane Littleton Date: Wed Feb 27 13:53:07 2013 -0500 Windows: Fix rounding error when calculating now_us Improve accuracy of time calculations and avoid division by zero when ticksPerSecond.QuadPart < 1000000. src/clock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22d9d95dd26bf3e39119e10d652ffbc97c46ca6d Merge: deb9773 a22714d Author: Pieter Hintjens Date: Tue Feb 26 12:33:26 2013 -0800 Merge pull request #523 from ambitslix/perf Improvements and fixes for performance of PUSH/PULL in local_thr and rem... commit a22714dd79021279ce64e7795be7f25ede8c1f83 Author: Attila Mark Date: Tue Feb 26 12:10:27 2013 -0800 Improvements and fixes for performance of PUSH/PULL in local_thr and remote_thr. - option to set number of zmq threads on the command line for local_thr - option to set number of zmq_threads and workers in remote_thr - option to set SND/RCV buffer sizes on command line - option to set whether to PUSH/PULL on command line - option to set to use zmq_recv or zmq_msg for transfer on command line - better timing function - corrected and improved throughput reporting - HWM and DELAY socket options AUTHORS | 1 + perf/local_thr.cpp | 253 +++++++++++++++++++++++++++++++++++-------- perf/remote_thr.cpp | 299 +++++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 466 insertions(+), 87 deletions(-) commit deb977345c85939551551c73fe710fc1f9252100 Merge: fb45685 066f3d2 Author: Ian Barber Date: Mon Feb 25 05:30:11 2013 -0800 Merge pull request #522 from hintjens/master Fixed overflow in results calculation commit 066f3d2c9bf3126f91a4339be1f9862fea25cb77 Author: Pieter Hintjens Date: Mon Feb 25 14:13:15 2013 +0100 Fixed overflow in local_thr results calculation perf/local_thr.cpp | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) commit fb45685aa82689f6024c5eb91a65adb5059f3acf Merge: 0434366 0ecc96b Author: Ian Barber Date: Sun Feb 24 09:04:26 2013 -0800 Merge pull request #521 from SRombauts/master Static Library Linking for Windows commit 0ecc96bf33b66413bff1db1ae72bec67a6522824 Author: Sebastien Rombauts Date: Sun Feb 24 16:10:17 2013 +0100 Adding missing new ZeroMQ_Static.props and Static.props files + ignore StaticRelease & StaticDebug intermediate files .gitignore | 4 ++-- builds/msvc/properties/Static.props | 15 +++++++++++++++ builds/msvc/properties/ZeroMQ_Static.props | 23 +++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) commit b3bcd8e323773c3ede84ec1fe7ab7e4df045e063 Author: Sebastien Rombauts Date: Sun Feb 24 15:44:14 2013 +0100 Static Library Linking for Windows - New ZMQ_STATIC flag to enable "libzmq.lib" Windows static library (or "libzmq_d.lib" in Debug mode). - ZMQ_STATIC needs also to be defined by projects using static linking against "libzmq.lib" - New StaticDebug & StaticRelease configurations for libzmq Win32 projects under MSVC 2008 & 2010 - Tested with Visual Studio 2008 Express under Windows 7, and Visual Studio 2010 Express under Windows 8. builds/msvc/Makefile.am | 4 +- builds/msvc/libzmq/libzmq.vcproj | 1776 +++++++++++++++++++---------------- builds/msvc/libzmq/libzmq.vcxproj | 40 +- builds/msvc/msvc.sln | 6 + builds/msvc/msvc10.sln | 6 + builds/msvc/properties/ZeroMQ.props | 1 - include/zmq.h | 4 +- include/zmq_utils.h | 4 +- 8 files changed, 1013 insertions(+), 828 deletions(-) commit 0434366088ac519c9a4a8bc1f5b37b6b7662d927 Merge: 25dc715 d175676 Author: Pieter Hintjens Date: Fri Feb 22 00:27:56 2013 -0800 Merge pull request #520 from xantares/master Fixed module path with cmake < 2.8.3 commit d17567626a54a60fea6ec8bd29ba8548c90ac7eb Author: Michel Zou Date: Fri Feb 22 09:01:41 2013 +0100 Fixed module path with cmake < 2.8.3 CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25dc715b7bf7c0fa0cbd274c5b500d8380e321ba Merge: 897023c a61535a Author: Ian Barber Date: Wed Feb 20 11:45:14 2013 -0800 Merge pull request #519 from SRombauts/master Corrected linking error in MSVC 2010 build + perf/projects compilation commit 897023c3c1cecacdbd32f3215f45ee68410d61ee Merge: ccf2b9b a85c9f4 Author: Ian Barber Date: Wed Feb 20 11:44:22 2013 -0800 Merge pull request #518 from hintjens/master Fixed MAXMSGSIZE setsockopt, which I'd broken commit a61535a23a6388c13239882129d6876acf7ade91 Author: Sébastien Rombauts Date: Wed Feb 20 16:08:18 2013 +0100 VS2008 & VS2010: adding the pre-build command to copy platform.hpp in perf/ directory to the two appropriate projects, for each MSVC version builds/msvc/inproc_lat/inproc_lat.vcproj | 350 +++++++++++++++-------------- builds/msvc/inproc_lat/inproc_lat.vcxproj | 22 +- builds/msvc/inproc_thr/inproc_thr.vcproj | 350 +++++++++++++++-------------- builds/msvc/inproc_thr/inproc_thr.vcxproj | 22 +- builds/msvc/libzmq/libzmq.vcxproj | 20 +- 5 files changed, 411 insertions(+), 353 deletions(-) commit a85c9f45d14a52f66c414e743fd609d9a7324685 Author: Pieter Hintjens Date: Wed Feb 20 14:05:55 2013 +0100 MAXMSGSIZE broke when I cleaned up this code - fixed src/options.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 157bf4523ef00dce8fe89d0806da4f0b01c55aa8 Author: Sébastien Rombauts Date: Tue Feb 19 22:16:40 2013 +0100 VS2010: adding another pre-build command to copy platform.hpp in perf/ directory builds/msvc/libzmq/libzmq.vcxproj | 6 ++++++ 1 file changed, 6 insertions(+) commit 23db53d0aa720e2f26c67ecd94eeacfbdffc4cda Author: Sébastien Rombauts Date: Tue Feb 19 22:01:50 2013 +0100 Corrected linking error in MSVC 2010 build - raw_encoder.cpp and raw_decoder.cpp where missing in Visual Studio 2010 project builds/msvc/libzmq/libzmq.vcxproj | 4 ++++ builds/msvc/libzmq/libzmq.vcxproj.filters | 12 ++++++++++++ 2 files changed, 16 insertions(+) commit ccf2b9b46665f37a579f5f04f7b80848e97944a6 Merge: a5ef501 57f84d6 Author: Pieter Hintjens Date: Tue Feb 19 10:31:26 2013 -0800 Merge pull request #517 from SRombauts/master Windows CE support : using standard _WIN32_WCE flag instead of WINCE commit 57f84d68111b1005e9f216b94070e837a3b65407 Author: Sébastien Rombauts Date: Tue Feb 19 18:57:12 2013 +0100 Windows CE support : some more #if !defined _WIN32_WCE - Windows CE does not manage security attributes (no SetSecurityDescriptorDacl(), SetEvent (NULL, xxx) ...) - Windows CE does not inheritance of sockets for child process (SetHandleInformation ((HANDLE) *w_, HANDLE_FLAG_INHERIT...) - see comments about story "Porting ZeroMQ to Windows Mobile" on webpage http://www.zeromq.org/story:5 src/signaler.cpp | 14 +++++++++++++- src/tcp_listener.cpp | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) commit 05bb0ead54815d0b8262a9e0063e37f289bc307a Author: Sébastien Rombauts Date: Tue Feb 19 18:55:01 2013 +0100 Windows CE support : uncommenting #define EACCES needed - tested for Windows CE 5.0 under Visual Studio 2008 Pro - tested for Windows XP under Visual Studio 2008 Pro builds/msvc/errno.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41d79bc19eb4b53c6e6c7ea0477a1607ff0b59a7 Author: Sébastien Rombauts Date: Tue Feb 19 16:49:23 2013 +0100 Windows CE support : using standard _WIN32_WCE flag instead of WINCE - when compiling for Windows CE, a C++ project must define the preprocessor definitions: UNDER_CE=$(CEVersion),_WIN32_WCE=$(CEVersion) - choosing the "_WIN32_CE" form for uniformization with "_WIN32" and "_WIN32_WINNT" already used in libzmq (boost is using both forms) - see http://msdn.microsoft.com/en-us/library/ee479161(v=winembedded.60).aspx builds/msvc/errno.cpp | 2 +- include/zmq.h | 2 +- src/clock.cpp | 2 +- src/err.cpp | 2 +- src/err.hpp | 2 +- src/socket_base.cpp | 2 +- src/thread.cpp | 2 +- src/windows.hpp | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit a5ef50141c24c3f658595865d69cbeb132a492ab Merge: a8dfcb3 927000f Author: Pieter Hintjens Date: Tue Feb 19 05:33:42 2013 -0800 Merge pull request #516 from SRombauts/master Corrected some more linking errors in MSVC build commit 927000fe2ff7182f55ebd400b959ef3d62d8aa17 Author: Sébastien Rombauts Date: Tue Feb 19 14:18:50 2013 +0100 Fixed 7 MSVC2008 Compiler Warning (level 3) C4800: 'const int' : forcing value to bool 'true' or 'false' (performance warning) - added explicit test "(xxx != 0)" to get a "bool" value out of the "int" expression - see the MSDN recommandation http://msdn.microsoft.com/en-us/library/b6801kcy(v=vs.90).aspx src/ctx.cpp | 2 +- src/options.cpp | 4 ++-- src/router.cpp | 4 ++-- src/socket_base.cpp | 2 +- src/xpub.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit 42be4d13a7f96089e97d58a9d35ea38baa850fac Author: Sébastien Rombauts Date: Tue Feb 19 13:46:52 2013 +0100 Corrected more linking error in MSVC build - raw_encoder.cpp and raw_decoder.cpp in missing in MSVC project builds/msvc/libzmq/libzmq.vcproj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit a8dfcb3c7de53b8b2ec7a5495532e83dd44ee16d Merge: 08be168 e628421 Author: Ian Barber Date: Mon Feb 18 12:19:11 2013 -0800 Merge pull request #515 from hintjens/master Updated NEWS for 3.2.2 stable commit e628421ed5a7f2a9e2bc92ecfa513d24d8e45cb1 Author: Pieter Hintjens Date: Mon Feb 18 21:14:14 2013 +0100 Updated NEWS for 3.2.2 stable NEWS | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 08be168dd0011ab259f8f34b0817027bb1ac645c Merge: 7094a70 8c71ac4 Author: Pieter Hintjens Date: Fri Feb 15 08:44:30 2013 -0800 Merge pull request #514 from pijyoi/fixcs release critical section on failure to create signaler fdpair commit 8c71ac47e83dc4ae116ab4abb5e4a76e8249d888 Author: KIU Shueng Chuan Date: Fri Feb 15 10:45:43 2013 +0800 release critical section on failure to create signaler fdpair src/signaler.cpp | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) commit 7094a706123a73c95492dd3a5f4ebc2566eb44f2 Merge: 9a6b875 51cfcb1 Author: Ian Barber Date: Sun Feb 10 01:23:13 2013 -0800 Merge pull request #513 from hintjens/master Fixed test_connect_resolve commit 51cfcb117a488d8411b34dff483312c4e0fa405b Author: Pieter Hintjens Date: Sun Feb 10 08:39:27 2013 +0100 Some DNSs will resolve ANY domain name so I made more reliable errors. tests/test_connect_resolve.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 9a6b875f2181ef46baf65d3baf33135bb67f2864 Merge: 6b2304a 1a13554 Author: Ian Barber Date: Thu Feb 7 04:23:56 2013 -0800 Merge pull request #512 from montoyaedu/master broken tests compilation. Makefile.am commit 1a13554fe0fc94bd1fc5619e270c3abc50cd5b63 Author: montoyaedu Date: Thu Feb 7 12:27:33 2013 +0100 solved broken tests compilation tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b2304ad9749819a7325feae12aa141a5cd1e443 Merge: f27eb67 ec04ccb Author: Pieter Hintjens Date: Tue Feb 5 15:13:12 2013 -0800 Merge pull request #511 from mjasperse/patch-2 Corrected linking error in MSVC build commit ec04ccba79d70abfe7355e6584f5ff79a94793a7 Author: mjasperse Date: Wed Feb 6 10:09:07 2013 +1100 Corrected linking error in MSVC build MSVC build fails with linking errors for unresolved symbols SetSecurityDescriptorDacl and InitializeSecurityDescriptor in signaler.obj Adding the relevant link library (Advapi32.lib) to VCLinkerTool fixes this (tested MSVC2010 on XP and Win7) builds/msvc/libzmq/libzmq.vcproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f27eb67e1abb0484c41050e454404cce30647b63 Merge: a3ae0d4 2c1a3c5 Author: Pieter Hintjens Date: Fri Feb 1 00:54:36 2013 -0800 Merge pull request #510 from miniway/master LIBZMQ-497 there could be unsent bytes in encoder commit 2c1a3c55f73a504b82c32b75790c59426cde76e9 Author: Min(Dongmin Yu) Date: Fri Feb 1 17:32:28 2013 +0900 LIBZMQ-497 there could be unsent bytes in encoder When we send a large message, the message can be splitted into two chunks. One is in the encoder buffer and the other is the zero-copy pointer. The session could get the term before the last chunk is sent. src/encoder.hpp | 5 +++++ src/i_encoder.hpp | 1 + src/stream_engine.cpp | 12 ++++++++++++ src/stream_engine.hpp | 1 + 4 files changed, 19 insertions(+) commit a3ae0d4c16c892a4e6c96d626a7c8b7068450336 Merge: b60689e 8ab3c4a Author: Chuck Remes Date: Thu Jan 31 13:40:02 2013 -0800 Merge pull request #509 from hintjens/master Added IPv6 option to context commit 8ab3c4a1bfbde44f45bd97eb40cbd27236239d10 Author: Pieter Hintjens Date: Thu Jan 31 21:52:30 2013 +0100 Fixed issue #500 .gitignore | 3 +++ doc/zmq_ctx_get.txt | 6 ++++- doc/zmq_ctx_set.txt | 11 +++++++++ src/ctx.cpp | 20 ++++++++++++---- src/ctx.hpp | 3 +++ src/options.hpp | 1 - src/socket_base.cpp | 1 + tests/Makefile.am | 6 ++--- tests/test_ctx_options.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 97 insertions(+), 10 deletions(-) commit b60689e59df90068396c52acbccf9986b6a55514 Merge: 049931f 309740e Author: Chuck Remes Date: Thu Jan 31 11:54:42 2013 -0800 Merge pull request #508 from hintjens/master IPv6 related changes and cleanups to test cases commit 309740e1972565fdcbfe886439977a4603a7d10e Author: Pieter Hintjens Date: Thu Jan 31 20:47:45 2013 +0100 Fixed issue #499 doc/zmq_getsockopt.txt | 21 ++++++++++--- doc/zmq_setsockopt.txt | 24 +++++++++++---- src/options.cpp | 29 +++++++++--------- src/options.hpp | 6 ++-- src/socket_base.cpp | 2 +- src/tcp_address.cpp | 77 +++++++++++++++++++++--------------------------- src/tcp_address.hpp | 15 ++++------ src/tcp_listener.cpp | 7 +++-- 8 files changed, 98 insertions(+), 83 deletions(-) commit 963c6a8e2f15e077c40c461ede7b5cf777a30dd4 Author: Pieter Hintjens Date: Thu Jan 31 19:46:22 2013 +0100 Lots of cleanups to self-tests * Removed or truncated sleeps so the tests run faster * Removed dependencies on zmq_utils * Rewrote a few tests that were confusing * Minor code cleanups tests/test_connect_delay.cpp | 195 +++++++++++++++++--------------------- tests/test_connect_resolve.cpp | 2 - tests/test_disconnect_inproc.cpp | 23 ++--- tests/test_hwm.cpp | 7 +- tests/test_invalid_rep.cpp | 2 - tests/test_monitor.cpp | 152 ++++++++++++++--------------- tests/test_msg_flags.cpp | 12 +-- tests/test_pair_inproc.cpp | 2 - tests/test_pair_ipc.cpp | 2 - tests/test_pair_tcp.cpp | 2 - tests/test_raw_sock.cpp | 8 +- tests/test_reqrep_device.cpp | 10 +- tests/test_reqrep_inproc.cpp | 2 - tests/test_reqrep_ipc.cpp | 2 - tests/test_reqrep_tcp.cpp | 2 - tests/test_router_mandatory.cpp | 1 - tests/test_shutdown_stress.cpp | 2 - tests/test_sub_forward.cpp | 24 +++-- tests/test_term_endpoint.cpp | 28 +++--- tests/test_timeo.cpp | 107 ++++++++------------- tests/testutil.hpp | 4 +- 21 files changed, 248 insertions(+), 341 deletions(-) commit c39cb0bde14c53009f745ce0e5669156cc76a8a7 Author: Pieter Hintjens Date: Thu Jan 31 16:26:28 2013 +0100 Rewrote completely, was bogusly testing EAGAIN tests/test_router_mandatory.cpp | 89 +++++++++++++++------------------------ 1 file changed, 35 insertions(+), 54 deletions(-) commit 3a558fcc4b8bfa72c649834b76d2fc7e9c93c74e Author: Pieter Hintjens Date: Thu Jan 31 15:00:17 2013 +0100 Rewrote raw test completely tests/test_raw_sock.cpp | 286 +++++++++++++++-------------------------------- 1 file changed, 88 insertions(+), 198 deletions(-) commit 8c9289342a1702d557b412487342e2f9a8bbf265 Author: Pieter Hintjens Date: Thu Jan 31 09:10:49 2013 +0100 Fixed use of deprecated zmq_init/term tests/test_connect_resolve.cpp | 4 ++-- tests/test_hwm.cpp | 4 ++-- tests/test_invalid_rep.cpp | 7 +++++-- tests/test_last_endpoint.cpp | 11 ++++++++++- tests/test_monitor.cpp | 4 ++-- tests/test_msg_flags.cpp | 10 ++++++++-- tests/test_pair_inproc.cpp | 4 ++-- tests/test_pair_ipc.cpp | 4 ++-- tests/test_pair_tcp.cpp | 4 ++-- tests/test_raw_sock.cpp | 1 - tests/test_reqrep_device.cpp | 4 ++-- tests/test_reqrep_inproc.cpp | 4 ++-- tests/test_reqrep_ipc.cpp | 4 ++-- tests/test_reqrep_tcp.cpp | 4 ++-- tests/test_router_mandatory.cpp | 4 ++-- tests/test_shutdown_stress.cpp | 6 +++--- tests/test_sub_forward.cpp | 4 ++-- tests/test_term_endpoint.cpp | 10 ++++------ tests/test_timeo.cpp | 4 ++-- 19 files changed, 56 insertions(+), 41 deletions(-) commit 5f009e5234fc7a4e79f5add942098abd71a58ee2 Author: Pieter Hintjens Date: Wed Jan 30 23:53:23 2013 +0100 Various cleanups to test programs tests/test_connect_delay.cpp | 6 ++---- tests/test_disconnect_inproc.cpp | 11 ++--------- tests/test_last_endpoint.cpp | 9 ++++----- tests/test_raw_sock.cpp | 36 +++++++++++++++++------------------- 4 files changed, 25 insertions(+), 37 deletions(-) commit 18a14aedead54354aac1a886a0e65c0fcd7afead Author: Pieter Hintjens Date: Wed Jan 30 23:53:09 2013 +0100 Added ZMQ_IPV6 option, cleaned up setsockopt code, it was nasty include/zmq.h | 3 +- src/options.cpp | 427 +++++++++++++++++++++++-------------------------------- 2 files changed, 181 insertions(+), 249 deletions(-) commit aa21e090e19496bedc2b87bae1cb8f6bc4356885 Author: Pieter Hintjens Date: Fri Jan 18 11:38:49 2013 +0100 Updated .gitignore .gitignore | 1 + 1 file changed, 1 insertion(+) commit 049931fc1eeb3e680c6b251a33ed983f8f6585cb Merge: 470d06b f1e77f2 Author: Pieter Hintjens Date: Wed Jan 30 08:04:31 2013 -0800 Merge pull request #507 from bjoto/master LIBZMQ-498 - Remove heap allocations in zmq_poll for small poll item sets commit f1e77f2246726e5e0303eef79f15cd44c4c4a383 Author: Bjorn Topel Date: Wed Jan 30 16:46:45 2013 +0100 Removed heap allocation for in zmq_poll for small item sets Until now, zmq_poll always allocates the poll items on the heap. Now, small item sets, up to ZMQ_POLLITEMS_DFLT, are stack allocated and only larger sets are allocated on the heap. include/zmq.h | 2 ++ src/zmq.cpp | 20 ++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) commit 470d06bb9ef3bb33920a9f6240340ec668e6fb1a Merge: e8cbfac e464a91 Author: Pieter Hintjens Date: Sun Jan 27 15:18:11 2013 -0800 Merge pull request #506 from arsenm/master Fix using wrong name for windows.h check with cmake commit e464a91086386de9bd65e0d9c3c55a38dff056a6 Author: Matt Arsenault Date: Sun Jan 27 18:09:32 2013 -0500 Fix using wrong name for windows.h check in cmake CMakeLists.txt | 2 +- builds/cmake/platform.hpp.in | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) commit e8cbfac9663169ffe1ab0deb47db2a8796a78172 Merge: abc8907 ba3e18f Author: Pieter Hintjens Date: Wed Jan 23 11:55:48 2013 -0800 Merge pull request #503 from chazmcgarvey/define-dummy-eproto define a dummy EPROTO for platforms that don't use it commit abc8907e440f0ccb4f1a8758892bf79d93a9847f Merge: 93618e7 f01bab6 Author: Pieter Hintjens Date: Wed Jan 23 11:55:17 2013 -0800 Merge pull request #505 from arsenm/master Fix perf-tools build on Linux with cmake commit 93618e7d02b83171c5db7672dfa795978194dd1e Merge: 7bc3e53 0a1bd45 Author: Pieter Hintjens Date: Wed Jan 23 11:55:02 2013 -0800 Merge pull request #504 from o172/master Adds tests/test_disconnect_inproc to .gitignore commit f01bab6633c170315f2a7d1aee71a46e122a4b0b Author: Matt Arsenault Date: Wed Jan 23 14:31:02 2013 -0500 Fix cmake not linking librt to perf-tools CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 0a1bd457210da2cff41ad36aefdedee2f6ed0757 Author: o172(xenovo) Date: Wed Jan 23 19:20:52 2013 +0000 Added tests/test_disconnect_inproc to .gitignore .gitignore | 1 + 1 file changed, 1 insertion(+) commit 7bc3e53b53fa43da46ff9f56113793abc7ad592e Merge: eeaa2c8 d850272 Author: Pieter Hintjens Date: Mon Jan 21 21:18:08 2013 -0800 Merge pull request #502 from ianbarber/master Add bounds check on upstream XSUB messages commit ba3e18f700659202247e38a7f48ea16d32bd8e79 Author: Charles McGarvey Date: Mon Jan 21 17:14:26 2013 -0700 define a dummy EPROTO for platforms that don't use it This accomplishes the same thing as 2e2ef7fd in a potentially cleaner way. src/err.hpp | 5 +++++ src/ipc_listener.cpp | 7 +------ src/tcp_listener.cpp | 7 +------ 3 files changed, 7 insertions(+), 12 deletions(-) commit d850272417dd7a3be4c5e0f429118f0005a0285b Author: Ian Barber Date: Mon Jan 21 16:11:27 2013 -0800 Add size check on XSUB message sends Ensures 0 length messages aren't being checked for subscribtion status on whatever data happens to be following the data pointer. src/xsub.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eeaa2c8e426b797be412f09c1a4071db1f6b2d01 Merge: 3a63218 2e2ef7f Author: Pieter Hintjens Date: Mon Jan 21 14:47:35 2013 -0800 Merge pull request #501 from chazmcgarvey/conditional-eproto do not use EPROTO on platforms that do not have it commit 2e2ef7fd330cd009c20b349a85d54e220d714f48 Author: Charles McGarvey Date: Mon Jan 21 15:00:55 2013 -0700 do not use EPROTO on platforms that do not have it src/ipc_listener.cpp | 7 ++++++- src/tcp_listener.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 3a632185a625c9025393a624559624d2de078f60 Merge: 29a1d8e 7918175 Author: Pieter Hintjens Date: Sun Jan 20 03:43:49 2013 -0800 Merge pull request #500 from haf/fixes/asciidoc-title Shortening the =-chars to make asciidoc work commit 791817571702f8d84379184bcbbe7b81b0c613dd Author: Henrik Date: Sat Jan 19 18:02:24 2013 +0100 Shortening the =-chars to make asciidoc work doc/zmq_ctx_term.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29a1d8ec6032e2ca9636ca112ed4ec033058772d Merge: f467011 21c97f0 Author: Pieter Hintjens Date: Thu Jan 17 23:49:52 2013 -0800 Merge pull request #499 from minrk/ac_header Minor autoconf tweaks commit f467011dbc718b251890a22cb6439cfc8b3d4424 Merge: 21fc2a9 edd43e1 Author: Pieter Hintjens Date: Thu Jan 17 23:49:32 2013 -0800 Merge pull request #498 from minrk/zmq_ctx_term deprecate zmq_ctx_destroy in favor of zmq_ctx_term commit 21c97f0cc27ae8de2887fe0bad22e3fef60a3e26 Author: MinRK Date: Thu Jan 17 16:00:38 2013 -0800 AM_CONFIG_HEADER -> AC_CONFIG_HEADERS AM_CONFIG_HEADER raises an 'obsolete error' with automake 1.13. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64c019e24d14bdefd91faaa345174bc36c4e738e Author: MinRK Date: Thu Jan 17 15:59:11 2013 -0800 move configure.in -> configure.ac autotools warns that configure.in should actually be named configure.ac configure.ac | 428 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 428 ---------------------------------------------------------- 2 files changed, 428 insertions(+), 428 deletions(-) commit edd43e1ca45b86b649cbcbdada801b04d2895001 Author: MinRK Date: Thu Jan 17 14:36:38 2013 -0800 deprecate zmq_ctx_destroy in favor of zmq_ctx_term in order to avoid logical collisions with pre-existing notions of context destruction in bindings (czmq, pyzmq). builds/redhat/zeromq.spec.in | 1 + doc/Makefile.am | 2 +- doc/zmq.txt | 2 +- doc/zmq_ctx_destroy.txt | 4 +-- doc/zmq_ctx_new.txt | 2 +- doc/zmq_ctx_term.txt | 66 ++++++++++++++++++++++++++++++++++++++ doc/zmq_term.txt | 2 +- include/zmq.h | 3 +- src/zmq.cpp | 9 ++++-- tests/test_connect_delay.cpp | 10 +++--- tests/test_disconnect_inproc.cpp | 2 +- 11 files changed, 88 insertions(+), 15 deletions(-) commit 21fc2a9946f65df7e03e852760b02833dd655018 Merge: c2fbb72 bbc5bef Author: Ian Barber Date: Mon Jan 14 19:54:38 2013 -0800 Merge pull request #497 from hintjens/master Clarified how icp:// works with zmq_bind commit bbc5befc66f187a769982b57b64712dbcc317250 Author: Pieter Hintjens Date: Mon Jan 14 17:49:19 2013 +0100 Clarified zmq_bind on icp:// doc/zmq_ipc.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit c2fbb722a4de76dd894702da893517d6c5f5ab98 Merge: 7d475ad 35f18ae Author: Pieter Hintjens Date: Sat Jan 12 08:33:33 2013 -0800 Merge pull request #496 from amuraru/master Fixed el5/el6 deps in RPM spec file / newline fix commit 35f18aef74bf016e00ba60b84af267054a38968f Author: Adrian Muraru Date: Fri Jan 11 22:51:08 2013 +0200 Fixed newline in test_disconnect_inproc tests/test_disconnect_inproc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fb0beb6f2942cfadb2a22fde97b809f26103741d Author: Adrian Muraru Date: Fri Jan 11 22:50:31 2013 +0200 Fixed el5/el6 deps in RPM spec file builds/redhat/zeromq.spec.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 7d475add7e798dca20f445453de43b88ef3eb0ac Merge: c1f76e4 d997d88 Author: Ian Barber Date: Tue Jan 8 06:22:27 2013 -0800 Merge pull request #495 from hintjens/master Whitespace and comment cleanups commit d997d88096f8588c0d80712a7fd2c212d36241d6 Author: Pieter Hintjens Date: Tue Jan 8 09:18:38 2013 +0100 Revert "Old change to move ports off 5555 (was conflicting with other stuff)" This reverts commit da0efaa81771aba497a961d70f2166f500a52afd. tests/test_connect_delay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aff14067135f66aa9ce7816e08bac3a9b661b3e2 Author: Pieter Hintjens Date: Tue Jan 8 09:18:23 2013 +0100 Revert "Test cases were failing on bind" This reverts commit 8ba097f3da8d1a752755a52b1d3ec967c23f0643. tests/test_raw_sock.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a4bedc52552b6e4f8a903c3781b7e9897b310741 Author: Pieter Hintjens Date: Tue Jan 8 09:16:50 2013 +0100 Whitespace and comment fixes src/xpub.cpp | 17 ++++++++--------- src/xsub.cpp | 20 +++++++++++--------- 2 files changed, 19 insertions(+), 18 deletions(-) commit da0efaa81771aba497a961d70f2166f500a52afd Author: Pieter Hintjens Date: Tue Jan 8 09:09:27 2013 +0100 Old change to move ports off 5555 (was conflicting with other stuff) tests/test_connect_delay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0f0d3fcb49de6f1ebb9227ae664b9f426ece290 Author: Pieter Hintjens Date: Sun Dec 23 17:59:34 2012 +0100 Clarification on zmq_msg_more doc/zmq_msg_more.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 12a648db0773960e8b374a3b0ed57de36c62174a Author: Pieter Hintjens Date: Sun Dec 23 17:57:35 2012 +0100 Specified that it's safe to call zmq_msg_more after zmq_msg_close doc/zmq_msg_more.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef186fe15bfc7344fca015bc212eb2e98d8d3ed7 Author: Pieter Hintjens Date: Sun Dec 23 17:47:44 2012 +0100 Spelling fixes src/stream_engine.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit af934f85caf5ec1e56514270c81ec57a92e106d9 Author: Pieter Hintjens Date: Sun Dec 23 17:47:32 2012 +0100 Removed use of deprecated API methods doc/zmq_msg_get.txt | 2 +- doc/zmq_msg_more.txt | 2 +- doc/zmq_recv.txt | 2 -- doc/zmq_recvmsg.txt | 1 - doc/zmq_send.txt | 2 -- doc/zmq_sendmsg.txt | 2 -- doc/zmq_socket_monitor.txt | 6 +++--- 7 files changed, 5 insertions(+), 12 deletions(-) commit 8ba097f3da8d1a752755a52b1d3ec967c23f0643 Author: Pieter Hintjens Date: Fri Nov 23 17:25:46 2012 +0900 Test cases were failing on bind tests/test_connect_delay.cpp | 2 +- tests/test_raw_sock.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit c1f76e433f2180544e834587ae884adc60f02d97 Merge: 98a91e8 d32e392 Author: Pieter Hintjens Date: Tue Jan 8 00:05:07 2013 -0800 Merge pull request #494 from jgm-radez/master allow XSUB/XPUB to send/recv messages unrelated to sub/unsub commit d32e3922785f170ce24159ab5e4b44badc473ec1 Author: John Muehlhausen Date: Mon Jan 7 22:24:24 2013 -0600 allow XSUB/XPUB to send/recv messages unrelated to sub/unsub (LIBZMQ-490) zmq::xpub_t::xread_activated() – change to process messages without 0 or 1 prefix, but without affecting subscriptions zmq::xsub_t::xsend() – change to send rather than discard messages without 0 or 1 prefix, but without affecting subscriptions Update documentation doc/zmq_socket.txt | 6 ++++-- src/xpub.cpp | 3 +++ src/xsub.cpp | 11 ++++------- 3 files changed, 11 insertions(+), 9 deletions(-) commit 98a91e852e87ae70dd320bd73d217c42c7eb950a Merge: 949d157 45f504d Author: Ian Barber Date: Wed Jan 2 12:51:43 2013 -0800 Merge pull request #493 from arsenm/master Fix minor problem with cmake bulid commit 45f504d3e24930eea540c4a0a76a64094c56fbda Author: Matt Arsenault Date: Wed Jan 2 15:50:04 2013 -0500 Fix looking for rc sources in toplevel binary directory CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 949d1578977ef11a46dfa1a991a2cc2affc0d9cc Merge: c7009d2 6ce4644 Author: Pieter Hintjens Date: Wed Jan 2 00:32:15 2013 -0800 Merge pull request #492 from arsenm/master Make CMake build usable for other systems commit 6ce464414bb453a40abadaa9d79389e5e3282fda Author: Matt Arsenault Date: Tue Jan 1 04:26:04 2013 -0500 Fix typos src/socket_base.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f770954d309c0778f1fe65a38b8e54c1063c8474 Author: Matt Arsenault Date: Tue Jan 1 05:42:46 2013 -0500 Fix a couple more warnings src/object.cpp | 1 + src/options.cpp | 7 +++++-- src/signaler.cpp | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) commit 6ecb796e77dd5d48b65d7e78c40be6ee95696f96 Author: Matt Arsenault Date: Tue Jan 1 17:16:50 2013 -0500 Fix warnings with MinGW src/ip.cpp | 3 +++ src/signaler.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 1ffc5d11dce5bbea970b9d9354e70d4e40346d38 Author: Matt Arsenault Date: Tue Jan 1 04:24:51 2013 -0500 Fix some of the -Wshadows src/options.cpp | 6 +++--- src/socket_base.cpp | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 14d3245e02f27857a80dba6ad6b7babed564a3d9 Author: Matt Arsenault Date: Tue Jan 1 04:01:24 2013 -0500 Fix -Wmismatched-tags src/i_decoder.hpp | 3 ++- src/i_msg_sink.hpp | 3 ++- src/i_msg_source.hpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit edb5a05add41de964170a1b72ae8038d30a00e17 Author: Matt Arsenault Date: Tue Jan 1 03:56:34 2013 -0500 Fix -Wmissing-field-initializers src/tcp_listener.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3ebab09ce4da3cd7e40355e5bd91a5e5a66d826b Author: Matt Arsenault Date: Tue Jan 1 03:26:31 2013 -0500 Fix unused argument warnings CMakeLists.txt | 12 +++++++++--- src/decoder.hpp | 2 +- src/zmq.cpp | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) commit e88dc494007e43a548c22e23b952e56832e60906 Author: Matt Arsenault Date: Tue Jan 1 06:53:56 2013 -0500 Fix random 3 space tabs CMakeLists.txt | 116 +++++++++++++++++++++++++++----------------------------- 1 file changed, 55 insertions(+), 61 deletions(-) commit 59cafecd9696817e0faa2ba00404aef75b3c1187 Author: Matt Arsenault Date: Tue Jan 1 21:04:19 2013 -0500 Fix MinGW32 build Fix link errors when using -m32 with MinGW CMakeLists.txt | 93 +++++++++++++++++++++++++----------------- builds/cmake/platform.hpp.in | 4 ++ 2 files changed, 59 insertions(+), 38 deletions(-) commit 3c7d4840a1ff54b4a0de8be08481dbdf9b3c257a Author: Matt Arsenault Date: Tue Jan 1 02:25:15 2013 -0500 Fix NSIS installer errors, MinGW build. The CPack NSIS installer was in a state where it would always give a useless error. I think it was using stuff intended for running cpack separately from cmake. CMakeLists.txt | 89 ++++++++++++++++---------------------- cmake/Modules/FindAsciiDoc.cmake | 7 ++- 2 files changed, 44 insertions(+), 52 deletions(-) commit a1d6a222ede4faec7cb27c5f0b67c1f7a0321e5d Author: Matt Arsenault Date: Mon Dec 31 18:23:25 2012 -0500 Generated header is not in ../src/ perf/inproc_lat.cpp | 2 +- perf/inproc_thr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4704159f7317b73dc779819f132516f8d273f0db Author: Matt Arsenault Date: Tue Jan 1 05:22:05 2013 -0500 Fix cmake build with sun studio CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 74763e2c8ee5eccf2bea0ca64e7f784be4307404 Author: Matt Arsenault Date: Tue Jan 1 05:34:44 2013 -0500 Don't use the toplevel cmake paths so the build works as a subproject CMakeLists.txt | 101 ++++++++++++++++++++++++------------ cmake/Modules/TestZMQVersion.cmake | 47 ++++++----------- 2 files changed, 82 insertions(+), 66 deletions(-) commit f3901b35d46c91ebd6a8f8b7b2110c15b54b90da Author: Matt Arsenault Date: Tue Jan 1 05:06:09 2013 -0500 Comments about ICC build failure with 12.x were crazy Fix warnings with ICC. CMakeLists.txt | 9 -- builds/cmake/platform.hpp.in | 3 - cmake/Modules/AutoconfHelper.cmake | 298 ------------------------------------ src/stream_engine.hpp | 2 +- 4 files changed, 1 insertion(+), 311 deletions(-) commit 0362c310a58f3304653592bf8c38f0d068e51c16 Author: Matt Arsenault Date: Mon Dec 31 17:52:32 2012 -0500 First pass at getting cmake build to work with non-Windows systems. Make doc building option dependent on asciidoc being installed Fix MSVC build requiring cygwin. Don't use try_run to get the version CMakeLists.txt | 939 +++++++++++++++++++++----------- builds/cmake/platform.hpp.in | 90 +++ cmake/Modules/AutoconfHelper.cmake | 298 ++++++++++ cmake/Modules/FindAsciiDoc.cmake | 19 + cmake/Modules/TestZMQVersion.cmake | 2 +- cmake/Modules/ZMQSourceRunChecks.cmake | 129 +++++ cmake/Modules/zmq_version.cpp | 31 -- src/libzmq.pc.cmake.in | 10 + 8 files changed, 1164 insertions(+), 354 deletions(-) commit 73c370dd1772e09be476ec8dcbe097fb5de939e9 Author: Matt Arsenault Date: Sun Dec 30 17:58:27 2012 -0500 Fix inconsistently using #if or #ifdef instead of #if defined src/ip.cpp | 4 ++-- src/zmq.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit c7009d274ecfe49eee8ae064a9d148dda98c3196 Merge: 1eee9ce 151a806 Author: Pieter Hintjens Date: Tue Jan 1 08:32:12 2013 -0800 Merge pull request #491 from pijyoi/issue84 fix for LIBZMQ-84: Address already in use (signaler.cpp) commit 1eee9ce035585096e9ce33fc1a149b6cf147d5b5 Merge: 8dda553 322808b Author: Pieter Hintjens Date: Sat Dec 29 02:26:06 2012 -0800 Merge pull request #490 from pijyoi/master eliminate dead code moved into zmq_utils.cpp commit 151a80619bf3f9c4696788f79cd2c934ed26246d Author: KIU Shueng Chuan Date: Sat Dec 29 18:05:15 2012 +0800 set SO_LINGER on first signaler socket to close in order to avoid TIME_WAIT state. src/signaler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 322808be9c9077bcd0acc921df6ceacc57a3c029 Author: KIU Shueng Chuan Date: Sat Dec 29 13:21:50 2012 +0800 eliminate code moved into zmq_utils.cpp src/zmq.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) commit 8dda553ac4cad4504e7f9007dc0e8e471aec89a1 Merge: ce24557 942c654 Author: Pieter Hintjens Date: Thu Dec 27 05:46:20 2012 -0800 Merge pull request #489 from pijyoi/master win32: fix Event handle leak commit 942c654d1cb556a91b4cca00bd4f0e50d5010a04 Author: KIU Shueng Chuan Date: Thu Dec 27 21:31:12 2012 +0800 win32: close zmq-signaler-port-sync event object to avoid handle leak src/signaler.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit ce24557b11cc26b10cb217f1c7556101f64b7095 Merge: 4febe88 2e9d4d4 Author: Pieter Hintjens Date: Tue Dec 11 22:34:52 2012 -0800 Merge pull request #488 from steve-o/openpgm-next Pull upstream OpenPGM 5.2.122 for multi-platform minor fixes. commit 2e9d4d413206f5ae307e5017c3744d267254feef Author: Steven McCoy Date: Tue Dec 11 21:41:10 2012 -0500 Pull upstream OpenPGM 5.2.122 for multi-platform minor fixes. CMakeLists.txt | 5 +++-- configure.in | 2 +- foreign/openpgm/libpgm-5.1.118~dfsg.tar.gz | Bin 1046589 -> 0 bytes foreign/openpgm/libpgm-5.2.122~dfsg.tar.gz | Bin 0 -> 951536 bytes 4 files changed, 4 insertions(+), 3 deletions(-) commit 4febe88b2be300f8712a2e9ec57c351ccc39a102 Merge: 2a7b219 a0cecc7 Author: Pieter Hintjens Date: Tue Dec 11 08:09:08 2012 -0800 Merge pull request #487 from miniway/master returns -1 with EAGAIN when mandatory is set and pipe is full commit a0cecc718d3d95279dcc7b0d9b6c1d09fb4cfd97 Author: Min(Dongmin Yu) Date: Tue Dec 11 19:41:36 2012 +0900 returns -1 with EAGAIN when mandatory is set and pipe is full src/router.cpp | 12 ++++++------ tests/test_router_mandatory.cpp | 9 ++++----- 2 files changed, 10 insertions(+), 11 deletions(-) commit 2a7b219f073d3bccb062379d3fc4ef933c8bab56 Merge: 8da6b7a 394d755 Author: Pieter Hintjens Date: Sun Dec 9 01:25:51 2012 -0800 Merge pull request #486 from miniway/master return EHOSTUNREACH at full only when mandatory is set commit 394d755cf303ad6c263e877ebcda97108ad8666e Author: Min(Dongmin Yu) Date: Sun Dec 9 16:52:45 2012 +0900 return EHOSTUNREACH at full only when mandatory is set src/router.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8da6b7a6fdb176aa184584001325920a04674be7 Merge: 95d36f4 9382941 Author: Pieter Hintjens Date: Fri Dec 7 23:19:20 2012 -0800 Merge pull request #485 from miniway/master returns EHOSTUNREACH when a peer is full if ZMQ_ROUTER_MANDATORY is set commit 9382941adc664f98535fd962d1262ff50fce3b71 Author: Min(Dongmin Yu) Date: Sat Dec 8 10:20:42 2012 +0900 returns EHOSTUNREACH when a peer is full if ZMQ_ROUTER_MANDATORY is set src/router.cpp | 9 ++++++-- tests/test_router_mandatory.cpp | 46 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 3 deletions(-) commit 95d36f42eea67b1752e819c9c49b19c74d6b938e Merge: ebd1bf9 6706efb Author: Martin Hurton Date: Fri Dec 7 01:54:56 2012 -0800 Merge pull request #484 from pijyoi/master fix wrong boolean operator in router_raw test code commit 6706efba2857b5b352a19a7f5ac575d7e3369ed7 Author: KIU Shueng Chuan Date: Fri Dec 7 17:45:05 2012 +0800 fix wrong boolean operator tests/test_raw_sock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebd1bf9bcf41fb812e452101b97eef55503b2b67 Merge: b2f6741 21345ff Author: Martin Hurton Date: Tue Dec 4 14:05:48 2012 -0800 Merge pull request #482 from sradomski/master Close pipes for inproc sockets on zmq_disconnect commit 21345ffa5076aa587611e7099678f9cacdc9f160 Author: Stefan Radomski Date: Tue Dec 4 17:40:43 2012 +0100 Break early when pipe to be removed was found src/socket_base.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f9770e93efb75827410b13a20b83bcf08b13819d Author: Stefan Radomski Date: Tue Dec 4 17:31:46 2012 +0100 Fixed iterator when erasing from inprocs multimap src/socket_base.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 624dd1e5b5258d581149c173f3e95aff1e03a73f Author: Stefan Radomski Date: Tue Dec 4 17:10:32 2012 +0100 Removal of terminated pipes from inproc and ignoring peer ends src/socket_base.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 66c22456b97e1278ec0b24dcd1ff66e619d8fca2 Author: Stefan Radomski Date: Tue Dec 4 15:14:21 2012 +0100 Close pipes for inproc sockets on zmq_disconnect - fixes LIBZMQ-476 and LIBZMQ-475 AUTHORS | 1 + doc/zmq_disconnect.txt | 2 + src/socket_base.cpp | 33 ++++++++++- src/socket_base.hpp | 4 ++ tests/Makefile.am | 5 +- tests/test_disconnect_inproc.cpp | 119 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 162 insertions(+), 2 deletions(-) commit b2f6741bcb73892fca4f7d374f18aecbf89435cb Merge: 013a99d 75161b5 Author: Pieter Hintjens Date: Sat Dec 1 00:53:02 2012 -0800 Merge pull request #481 from ianbarber/master Simplify test_connect_delay commit 75161b5c62f5f37e00573b3894cf8dc2b960e654 Author: Ian Barber Date: Fri Nov 30 23:07:12 2012 +0000 Serialise test_connect_delay Simplify the test connect delay test script, removing the threads and moving to a serialised version. AFAICS this should provide the same test, but without the race conditions that happened with the previous test. tests/test_connect_delay.cpp | 215 +++++++++++++++++++++--------------------- 1 file changed, 106 insertions(+), 109 deletions(-) commit 013a99daabeb6e31234341da8130a9ce7f7fb882 Merge: a4a7316 3fc8c70 Author: Martin Hurton Date: Fri Nov 30 13:41:54 2012 -0800 Merge pull request #480 from vperron/master Tiny fix commit 3fc8c7073d68235f0f6506d3c705778b40b86d15 Author: Victor Perron Date: Fri Nov 30 22:16:20 2012 +0100 Same fix, in-line style src/decoder.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33f42efb48af75194a31c5be8cd01868a12062f8 Author: Victor Perron Date: Fri Nov 30 21:39:22 2012 +0100 Change NULL to 0 to keep compatibility with some cross-compiling GCC versions src/decoder.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4a731652a2e7db91a8fa692c073da8c1dce0834 Merge: cae5d3b 1d11f19 Author: Pieter Hintjens Date: Mon Nov 26 08:23:43 2012 -0800 Merge pull request #479 from ianbarber/master Update RPM spec file commit 1d11f196b1c556516177fa645c351bfadfa8a31c Author: Ian Barber Date: Mon Nov 26 16:12:25 2012 +0000 Update SPEC file Update the RPM spec file with Justin Cook's changes to fix the build for 3.2.2. (https://zeromq.jira.com/browse/LIBZMQ-473) builds/redhat/zeromq.spec.in | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit cae5d3b817fc6bbfc67b41e89585989900d6bbd3 Merge: d1cbf96 359a505 Author: Pieter Hintjens Date: Thu Nov 22 01:16:55 2012 -0800 Merge pull request #478 from methodmissing/event-messages-3.2 Event message memory corruption fixes commit d1cbf96cdee1677ebee6a1384dbdff4ef0f23a37 Merge: a28322c e6da46f Author: Martin Hurton Date: Thu Nov 22 00:03:02 2012 -0800 Merge pull request #477 from hintjens/master Added autogen.sh hint to INSTALL commit e6da46ff8c8243419a16069bca364eb0adbbfca0 Author: Pieter Hintjens Date: Thu Nov 22 12:09:02 2012 +0900 Added autogen.sh hint INSTALL | 7 +++++++ 1 file changed, 7 insertions(+) commit 359a50594930b3522d354d790fdbca73a92ef52b Author: Lourens Naudé Date: Thu Nov 22 00:12:17 2012 +0000 Prefer malloc to new for event address allocation as per Martin's recommendation src/socket_base.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit a28322cd0cf7a62e4f41d70fa3896a438c23db9d Merge: 8db8c45 a8721c3 Author: Pieter Hintjens Date: Wed Nov 21 14:15:59 2012 -0800 Merge pull request #476 from hurtonm/master Check decoder's state function for NULL before calling it commit a8721c3c04f41f0b90a4b1ebaf4bcd767c45a6ab Author: Martin Hurton Date: Wed Nov 21 22:50:55 2012 +0100 Check decoder's state function for NULL before calling it Fixes bug reported by Peter Friend (http://lists.zeromq.org/pipermail/zeromq-dev/2012-November/019425.html) src/decoder.hpp | 4 ++++ 1 file changed, 4 insertions(+) commit b1f4850153dbddb66c8e32fe3ce70361e954a38a Author: Lourens Naudé Date: Wed Nov 21 18:27:53 2012 +0000 Let socket event messages initialize with zmq_msg_init_data and let the framework handle cleanup src/socket_base.cpp | 6 ++++-- src/socket_base.hpp | 5 +++++ src/zmq.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) commit f78ca629b5b923c4a0485238d16e78c9eb131618 Merge: 6d245eb 8db8c45 Author: Lourens Naudé Date: Wed Nov 21 18:04:05 2012 +0000 Merge branch 'master' of github.com:zeromq/libzmq commit 8db8c45b185557a2e8abd7818ba8d0c260725d7d Merge: 7e6c304 be4cc2f Author: Pieter Hintjens Date: Tue Nov 20 13:27:43 2012 -0800 Merge pull request #475 from ianbarber/master Add ZMTP link to zmq_tcp doc. commit be4cc2f80aaeb202f7fc63ff0e729b428fbcdcd0 Author: Ian Barber Date: Tue Nov 20 19:10:47 2012 +0000 Update zmq_tcp to include a reference to RFC Include a note with a link to ZMQ RFC 15 for the ZMTP protocol description. doc/zmq_tcp.txt | 2 ++ 1 file changed, 2 insertions(+) commit 7e6c304a9871891f96a7d3c9254c863ad98a4e17 Merge: 1a18c7b 1489857 Author: Ian Barber Date: Mon Nov 19 02:40:36 2012 -0800 Merge pull request #474 from hintjens/master Fixed doc for SNDHWM commit 14898579734ffe14d37a9b5ea74c880582eddabf Author: Pieter Hintjens Date: Mon Nov 19 16:32:58 2012 +0900 Fixed ZMQ_SNDHWM description doc/zmq_setsockopt.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7533ebb33d1cc6f23061e0228bf7eb22713aaa17 Author: Pieter Hintjens Date: Mon Nov 19 10:20:56 2012 +0900 Clarified that SNDHWM is per part, not message doc/zmq_setsockopt.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6d245eb6bc614c050d7650c564fd1a986475cc67 Author: Lourens Naudé Date: Sat Nov 17 11:29:47 2012 +0000 Copy monitor specific event endpoints to event messages as the engine etc. can be released at anytime src/ipc_connecter.cpp | 8 +++---- src/ipc_listener.cpp | 10 ++++---- src/socket_base.cpp | 61 +++++++++++++++++++++++++++++++------------------ src/socket_base.hpp | 27 ++++++++++++---------- src/stream_engine.cpp | 2 +- src/tcp_connecter.cpp | 8 +++---- src/tcp_listener.cpp | 8 +++---- 7 files changed, 72 insertions(+), 52 deletions(-) commit ce4d32168440d5767805b7ee7cbfaac2f4c3f272 Author: Lourens Naudé Date: Sat Nov 17 10:06:09 2012 +0000 Revert "Merge pull request #473 from methodmissing/fix-engine-endpoint" This reverts commit 1a18c7b0a816e10f8a8a770b2141d47f661f0302, reversing changes made to bef9a41bdb991b867981317e0e20ee174ecd6fea. src/stream_engine.cpp | 6 ++---- src/stream_engine.hpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit 1a18c7b0a816e10f8a8a770b2141d47f661f0302 Merge: bef9a41 fdf162a Author: Ian Barber Date: Fri Nov 16 13:06:24 2012 -0800 Merge pull request #473 from methodmissing/fix-engine-endpoint [LIBZMQ-450] Copy the stream engine endpoint - string reference caused memory corruption commit fdf162a117782720ed8b7a1cbb71194f0c5136a9 Author: Lourens Naudé Date: Fri Nov 16 17:21:07 2012 +0000 [LIBZMQ-450] Copy the stream engine endpoint - string reference caused memory corruption src/stream_engine.cpp | 6 ++++-- src/stream_engine.hpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) commit bef9a41bdb991b867981317e0e20ee174ecd6fea Merge: 01b9bc3 b8d5d3f Author: Pieter Hintjens Date: Thu Nov 15 17:58:44 2012 -0800 Merge pull request #472 from jgm-radez/master Issue 468 commit b8d5d3fa695c5026c2af36daa8e357978ab135ac Author: John Muehlhausen Date: Thu Nov 15 15:30:30 2012 -0600 Issue 468 XPUB "verbose" mode excludes unsubscriptions src/xpub.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01b9bc36631f168ec2096e88a4d280cc45912557 Merge: 37f8ce6 5205415 Author: Pieter Hintjens Date: Wed Nov 14 02:12:29 2012 -0800 Merge pull request #471 from methodmissing/fix-disconnect-event-addr Fix addresses on triggered events commit 5205415beb7631200a0dc150d1e6acf8089b65ff Author: Lourens Naudé Date: Wed Nov 14 09:51:24 2012 +0000 Fix addresses on triggered events src/socket_base.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 37f8ce69c17c7200605d3c3e688bf1a9e191e121 Merge: 30eaadd 6559da3 Author: Martin Hurton Date: Tue Nov 13 12:13:58 2012 -0800 Merge pull request #470 from cdolan/master Fixed test compilation issue by using memset/memmove rather than bzero/bcopy commit 6559da3033f20bd978a9647d21343f5978b311ec Author: Christopher Dolan Date: Tue Nov 13 19:33:18 2012 +0000 Use memset/memmove rather than bzero/bcopy tests/test_raw_sock.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 30eaadddc3d95e194966e96e8b4a011ee7e5638b Merge: c179ad1 9013ee0 Author: Ian Barber Date: Tue Nov 13 04:29:44 2012 -0800 Merge pull request #469 from hurtonm/code_cleanup Minor code cleanup commit 9013ee0d52bb88a5ea08b78c1d31ea5b1b0cd95d Author: Martin Hurton Date: Tue Nov 13 13:06:29 2012 +0100 Minor code cleanup src/epoll.cpp | 5 +++-- src/kqueue.cpp | 5 +++-- src/poll.cpp | 6 +++--- src/select.cpp | 5 +++-- 4 files changed, 12 insertions(+), 9 deletions(-) commit c179ad11730cfe742ccd74577372aef43fed2fa1 Merge: 99f7144 c543b2c Author: Pieter Hintjens Date: Tue Nov 13 03:56:01 2012 -0800 Merge pull request #468 from hurtonm/issue_465 Resolve LIBZMQ-465 commit c543b2ce8cb0dd8790e7bdc89b08ef49812616d4 Author: Martin Hurton Date: Sat Nov 10 23:05:10 2012 +0100 Resolve LIBZMQ-465 src/decoder.cpp | 5 ----- src/decoder.hpp | 24 ++++++++++++++++++------ src/i_decoder.hpp | 2 +- src/raw_decoder.cpp | 2 +- src/raw_decoder.hpp | 2 +- src/stream_engine.cpp | 17 +++++++++++------ src/stream_engine.hpp | 4 +++- src/v1_decoder.cpp | 5 ----- src/v1_decoder.hpp | 2 -- 9 files changed, 35 insertions(+), 28 deletions(-) commit 99f714445f67d552eb2add6ed5f818d546dce901 Merge: 793895c 66dc4d8 Author: Pieter Hintjens Date: Fri Nov 9 08:45:22 2012 -0800 Merge pull request #467 from hurtonm/code_cleanup Code cleanup commit 66dc4d8b542ca8571b66cc7fcf97daa87734e36f Author: Martin Hurton Date: Fri Nov 9 17:17:43 2012 +0100 Don't pass flags to xrecv method src/dealer.cpp | 5 +---- src/dealer.hpp | 2 +- src/pair.cpp | 5 +---- src/pair.hpp | 2 +- src/pub.cpp | 2 +- src/pub.hpp | 2 +- src/pull.cpp | 5 +---- src/pull.hpp | 2 +- src/rep.cpp | 6 +++--- src/rep.hpp | 2 +- src/req.cpp | 8 ++++---- src/req.hpp | 2 +- src/router.cpp | 5 +---- src/router.hpp | 2 +- src/socket_base.cpp | 8 ++++---- src/socket_base.hpp | 2 +- src/xpub.cpp | 5 +---- src/xpub.hpp | 2 +- src/xsub.cpp | 5 +---- src/xsub.hpp | 2 +- 20 files changed, 28 insertions(+), 46 deletions(-) commit 7865f96e97e6e225d19e9f75317196e62f378cd9 Author: Martin Hurton Date: Fri Nov 9 17:08:03 2012 +0100 Don't pass flags to xsend method src/dealer.cpp | 4 ++-- src/dealer.hpp | 2 +- src/dist.cpp | 13 +++++-------- src/dist.hpp | 6 +++--- src/lb.cpp | 5 +---- src/lb.hpp | 2 +- src/pair.cpp | 4 ++-- src/pair.hpp | 2 +- src/push.cpp | 4 ++-- src/push.hpp | 2 +- src/rep.cpp | 6 +++--- src/rep.hpp | 2 +- src/req.cpp | 6 +++--- src/req.hpp | 2 +- src/router.cpp | 5 +---- src/router.hpp | 2 +- src/socket_base.cpp | 6 +++--- src/socket_base.hpp | 2 +- src/sub.cpp | 4 ++-- src/sub.hpp | 2 +- src/xpub.cpp | 4 ++-- src/xpub.hpp | 2 +- src/xsub.cpp | 6 +++--- src/xsub.hpp | 2 +- 24 files changed, 43 insertions(+), 52 deletions(-) commit 793895c477cab1da4edd1565d9f70bc8f7d485a8 Merge: d1e0889 b78800e Author: Pieter Hintjens Date: Fri Nov 9 06:51:04 2012 -0800 Merge pull request #466 from hurtonm/code_cleanup Simplify implementation of DEALER socket commit b78800e467cb56820f07484e25e2360254ce8c5b Author: Martin Hurton Date: Fri Nov 9 15:45:25 2012 +0100 Simplify implementation of DEALER socket src/dealer.cpp | 26 ++------------------------ src/dealer.hpp | 6 ------ 2 files changed, 2 insertions(+), 30 deletions(-) commit d1e0889ab02b093233bb4fae26723c9b8daecb3b Merge: 3eaf4a9 6290054 Author: Martin Hurton Date: Fri Nov 9 06:19:23 2012 -0800 Merge pull request #463 from hintjens/master Addded ROUTER-ROUTER (back) as valid combination commit 3eaf4a967c6e9ea2dee9ec5f7bbb6753f4c17900 Merge: de33978 19a8ea4 Author: Pieter Hintjens Date: Fri Nov 9 06:13:18 2012 -0800 Merge pull request #465 from steve-o/cmake-minor Cmake minor version labeling and sync with 3.x commit 19a8ea4584f63d9fbdb695347f1d9b359f70698f Author: Steven McCoy Date: Fri Nov 9 08:54:14 2012 -0500 Update source list with raw codec. CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) commit 3ba401d7da3b01f97fd8a0409aace71d7f81a6a3 Author: Steven McCoy Date: Fri Nov 9 08:48:59 2012 -0500 Bring along CMake patchset from zeromq3-x for adding minor version to Windows labeling. CMakeLists.txt | 96 +++++++++++++++++++++++++++++----------------- cmake/NSIS.template64.in | 20 +++++----- 2 files changed, 70 insertions(+), 46 deletions(-) commit de339785f261ad85146dfdf23d6b6c89ea3011fa Merge: ec08241 ea19b7b Author: Pieter Hintjens Date: Fri Nov 9 05:19:05 2012 -0800 Merge pull request #464 from hurtonm/code_cleanup Code cleanup commit ea19b7b65801669308b776c644acb056fa29a4e9 Author: Martin Hurton Date: Fri Nov 9 14:12:11 2012 +0100 Small cleanups src/options.cpp | 2 +- src/req.cpp | 1 - src/session_base.cpp | 2 -- src/socket_base.cpp | 14 +++++--------- 4 files changed, 6 insertions(+), 13 deletions(-) commit 925a53066344f24279763205d01dde4dfcf3ff7c Author: Martin Hurton Date: Fri Nov 9 14:02:19 2012 +0100 Use const_cast operator to remove const modifier src/socket_base.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 82999f2d203295265f323ec44799296012959db4 Author: Martin Hurton Date: Fri Nov 9 13:49:27 2012 +0100 Don't forward identities to DEALER sockets src/dealer.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 6290054f00596a1b4b29b3a2e2c2d7c1a00549e3 Author: Pieter Hintjens Date: Fri Nov 9 21:10:34 2012 +0900 Added ROUTER-ROUTER as legal combination doc/zmq_socket.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec0824142ec6bc4932919b53f5d511b6f983693e Merge: 4e028ec c1e960b Author: Pieter Hintjens Date: Thu Nov 8 17:02:50 2012 -0800 Merge pull request #462 from hurtonm/raw_fixes Fix raw mode on reconnect commit c1e960b31d0a2ffdcb3016e7301b9da5ca612493 Author: Martin Hurton Date: Thu Nov 8 18:17:11 2012 +0100 Never exchange identities for sockets in raw mode Zeromq shall never send/receive socket identifiers for sockets in raw mode. The existing implementation breaks this requirement after reconnection. src/session_base.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit aec47b364225c347a7edca778185f407308c2e83 Author: Martin Hurton Date: Thu Nov 8 14:31:26 2012 +0100 Extend ZMQ_ROUTER_RAW test Add test when the zeromq socket connects to a TCP socket. The test now fails due to bug in the zeromq library. tests/test_raw_sock.cpp | 103 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit 872ef76f3c45bcd1cc30eb45b8eb3545b70808f1 Author: Pieter Hintjens Date: Wed Nov 7 17:23:37 2012 +0100 Added DEALER-DEALER as legal combination doc/zmq_socket.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e028ecb30a9fcd8d8c26c9e92de8077c306ef93 Merge: 5da9712 e51a1f0 Author: Pieter Hintjens Date: Tue Nov 6 21:20:54 2012 -0800 Merge pull request #461 from hurtonm/code_cleanup session_base: code cleanup commit e51a1f04c9812bd77c4d0062d53f6874ec5efa62 Author: Martin Hurton Date: Tue Nov 6 23:47:43 2012 +0100 session_base: code cleanup - add unlikely hints - drop unnecessary assertion - style fixes There is no need to require the 'more' flag in the provided message structure be 0 when pulling message from the session. src/session_base.cpp | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 5da971275dcccb7d41dadf2b8e030983d57c18aa Merge: 80aef8d 777c38a Author: Ian Barber Date: Tue Nov 6 07:05:52 2012 -0800 Merge pull request #460 from hintjens/master Renamed ZMQ_ROUTER_RAW_SOCK to ZMQ_ROUTER_RAW commit 777c38ae32a5d1799b3275d38ff8d587c885dd55 Author: Pieter Hintjens Date: Tue Nov 6 13:18:58 2012 +0100 Renamed raw option to ZMQ_ROUTER_RAW doc/zmq_setsockopt.txt | 17 +++++++++++++++++ include/zmq.h | 2 +- src/router.cpp | 4 ++-- tests/test_raw_sock.cpp | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) commit 80aef8dfda2bea1efcf20da983ca45cdd287385f Merge: 1348924 41dc2e6 Author: Pieter Hintjens Date: Tue Nov 6 00:47:59 2012 -0800 Merge pull request #459 from hurtonm/issue_459 Resolve LIBZMQ-459 commit 41dc2e60493ff1f10a8d2c4c8ae41f55ee4c327e Author: Martin Hurton Date: Fri Nov 2 11:11:14 2012 +0100 Resolve LIBZMQ-459 Ref: https://zeromq.jira.com/browse/LIBZMQ-459 src/stream_engine.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 13489242513a6b1b67c23a5baa39ed9ab4ca7cea Merge: 2deb2e0 f67a199 Author: Martin Hurton Date: Mon Nov 5 09:41:56 2012 -0800 Merge pull request #458 from vortechs2000/remove_cpp_comments_from_zmq_h Older versions of C compilers don't like C++ comments commit f67a19933202c01a1ead80aa2943356c8e7915bf Author: AJ Lewis Date: Mon Nov 5 11:27:13 2012 -0600 Older versions of C compilers don't like C++ comments There's no need to exclude older compilers by putting C++ style comments in the C API header. include/zmq.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2deb2e095eead548f52e837d679e17a9d96574d2 Merge: cdd7cd1 1e60d17 Author: Pieter Hintjens Date: Thu Nov 1 21:47:23 2012 -0700 Merge pull request #457 from mjasperse/patch-1 Update builds/msvc/libzmq/libzmq.vcproj commit 1e60d17a23ce943ac7575185acfe5049e70c7e2a Author: mjasperse Date: Fri Nov 2 11:29:46 2012 +1100 Update builds/msvc/libzmq/libzmq.vcproj Without the LinkDLL statement, command-line compile using vcbuild attempts to compile EXE and complains about entrypoint The LinkDLL statement forces the linker to produce desired output builds/msvc/libzmq/libzmq.vcproj | 3 +++ 1 file changed, 3 insertions(+) commit cdd7cd10c95897c299febb1a6856ca9cdc5579f2 Merge: 04e716a 7c66e8f Author: Ian Barber Date: Thu Nov 1 07:04:17 2012 -0700 Merge pull request #456 from hurtonm/issue_464 Resolve LIBZMQ-464 commit 7c66e8f807881e0e98d6b8b5f28908777375b4c5 Author: Martin Hurton Date: Thu Nov 1 14:37:42 2012 +0100 Resolve LIBZMQ-464 src/msg.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 04e716ac9967c6d3318c2db3bdb9d83f54a1db60 Merge: 0404b3b 79da450 Author: Ian Barber Date: Wed Oct 31 01:16:05 2012 -0700 Merge pull request #455 from hintjens/master zmq_getsockopt man page was malformatted commit 79da450b8b3e4d100b3fa2eaca467850f481adb4 Author: Pieter Hintjens Date: Wed Oct 31 04:28:53 2012 +0100 Fixed formatting in man page .gitignore | 1 + doc/zmq_getsockopt.txt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) commit 0404b3b60a8e1b95c928f26c304b1ee7ff7ffa7c Merge: abbe34c 9d8eb1f Author: Pieter Hintjens Date: Tue Oct 30 04:24:21 2012 -0700 Merge pull request #454 from hurtonm/code_cleanup Style fixes commit 9d8eb1f9b94da7330b7c7ef2735c6a329a640a71 Author: Martin Hurton Date: Tue Oct 30 12:18:13 2012 +0100 Style fixes src/decoder.hpp | 5 +- src/i_decoder.hpp | 2 +- src/options.hpp | 2 +- src/raw_decoder.cpp | 2 +- src/raw_decoder.hpp | 2 +- src/raw_encoder.cpp | 1 - src/raw_encoder.hpp | 1 - src/router.cpp | 36 ++++++------- src/session_base.cpp | 14 ++--- src/stream_engine.cpp | 17 ++++--- tests/test_raw_sock.cpp | 129 +++++++++++++++++++++-------------------------- 11 files changed, 99 insertions(+), 112 deletions(-) commit abbe34cdc2c5889e3de021bdc237a297ffa654a6 Merge: 4bc405a d16e0a5 Author: Pieter Hintjens Date: Tue Oct 30 03:12:46 2012 -0700 Merge pull request #453 from hurtonm/issue_458 Resolve LIBZMQ-458 commit d16e0a534263eb80331b4b79c583b16e726a58dd Author: Martin Hurton Date: Tue Oct 30 11:03:41 2012 +0100 Resolve LIBZMQ-458 Ref: https://zeromq.jira.com/browse/LIBZMQ-458 tests/test_router_mandatory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bc405a366db75567dbc3175b8bb3578cce7685b Merge: 7523b9e 83387b4 Author: Pieter Hintjens Date: Mon Oct 29 21:00:15 2012 -0700 Merge pull request #452 from hshardeesi/master New socket option (ZMQ_ROUTER_RAW_SOCK) for ZMQ_ROUTER sockets commit 7523b9ed29869b7bbe8d5b9c567675f756b565ff Merge: dcf0693 3aa3032 Author: Pieter Hintjens Date: Mon Oct 29 03:21:33 2012 -0700 Merge pull request #451 from hurtonm/use_correct_types_in_stream_engine Use correct types when returning value in read/write methods commit dcf0693d6eb20e143d38a58fb389c2d9068a4080 Merge: 19f77a1 03deb2c Author: Pieter Hintjens Date: Mon Oct 29 03:21:09 2012 -0700 Merge pull request #450 from hurtonm/issue_447 Resolve LIBZMQ-447 commit 3aa30329d18109cfdfefbacfb53cbc927ce7a964 Author: Martin Hurton Date: Sat Sep 29 13:28:25 2012 +0200 Use correct types when returning value in read/write methods src/stream_engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 03deb2c97aa6447005d49128f24e253a941b98d7 Author: Martin Hurton Date: Mon Oct 29 10:09:00 2012 +0100 Resolve LIBZMQ-447 src/socket_base.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 83387b4073233955c5033d377e6d21e74fafc793 Author: Hardeep Date: Mon Oct 29 00:03:36 2012 -0700 Added support for non-zmq tcp client connections to router socket. - Created a new option ZMQ_ROUTER_RAW_SOCK - Added new raw_encoder and raw_decoder to receive and send messages in raw form to remote client - Added test case file tests/test_raw_sock.cpp o To create a raw router sock set the ZMQ_ROUTER_RAW_SOCK option o ZMQ_MSGMORE flag is ignored for non-id messages o To terminate a remote connection send id message followed by zero length data message AUTHORS | 1 + include/zmq.h | 1 + src/Makefile.am | 6 +- src/decoder.hpp | 5 ++ src/i_decoder.hpp | 3 +- src/options.cpp | 1 + src/options.hpp | 3 + src/raw_decoder.cpp | 99 ++++++++++++++++++++++++++++ src/raw_decoder.hpp | 69 ++++++++++++++++++++ src/raw_encoder.cpp | 87 ++++++++++++++++++++++++ src/raw_encoder.hpp | 69 ++++++++++++++++++++ src/router.cpp | 74 +++++++++++++++------ src/router.hpp | 1 + src/session_base.cpp | 14 ++++ src/stream_engine.cpp | 42 +++++++++--- tests/Makefile.am | 4 +- tests/test_raw_sock.cpp | 167 +++++++++++++++++++++++++++++++++++++++++++++++ 17 files changed, 615 insertions(+), 31 deletions(-) commit 19f77a1ccfaf431afec221c5a66888541a48152f Merge: 6b45262 0bf8a4d Author: Ian Barber Date: Sat Oct 27 18:25:42 2012 -0700 Merge pull request #449 from hintjens/master Fixed code formatting commit 0bf8a4d2d2474a738f883db718a4d65beb7138e9 Author: Pieter Hintjens Date: Sun Oct 28 07:36:18 2012 +0900 Code formatting src/xsub.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6b45262086133cc9f9e130de0c656543d063078a Merge: bb59dc1 500f6cf Author: Pieter Hintjens Date: Sat Oct 27 14:01:48 2012 -0700 Merge pull request #448 from jgm-radez/master resolve issue 456 commit 500f6cffe36504a70980a1ac4904fe4e9c3b727c Author: John Muehlhausen Date: Sat Oct 27 15:51:03 2012 -0500 patch for issue 456 Do not filter out duplicate subscriptions on the XSUB side of XSUB/XPUB, so that ZMQ_XPUB_VERBOSE doesn't get blocked by forwarding devices (as long as the devices all use ZMQ_XPUB_VERBOSE) src/xsub.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bb59dc1b2a426a4f9be9a84ace774e8372dbc43a Merge: 0b13872 171897f Author: Ian Barber Date: Fri Oct 26 19:50:32 2012 -0700 Merge pull request #447 from hintjens/master Cleanups to man pages commit 171897f4e8550e9f339e5e3607335c5e8d6b9d1f Author: Pieter Hintjens Date: Sat Oct 27 09:43:19 2012 +0900 Cleanups to man pages doc/zmq_bind.txt | 49 +++++++++++++---------- doc/zmq_connect.txt | 57 +++++++++++++------------- doc/zmq_inproc.txt | 28 ++++++------- doc/zmq_ipc.txt | 39 ++++++++++-------- doc/zmq_pgm.txt | 32 +++++++-------- doc/zmq_socket.txt | 52 ++++++++++++------------ doc/zmq_tcp.txt | 111 ++++++++++++--------------------------------------- 7 files changed, 158 insertions(+), 210 deletions(-) commit 0b13872ff4483c72e586abbd93e500f35d0f7440 Merge: 01be614 ef79492 Author: Pieter Hintjens Date: Thu Oct 25 02:21:31 2012 -0700 Merge pull request #446 from hurtonm/issue_452 Resolve LIBZMQ-452 commit 01be614593e4cc44403c6274cd9e307b0ba3ce49 Merge: d2ee38a 4824237 Author: Pieter Hintjens Date: Thu Oct 25 02:15:46 2012 -0700 Merge pull request #445 from hurtonm/issue_417 Resolve LIBZMQ-417 commit ef794925b437c643a3a0d5681eb22e008975ebe2 Author: Martin Hurton Date: Wed Oct 24 23:46:58 2012 +0200 Resolve LIBZMQ-452 Ref: https://zeromq.jira.com/browse/LIBZMQ-452 tests/test_connect_delay.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4824237761c79a8e21b350fd32b1ef177996e331 Author: Martin Hurton Date: Wed Oct 24 22:05:45 2012 +0200 Resolve LIBZMQ-417 Ref: https://zeromq.jira.com/browse/LIBZMQ-417 src/session_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2ee38acfe732ac1216699da51609fdb4d24fc97 Merge: 2675a9d 422c418 Author: Pieter Hintjens Date: Wed Oct 24 06:50:02 2012 -0700 Merge pull request #444 from vortechs2000/fix_aix Fix Build Regression #449: Move socket_base.hpp and err.hpp after poll.h include commit 422c418a15b69001f679e6b51f1cfffbd2ded625 Author: AJ Lewis Date: Tue Oct 23 16:18:36 2012 -0500 Move socket_base.hpp and err.hpp after poll.h include These two headers also include zmq.h somewhere in their dependency chain, so must be included after poll.h is included for builds to work on AIX. src/proxy.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2675a9d31b9fb74c671c25ba7769831c11a2fa70 Merge: 7abb6cc 4ba34c9 Author: Ian Barber Date: Tue Oct 23 18:02:48 2012 -0700 Merge pull request #443 from hintjens/master Fixed whitespace and style commit 4ba34c9d70986f17429a06c0171005ad05b66ef3 Author: Pieter Hintjens Date: Wed Oct 24 09:18:52 2012 +0900 Whitespace and style fixes src/address.cpp | 12 +-- src/ipc_connecter.cpp | 3 +- src/mtrie.cpp | 23 +++-- src/pgm_sender.cpp | 14 +-- src/pgm_socket.cpp | 9 +- src/pipe.cpp | 41 +++++---- src/poller_base.cpp | 3 +- src/router.cpp | 3 +- src/session_base.cpp | 3 +- src/signaler.cpp | 3 +- src/socket_base.cpp | 148 ++++++++++++++++-------------- src/sub.cpp | 3 +- src/tcp_connecter.cpp | 3 +- src/trie.cpp | 239 +++++++++++++++++++++++++------------------------ src/zmq.cpp | 22 ++--- 15 files changed, 282 insertions(+), 247 deletions(-) commit 7abb6ccb6aa1d95d6e47d079d792fbd5faef5e29 Merge: 7f63fc6 0666063 Author: Ian Barber Date: Fri Oct 19 15:05:23 2012 -0700 Merge pull request #442 from hintjens/master Fixed build regression #449 commit 066606322c131f73f5fa9a6e673fd0df6771e540 Author: Pieter Hintjens Date: Fri Oct 19 16:23:21 2012 +0900 Added unbind/disconnect man pages, notes to deprecated methods doc/Makefile.am | 17 ++++++++++------- doc/zmq_recvmsg.txt | 2 ++ doc/zmq_sendmsg.txt | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) commit ee21fac8b8a276b084547ac5dc8e0df4b13ae88b Author: Pieter Hintjens Date: Fri Oct 19 15:16:36 2012 +0900 Added ZMQ_FAIL_UNROUTABLE alias back as deprecated include/zmq.h | 1 + 1 file changed, 1 insertion(+) commit a3889d00c346bccb47b67ebf4bf3839b00b0821f Author: Pieter Hintjens Date: Fri Oct 19 15:09:52 2012 +0900 Fixed issue #451 doc/zmq_setsockopt.txt | 7 ++----- src/router.cpp | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) commit 45c063725bbf577b7f577f7f3b4a01077bacc15a Author: Pieter Hintjens Date: Thu Oct 18 11:32:13 2012 +0900 Fixed issue #449 src/proxy.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 7f63fc6579dc335553d4e8f8ece9d7a30909e67c Merge: 9bab346 9681157 Author: Ian Barber Date: Wed Oct 17 19:21:26 2012 -0700 Merge pull request #441 from hintjens/master Fixed build regression commit 96811575c303e92d4926d841240192aaf6f2e41c Author: Pieter Hintjens Date: Thu Oct 18 11:04:51 2012 +0900 Fixed issue #448 src/socket_base.cpp | 3 ++- src/socket_base.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 9bab3466904884f41be56cb5474859be16a0dad3 Merge: 6e676af 3a43bd7 Author: Ian Barber Date: Mon Oct 15 23:32:16 2012 -0700 Merge pull request #440 from hintjens/master Packages did not build - fixed commit 3a43bd735426543334902dbd0569a45dbb493e50 Author: Pieter Hintjens Date: Tue Oct 16 10:01:26 2012 +0900 Several include files were missing src/Makefile.am | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6e676af45edfb0c17607625531befed0098b850f Merge: cdcaca2 351eff5 Author: Ian Barber Date: Mon Oct 15 04:33:24 2012 -0700 Merge pull request #439 from hintjens/master Updated master version to 3.2.2 commit 351eff5448eba050dc7c9d53d07b2b057399ab7d Author: Pieter Hintjens Date: Mon Oct 15 13:23:00 2012 +0900 Bumped version to 3.3.0 include/zmq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e7892b72fc4dfcf8fdb462d1f21afa55153656a Author: Pieter Hintjens Date: Mon Oct 15 13:06:19 2012 +0900 Upated version for next release include/zmq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7b2e9d017ae8aa020a88cc91d1d5345eb12e82b Author: Pieter Hintjens Date: Mon Oct 15 12:52:54 2012 +0900 Upated NEWS for 3.2.1 NEWS | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit cdcaca2dc4db0ac4ef1b2ff427e43ceb4740e72c Merge: 73537e6 c62fb89 Author: Pieter Hintjens Date: Fri Oct 12 19:58:55 2012 -0700 Merge pull request #438 from steve-o/master Duplicate CMake patch set from zeromq3-x commit c62fb89ed8be640ad61ea4ed18303cc7c1629daa Author: Steven McCoy Date: Fri Oct 12 22:48:02 2012 -0400 Update to libzmq source set. CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7a1a5f9f7f3d0e3e382b7105ba7f35dd1e6b4475 Author: Steve-o Date: Fri Oct 12 19:20:37 2012 +0000 Update AsciiDoc version details with CMake detected ZeroMQ version. CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ddb9fc7ea3dc8fb5ee77f1c2e683e7e7e6e94b4 Author: Steve-o Date: Fri Oct 12 18:18:04 2012 +0000 Enable parallel make and LTO by default. CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit dfe7d15a889a097aa653913ca538b9b6023db2f0 Author: Steve-o Date: Fri Oct 12 17:32:42 2012 +0000 MSVC11 not getting defined in CMake 2.8.9, punt to version string. cmake/Modules/TestZMQVersion.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ebe4eab477acba7b65b1465f38e9d8fd4646b602 Author: Steve-o Date: Fri Oct 12 16:49:15 2012 +0000 Detect compiler version to tag libraries. CMakeLists.txt | 10 +++++----- cmake/Modules/TestZMQVersion.cmake | 10 +++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) commit 046c8ec7ebc4dc3bebc50880d8a29967b81dc6cb Author: Steve-o Date: Fri Oct 12 16:37:43 2012 +0000 Add metadata to CMake options; mark executables advanced to hide from default view; fix WoW64 redirections. CMakeLists.txt | 18 +++++++++--------- cmake/NSIS.template64.in | 12 ++++++++++-- 2 files changed, 19 insertions(+), 11 deletions(-) commit 56bb3df1f6d1d44b1516cfe9884a41d929a1f1fb Author: Steve-o Date: Fri Oct 12 15:36:34 2012 +0000 Detect ZeroMQ version at build time; hide NSIS dependencies in new cmake folder. CMakeLists.txt | 9 +- NSIS.template32.in | 952 ------------------------------------ NSIS.template64.in | 952 ------------------------------------ cmake/Modules/TestZMQVersion.cmake | 27 + cmake/Modules/zmq_version.cpp | 31 ++ cmake/NSIS.template32.in | 952 ++++++++++++++++++++++++++++++++++++ cmake/NSIS.template64.in | 952 ++++++++++++++++++++++++++++++++++++ 7 files changed, 1965 insertions(+), 1910 deletions(-) commit b42e45adb85e6f4dc148f187875ccb8aa63c2574 Author: Steve-o Date: Fri Oct 12 15:13:45 2012 +0000 Make OpenPGM a CMake option, default disabled. CMakeLists.txt | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit c53cf0d2392c8e957008c0c405bff053002f663e Author: Steve-o Date: Fri Oct 12 15:05:18 2012 +0000 Minor refactor of CMake build script. CMakeLists.txt | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 000d1a5fba4d51aacedb4710367c1c75bc71f788 Author: John Murphy Date: Thu Oct 11 20:28:02 2012 -0500 Update CMakeLists.txt Removed check for COPYING.txt CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58f7c2179f2db84a87b734d6262ed3bbae342346 Author: John Murphy Date: Thu Oct 11 19:31:30 2012 +0900 added artificacts for windows and openpgm build CMakeLists.txt | 339 +++++++++++++++++++ NSIS.template32.in | 952 ++++++++++++++++++++++++++++++++++++++++++++++++++++ NSIS.template64.in | 952 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 2243 insertions(+) commit 73537e67e39f39b0fe10e02490c0bfb1ff99ce3d Merge: 1ef63bc 93a7a37 Author: Ian Barber Date: Thu Oct 11 13:39:04 2012 -0700 Merge pull request #437 from rohanbedarkar/master Explicit comments commit 93a7a378933deb9d0a260750e41017c1545c6864 Author: Rohan Date: Thu Oct 11 09:32:54 2012 -0500 fixed trailing whitespace src/pgm_socket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a438e63498e0a357da8e20a2d68f90938d58ac11 Author: Rohan Date: Wed Oct 10 16:22:52 2012 -0500 explicit comments on multicast loopback src/pgm_socket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11c22912d71528958c1111b29d0a9116535409e3 Author: rohanbedarkar Date: Wed Oct 10 10:03:48 2012 -0500 commented out TOS related opt for PGM src/pgm_socket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ef63bc2adc3d50c2e5e5fb7b5c9f9c50cb469f8 Merge: db690e3 983ee76 Author: Ian Barber Date: Tue Oct 9 02:19:41 2012 -0700 Merge pull request #436 from hintjens/master Renamed ZMQ_ROUTER_BEHAVIOR to ZMQ_ROUTER_MANDATORY commit 983ee761b1cdc8f70fc682d4169568fe6f228fa2 Author: Pieter Hintjens Date: Mon Oct 8 16:36:35 2012 +0900 Renamed ZMQ_ROUTER_BEHAVIOR to ZMQ_ROUTER_MANDATORY for clarity .gitignore | 2 +- doc/zmq_setsockopt.txt | 33 ++++++++++----------- include/zmq.h | 5 +++- src/router.cpp | 10 ++++--- src/router.hpp | 2 +- tests/Makefile.am | 4 +-- tests/test_router_behavior.cpp | 62 --------------------------------------- tests/test_router_mandatory.cpp | 62 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 92 insertions(+), 88 deletions(-) commit db690e3d99d25731f72ee130fe60b7050176b45d Merge: e41e071 f87bf38 Author: Ian Barber Date: Sun Oct 7 12:48:18 2012 -0700 Merge pull request #435 from hintjens/master Added ZMQ_XPUB_VERBOSE option commit f87bf38293a4259ab0d9ad58506981736eb96ae4 Author: Pieter Hintjens Date: Mon Oct 8 00:57:43 2012 +0900 Fixed issue #443 doc/zmq_setsockopt.txt | 14 ++++++++++++++ include/zmq.h | 1 + src/xpub.cpp | 18 +++++++++++++++++- src/xpub.hpp | 5 +++++ 4 files changed, 37 insertions(+), 1 deletion(-) commit e41e071b052bf7c6cfad8870ed7bbc1c2c5300da Merge: 2440863 ce53fe0 Author: Pieter Hintjens Date: Sat Oct 6 04:26:20 2012 -0700 Merge pull request #434 from vaughan0/master Small documentation error I noticed commit ce53fe033776dc1d4326af58d0d4fbc107469129 Author: Vaughan Newton Date: Sat Oct 6 13:15:17 2012 +0200 Minor documentation fix: zmq_msg_recv instead of zmq_msg_send doc/zmq_msg_recv.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6e0ae24f32707810162edbde42dbc77d1720da8 Author: Pieter Hintjens Date: Sat Sep 8 15:57:48 2012 +0900 Prepared for release 3.2.1 NEWS | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ include/zmq.h | 4 +-- 2 files changed, 100 insertions(+), 2 deletions(-) commit 2440863292c7af3e6d5621a00aa320e157eaa505 Merge: 81482ec b84d011 Author: Pieter Hintjens Date: Sun Sep 30 12:21:15 2012 -0700 Merge pull request #433 from michelp/reject-no-fds-avail Ported from libxs revision 123c0f5387ecef287dd11f4dc790fb76ee1c0f67 commit b84d0119b5c12d37c6fd64d11042c3e44df25f54 Author: Michel Pelletier Date: Sun Sep 30 11:52:43 2012 -0700 Ported from libxs revision 123c0f5387ecef287dd11f4dc790fb76ee1c0f67 Handle insufficient resources on accept() decently If accept() call fails due to insuffient OS resources the new connection is rejected. src/ipc_listener.cpp | 4 +++- src/tcp_listener.cpp | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) commit 81482ec84a812f996e95572f70c50be205b92df3 Merge: 343ec62 82d7238 Author: Pieter Hintjens Date: Sat Sep 29 03:28:18 2012 -0700 Merge pull request #432 from hurtonm/master Make socket IO more robust commit 82d7238f08413f2070a17624c9033f3a9a4ae0ab Author: Martin Hurton Date: Sat Sep 29 11:14:44 2012 +0200 Make socket IO more robust See also https://zeromq.jira.com/browse/LIBZMQ-433 src/stream_engine.cpp | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 343ec62282e614cbc01aefb374bd3c0f15a6473a Merge: 5b83fe7 725f141 Author: Ian Barber Date: Wed Sep 26 23:29:18 2012 -0700 Merge pull request #431 from ipechorin/master Forward-port fix for LIBZMQ-211 commit 5b83fe778c95426b8951ae829f9af0db4c5391a1 Merge: a49e392 9b58372 Author: Ian Barber Date: Wed Sep 26 12:27:43 2012 -0700 Merge pull request #430 from ipechorin/master Update MSVC2008 project after recent changes; fix compilation errors commit 725f141fd7e8c74f0c664c6d4a18ff6df77771bc Author: Ivan Pechorin Date: Wed Sep 26 16:49:38 2012 +0400 Fix LIBZMQ-211: REP socket asserting when getting malformed request REP socket demands at least an empty address stack. The server asserted on (msg_->flags () & msg_t::more) in rep.cpp:75 when receiving a malformed request without empty part. This patch makes a REP socket to discard and silently ignore such malformed requests. src/rep.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit a49e392e34d18643257b974553858ced6fc38188 Merge: 2eb849c dcf683a Author: Pieter Hintjens Date: Wed Sep 26 05:24:41 2012 -0700 Merge pull request #429 from ipechorin/dcf683aacb533634c273bb2f51fa3ceaadf89202 Update MSVC2010 project after recent renames and additions commit 9b58372a38e77ed61240c0e6588c3cfd38a784d1 Author: Ivan Pechorin Date: Wed Sep 26 16:09:55 2012 +0400 Fix compilation using MSVC 2008: its defines wrong min/max without NOMINMAX Visual Studio 2008 compiler defines min/max as macros in its even if is not included at all. This patch defines NOMINMAX to remove these macros and fix compilation on Visual Studio 2008. src/encoder.hpp | 6 ++++++ 1 file changed, 6 insertions(+) commit 396b4e3046ad32ec9ee40586894c7df3307cdc67 Author: Ivan Pechorin Date: Wed Sep 26 16:06:20 2012 +0400 Fix compilation using MSVC 2008: stdint.h is not present in this compiler This patch fixes the two headers added recently to include our own "stdint.hpp" instead of system because the latter is not available in Visual Studio versions prior to 2010. src/i_decoder.hpp | 2 +- src/i_encoder.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4de27b6c10066006a0b7737138e3d9a381c80b84 Author: Ivan Pechorin Date: Wed Sep 26 16:04:00 2012 +0400 Update MSVC2008 project after recent renames and additions This patch updates MSVC2008 project after device was renamed to proxy and new files were added (tcp.cpp, v1_encoder.cpp and v1_decoder.cpp). builds/msvc/libzmq/libzmq.vcproj | 40 ++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) commit 2eb849ccda48ceb2f2a765c8c80d1e90ecbfd780 Merge: ff264cb 9056c13 Author: Pieter Hintjens Date: Wed Sep 26 04:48:02 2012 -0700 Merge pull request #428 from ipechorin/9056c13e1ebbfd7798ddd7b5cfdb9950933c710e Use shipped with Visual Studio 2010 and later commit dcf683aacb533634c273bb2f51fa3ceaadf89202 Author: Ivan Pechorin Date: Wed Sep 26 15:25:16 2012 +0400 Update MSVC2010 project after recent renames and additions This patch updates MSVC2010 project after device was renamed to proxy and new files were added (v1_encoder.cpp and v1_decoder.cpp). builds/msvc/libzmq/libzmq.vcxproj | 8 +++++++- builds/msvc/libzmq/libzmq.vcxproj.filters | 24 +++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) commit 9056c13e1ebbfd7798ddd7b5cfdb9950933c710e Author: Ivan Pechorin Date: Wed Sep 26 15:13:13 2012 +0400 Use shipped with Visual Studio 2010 and later Visual Studio didn’t have until 2010, therefore we had a bunch of typedefs for int8_t, int16_t and the likes in "stdint.hpp". This patch limits these typedefs to Visual Studio versions older than 2010 and uses compiler-shipped on 2010 and newer. src/stdint.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff264cb0442955f7b5da389fc571b6656374c5fc Merge: 2a20914 afa4933 Author: Pieter Hintjens Date: Tue Sep 25 23:44:40 2012 -0700 Merge pull request #427 from ianbarber/master Init msg in pgm_receiver drop subs commit afa4933c1e84bd988100ac3ec45d9c7bb33596b0 Author: Ian Barber Date: Tue Sep 25 22:58:25 2012 +0100 Init message in drop subscription Fixes reported issue with PGM receiver on 32bit Suse where asserts were hit due to the msg flags not being zeroed. src/pgm_receiver.cpp | 1 + 1 file changed, 1 insertion(+) commit 2a209140f7cac86f8d9312b30222262197aa2bf4 Merge: a6c6054 b1776e2 Author: Pieter Hintjens Date: Tue Sep 25 13:49:27 2012 -0700 Merge pull request #426 from methodmissing/fix-monitor Fix monitor commit b1776e234b722b50ea7c3d09abd9028351adc815 Merge: 8a57e4a a6c6054 Author: Lourens Naudé Date: Tue Sep 25 01:26:32 2012 +0100 Merge branch 'master' into fix-monitor commit a6c6054ef262a11e807fd003a6aa7ffa5bc80875 Merge: d981c91 7bf516d Author: Pieter Hintjens Date: Fri Sep 21 09:09:00 2012 -0700 Merge pull request #425 from Astellar/zmq_msg_t zmq_msg_t will now typedef a named struct. commit 7bf516ded73031c78b61a2ca2367d3f384474eab Author: Astellar Date: Fri Sep 21 19:57:50 2012 +0400 zmq_msg_t will now typedef a named struct. This change allows forward declaration of struct zmq_msg_t. include/zmq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a57e4a5d777c7da6471de958838eb0cd943802e Merge: 759d453 d981c91 Author: Lourens Naudé Date: Fri Sep 21 12:55:01 2012 +0100 Merge branch 'master' into fix-monitor commit 759d453368479257638e6b09e1febe19fbef2a3d Author: Lourens Naudé Date: Fri Sep 21 12:53:31 2012 +0100 Significantly reworked the monitoring infrastructure with a more granular per socket API and to play well with monitoring endpoints in application threads doc/Makefile.am | 4 +- doc/zmq_ctx_set_monitor.txt | 223 --------------------------------- doc/zmq_socket_monitor.txt | 288 ++++++++++++++++++++++++++++++++++++++++++ include/zmq.h | 19 +-- src/ctx.cpp | 70 +---------- src/ctx.hpp | 8 -- src/ipc_connecter.cpp | 9 +- src/ipc_connecter.hpp | 3 + src/ipc_listener.cpp | 10 +- src/session_base.cpp | 13 +- src/session_base.hpp | 4 +- src/socket_base.cpp | 181 +++++++++++++++++++++++++-- src/socket_base.hpp | 26 +++- src/stream_engine.cpp | 6 +- src/stream_engine.hpp | 4 + src/tcp_connecter.cpp | 9 +- src/tcp_connecter.hpp | 3 + src/tcp_listener.cpp | 8 +- src/zmq.cpp | 20 +-- tests/test_monitor.cpp | 290 +++++++++++++++++++++++++++++++++---------- 20 files changed, 767 insertions(+), 431 deletions(-) commit d981c91f809a91a7db66375703e8d888796b9f55 Merge: 86eb7bc f6a840b Author: Pieter Hintjens Date: Thu Sep 20 11:41:27 2012 -0700 Merge pull request #424 from vaughan0/patch-1 Update doc/zmq_msg_get.txt commit f6a840b65bffc11c74d6d538e989fe707a3c166e Author: Vaughan Newton Date: Thu Sep 20 21:39:45 2012 +0300 Update doc/zmq_msg_get.txt doc/zmq_msg_get.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 86eb7bcae09fd9182d89d6e8b92ed0e2e8665fc4 Merge: 7a40df6 67d88bc Author: Ian Barber Date: Tue Sep 18 13:52:52 2012 -0700 Merge pull request #423 from jmgao/patch-1 Add pthread.h include to test_connect_delay.cpp commit 67d88bcb41efcba24cb94b1c370ecb40a75398d0 Author: Joshua Gao Date: Tue Sep 18 13:46:48 2012 -0700 Add pthread.h include to test_connect_delay.cpp This test case uses pthreads, but doesn't include the header. tests/test_connect_delay.cpp | 1 + 1 file changed, 1 insertion(+) commit 7a40df6d3aeba02d02a5a670a2ebf3b20fed3940 Merge: f074f6b 5db2875 Author: Ian Barber Date: Fri Sep 7 03:25:31 2012 -0700 Merge pull request #422 from hintjens/master Replaced device concept with proxy concept commit 5db28752f3d6956d2e10bf8fcd66a1b4044339e0 Author: Pieter Hintjens Date: Thu Sep 6 19:20:21 2012 +0900 Removed 'device' concept and introduced proxies * zmq_device is now a wrapper that calls zmq_proxy * zmq_proxy adds capture socket doc/Makefile.am | 2 +- doc/zmq.txt | 12 +++-- doc/zmq_device.txt | 125 ---------------------------------------------------- doc/zmq_proxy.txt | 97 ++++++++++++++++++++++++++++++++++++++++ include/zmq.h | 11 ++--- src/Makefile.am | 4 +- src/device.cpp | 96 ---------------------------------------- src/device.hpp | 32 -------------- src/proxy.cpp | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/proxy.hpp | 32 ++++++++++++++ src/zmq.cpp | 26 ++++++----- 11 files changed, 280 insertions(+), 278 deletions(-) commit f074f6b6b98fe5e3612a46007e49c52f74b1fac9 Merge: 84728cd cf20932 Author: Pieter Hintjens Date: Thu Sep 6 19:56:46 2012 -0700 Merge pull request #412 from Quuxplusone/test-release-builds-too Add "#undef NDEBUG" to all tests. commit cf20932df02ddac2c6e49dc7f725787bbce3e435 Author: Arthur O'Dwyer Date: Thu Aug 23 13:40:30 2012 -0700 Add "#undef NDEBUG" to all tests. This change makes sure that even if the tests are built in a "release" configuration (with optimizations and NDEBUG turned on), the assertions won't get compiled out of the tests themselves. The C standard guarantees that the most recent inclusion of is the one that counts, so it's important that the "#undef NDEBUG/#include " come as the last thing in the block of header files. "testutil.hpp" includes , so I've left out of any test that #includes "testutil.hpp", just for the sake of brevity. tests/test_connect_delay.cpp | 12 ++++++------ tests/test_connect_resolve.cpp | 6 +++--- tests/test_hwm.cpp | 2 -- tests/test_invalid_rep.cpp | 4 +++- tests/test_last_endpoint.cpp | 5 +++-- tests/test_monitor.cpp | 6 ++---- tests/test_msg_flags.cpp | 5 +++-- tests/test_pair_inproc.cpp | 1 - tests/test_pair_ipc.cpp | 1 - tests/test_pair_tcp.cpp | 1 - tests/test_reqrep_device.cpp | 7 ++++--- tests/test_reqrep_inproc.cpp | 1 - tests/test_reqrep_ipc.cpp | 1 - tests/test_reqrep_tcp.cpp | 1 - tests/test_router_behavior.cpp | 1 - tests/test_shutdown_stress.cpp | 4 +++- tests/test_sub_forward.cpp | 7 ++++--- tests/test_term_endpoint.cpp | 27 ++++++++++++++++++++++++--- tests/test_timeo.cpp | 9 +++++---- tests/testutil.hpp | 5 +++-- 20 files changed, 63 insertions(+), 43 deletions(-) commit aaac4b84cb899f94570cec83970d09b19f1f9c38 Author: Pieter Hintjens Date: Thu Sep 6 18:20:33 2012 +0900 Code cleanups doc/zmq.txt | 4 ++-- include/zmq.h | 2 ++ src/device.cpp | 32 +++----------------------------- 3 files changed, 7 insertions(+), 31 deletions(-) commit 84728cd961c4238379bf0e022292f5d314102ce1 Merge: a224c97 2a41c8d Author: Ian Barber Date: Wed Sep 5 12:59:28 2012 -0700 Merge pull request #421 from hurtonm/master New message encoder/decoder + code simplification commit 2a41c8d7b40a36062a69536d1ad878a80d4f16a3 Author: Martin Hurton Date: Wed Sep 5 16:37:20 2012 +0200 Simplify initial handshaking src/stream_engine.cpp | 100 +++++++++++++------------------------------------ src/stream_engine.hpp | 19 +++------- 2 files changed, 32 insertions(+), 87 deletions(-) commit 3f6148abdf4c548eeb6f13aee38a4190468fdadc Author: Martin Hurton Date: Wed Sep 5 02:01:19 2012 +0200 Implement new message encoder/decoder This is supposed to become part of the ZMTP/1.1. The main differences from the ZMTP/1.0 framing protocol are: - flags field comes first, followed by the length field - long messages are signaled using a flag rather then 0xff escape - length field does not include the flags field, 0 is a valid value src/Makefile.am | 2 + src/stream_engine.cpp | 40 +++++++++--- src/v1_decoder.cpp | 167 +++++++++++++++++++++++++++++++++++++++++++++++++ src/v1_decoder.hpp | 70 +++++++++++++++++++++ src/v1_encoder.cpp | 103 ++++++++++++++++++++++++++++++ src/v1_encoder.hpp | 60 ++++++++++++++++++ src/v1_protocol.hpp | 43 +++++++++++++ 7 files changed, 478 insertions(+), 7 deletions(-) commit 8672f5829e3917296e0695c86fbb324d91efdc53 Author: Martin Hurton Date: Tue Sep 4 19:44:20 2012 +0200 Introduce abstract interface for message encoder/decoder src/decoder.hpp | 3 ++- src/encoder.hpp | 3 ++- src/i_decoder.hpp | 49 ++++++++++++++++++++++++++++++++++++++++++++ src/i_encoder.hpp | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ src/stream_engine.cpp | 46 +++++++++++++++++++++++++++-------------- src/stream_engine.hpp | 8 ++++---- 6 files changed, 142 insertions(+), 21 deletions(-) commit a224c97329d0315498970054da2055bcf0560913 Merge: d068787 d7331b7 Author: Pieter Hintjens Date: Tue Sep 4 16:03:58 2012 -0700 Merge pull request #420 from ianbarber/master Fix some PGM refactor breakages commit d7331b7b1fc6edae0315c28c9fe7a40dbefca0ef Author: Ian Barber Date: Tue Sep 4 23:24:48 2012 +0100 Fixing PGM issues Hopefully fixed LIBZMQ-427 - there was a slight typo in the init_address refactor. The encoder refactoring had also broken pgm_sender and receiver, but just required updating to use the new functions. src/pgm_receiver.cpp | 2 +- src/pgm_sender.cpp | 2 +- src/pgm_socket.cpp | 6 +++--- tests/test_connect_delay.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit d0687876c03ce46a4a3d5962ffe22eef988b7d4a Merge: 9143ac5 9d17ead Author: Ian Barber Date: Mon Sep 3 13:58:06 2012 -0700 Merge pull request #419 from hurtonm/code_cleanup Code cleanup commit 9d17ead33d4a6ea8a10883df49bb483f57db8578 Author: Martin Hurton Date: Mon Sep 3 19:21:41 2012 +0200 Remove superfluous statement src/xpub.cpp | 1 - 1 file changed, 1 deletion(-) commit 7e6db47e65584d5351959f8d0582a3d8e3638e1d Author: Martin Hurton Date: Mon Sep 3 19:07:57 2012 +0200 Remove unused member variable src/stream_engine.hpp | 3 --- 1 file changed, 3 deletions(-) commit 9143ac5156f058a00c5fd90ef4f65f9b2f90254e Merge: 6347f8b d9307c9 Author: Ian Barber Date: Sun Sep 2 15:24:09 2012 -0700 Merge pull request #418 from hurtonm/versioned_ztp Introduce versioning into ZTP commit d9307c9ff04b0d1d60aac1b201dfbe2684d3403f Author: Martin Hurton Date: Sun Sep 2 18:19:15 2012 +0200 Make ZMQ interoperate with ZMQ 2.x SUB sockets Since ZMQ 2.x does not support subscription forwarding, it's not possible to use ZMQ 2.x SUB socket to receive messages from a PUB socket. This patch adds some compatibility layer so that ZMQ 2.x SUB socket receives messages from PUB socket. src/stream_engine.cpp | 32 ++++++++++++++++++++++++++++++++ src/stream_engine.hpp | 6 +++++- 2 files changed, 37 insertions(+), 1 deletion(-) commit dfc0222ee6c67e2bd596468296f3ac271f8c33b3 Author: Martin Hurton Date: Sun Sep 2 18:03:38 2012 +0200 Decouple encoder_t and decoder_t from session_base_t This patch introduces i_msg_sink and i_msg_source interfaces. This allows us to make message encoder and decoder more general. src/decoder.cpp | 12 ++++++------ src/decoder.hpp | 7 ++++--- src/encoder.cpp | 12 ++++++------ src/encoder.hpp | 6 +++--- src/i_msg_sink.hpp | 43 +++++++++++++++++++++++++++++++++++++++++++ src/i_msg_source.hpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/pgm_receiver.cpp | 2 +- src/pgm_sender.cpp | 2 +- src/req.cpp | 10 +++++----- src/req.hpp | 2 +- src/session_base.cpp | 6 +++--- src/session_base.hpp | 14 +++++++++++--- src/stream_engine.cpp | 8 ++++---- 13 files changed, 132 insertions(+), 36 deletions(-) commit 1bca4f6f033ed6bb56fcfd7762bbfea04ecf684b Author: Martin Hurton Date: Sat Sep 1 13:59:22 2012 +0200 Extend ZTP/1.0 protocol The new protocol adds support for protocol version and exchanges the socket type, so that the library can reject a connection when the sockets do not match. The protocol was designed so that it's possible to detect and fully support ZTP/1.0 peers. When a new connection is set up, peers exchange greeting messages. The greeting message encodes both the protocol verion and the socket type. The format of the greeting message is as follows: greeting = tag1, adaptation, tag2, version, length, socket_type tag1 = BYTE / 0xff adaptation = 8 BYTES tag2 = BYTE / 0x7f version = BYTE / 1 length = BYTE / 1 socket_type = BYTE The protocol does not define the value of adaptation field. When interoperability with ZTP/1.0 peers is required, the adaptaion encodes, in network byte order, the length of identity message increased by 1. When adaptaion consists of eight zeros, the current implementatatio of 0MQ 2.x closes the connection. This patch supports both ZTP/1.0 and new protocol. src/stream_engine.cpp | 151 ++++++++++++++++++++++++++++++++++++++++++++++++- src/stream_engine.hpp | 36 ++++++++++++ 2 files changed, 185 insertions(+), 2 deletions(-) commit 6347f8b0c9f800b8de1bfe8b9f869ebec9e6511c Merge: c959f52 ab82488 Author: Mikko Koppanen Date: Tue Aug 28 04:40:38 2012 -0700 Merge pull request #416 from hintjens/master Fixed COPYING.LESSER commit ab8248847ca7c413145a9cb20e1deebb08ca993f Author: Pieter Hintjens Date: Tue Aug 28 20:39:38 2012 +0900 Fixed license to remove references to X11 code COPYING.LESSER | 27 --------------------------- 1 file changed, 27 deletions(-) commit c959f526f1a3e885bd3f61ec0362122ec3321ee3 Merge: f6fe600 08f6a9e Author: Pieter Hintjens Date: Mon Aug 27 16:34:31 2012 -0700 Merge pull request #415 from Quuxplusone/unused-parameters Silence all "unused parameter" warnings from Clang. commit 08f6a9e7e86c78c86b9d2ba927d2b35bbca356f7 Author: Arthur O'Dwyer Date: Mon Aug 27 16:10:47 2012 -0700 Remove unused argc/argv parameters in tests. tests/test_connect_delay.cpp | 6 +++--- tests/test_connect_resolve.cpp | 2 +- tests/test_hwm.cpp | 2 +- tests/test_invalid_rep.cpp | 2 +- tests/test_last_endpoint.cpp | 2 +- tests/test_msg_flags.cpp | 2 +- tests/test_pair_inproc.cpp | 2 +- tests/test_pair_ipc.cpp | 2 +- tests/test_pair_tcp.cpp | 2 +- tests/test_reqrep_device.cpp | 2 +- tests/test_reqrep_inproc.cpp | 2 +- tests/test_reqrep_ipc.cpp | 2 +- tests/test_reqrep_tcp.cpp | 2 +- tests/test_router_behavior.cpp | 2 +- tests/test_shutdown_stress.cpp | 2 +- tests/test_sub_forward.cpp | 2 +- tests/test_term_endpoint.cpp | 2 +- tests/test_timeo.cpp | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) commit c29aef4dd83375806b008c40728485fa95457050 Author: Arthur O'Dwyer Date: Mon Aug 27 16:06:51 2012 -0700 Verify the value of the "void *s" passed to the monitor function. This formerly unused parameter actually represents the socket on which the event was received. As such, we should check that its value makes sense: it must be either "rep" or "req", and in the case of some kinds of events, it must be specifically one or the other. After this change, "s" is no longer unused. tests/test_monitor.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 3b984d40e984b9cd5bca4663765771c7e9b9d61d Author: Arthur O'Dwyer Date: Mon Aug 27 16:05:51 2012 -0700 Silence all "unused parameter" warnings from Clang. Compiling without warnings is a good goal, because it makes new warnings (which probably indicate bugs) stand out rather than getting lost in the spam. My fixes fall into two categories: - Adding (void) casts of unused parameters, where their unusedness seems like a TODO (or in some cases a bug?). - Removing parameter names altogether, where the function is clearly a stub that will never use its parameters. Should be no change in behavior. src/dealer.cpp | 6 ++++++ src/dist.cpp | 3 +++ src/err.cpp | 1 + src/io_object.cpp | 2 +- src/io_thread.cpp | 2 +- src/lb.cpp | 3 +++ src/object.cpp | 16 ++++++++-------- src/pair.cpp | 10 ++++++++-- src/pub.cpp | 2 +- src/pull.cpp | 6 ++++++ src/push.cpp | 3 +++ src/reaper.cpp | 2 +- src/router.cpp | 9 +++++++++ src/session_base.cpp | 2 +- src/socket_base.cpp | 15 +++++++-------- src/sub.cpp | 2 +- src/tcp.cpp | 9 +++++++++ src/tcp_address.cpp | 4 ++-- src/tcp_address.hpp | 4 ++-- src/tcp_listener.cpp | 2 +- src/xpub.cpp | 3 +++ src/xsub.cpp | 6 ++++++ src/zmq.cpp | 2 +- 23 files changed, 84 insertions(+), 30 deletions(-) commit 7fa4d423b80715c07c526e60aed276a9e8e60a03 Author: Arthur O'Dwyer Date: Mon Aug 27 16:00:40 2012 -0700 Fix char_traits to what looks like correct behavior. char_traits::to_char_type(x) used to return 0 no matter what x was, and likewise to_int_type(x) used to return 0 no matter what. (0 is what you get when you default-construct an integral type, which is what the old code was doing.) This seemed like buggy behavior to me, so I've changed it. src/blob.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6fe600eef59afa7de6033bf71aea685779a390a Merge: 4a43a0d fd67cd8 Author: Pieter Hintjens Date: Sun Aug 26 17:04:36 2012 -0700 Merge pull request #414 from ianbarber/master Fix build breaking typos in monitor VA code commit fd67cd810af7aac5ee897cd23f524a12206abd64 Author: Ian Barber Date: Sun Aug 26 17:48:52 2012 +0100 Update ROUTER_BEHAVIOR documentation Include a note about potential interactions with reactors, and update reference to old FAIL_UNROUTABLE name. doc/zmq_setsockopt.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 95c018c0d3e7610e58a901ee970fcac8be8db176 Author: Ian Barber Date: Sun Aug 26 16:29:40 2012 +0100 Use full endpoint string in monitor response The endpoint was excluding the tcp://, causing tests to fail src/tcp_listener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94835581a4df2bde11b6ec0dcd32bac70dc42d7f Author: Ian Barber Date: Sun Aug 26 15:07:16 2012 +0100 Remove early return on terminated state Code as stands breaks shutdown process. It was a bugfix by Arthur to a bad line which was testing for an impossible state - but afaics we do actually want to flush in those states. It is possible I am wrong on that though - if there are any shutdown issues introduced aroudn this commit I would suggest further investigation around this flushing behavior. src/pipe.cpp | 4 ---- 1 file changed, 4 deletions(-) commit 206e5f6f44bac2f9dfcb79da296ef530a17c7f93 Author: Ian Barber Date: Sun Aug 26 14:29:09 2012 +0100 Incorrect function name in socket_base VA specific monitor event in socket base was named monitor_event rather than va_monitor_event src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f028379c1ce008c2eba4c315a4a3adcd3594e1e1 Author: Ian Barber Date: Sun Aug 26 14:27:12 2012 +0100 Incorrect var name in monitor_event The call to the va version of the function was using 'event' instead of 'event_' src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bf541b2520a4ed861bb7670d5a7edd264637bec Author: Ian Barber Date: Sun Aug 26 14:24:50 2012 +0100 Fixing incorrect argument order on va_start Compile was failing on the monitor_event function function due to the va_start params being switched. src/ctx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a43a0d0744f3cd78dab564d2b40e3f1790e7c24 Merge: d588dbf 7fadd70 Author: Pieter Hintjens Date: Sat Aug 25 01:19:09 2012 -0700 Merge pull request #413 from Quuxplusone/static-analysis Various bugfixes found by compiling with extra warnings commit 7fadd708a04e31e1edf23fdd3935961a141f4d32 Author: Arthur O'Dwyer Date: Fri Aug 24 16:42:31 2012 -0700 Fix monitor_event() to work at all. There are three versions of monitor_event(), all taking variadic arguments. The original code just has the first one creating a va_list and passing that va_list variadically to the second one... which creates a new va_list and passes it variadically to the third one... and of course everything blows up when we try to pull a non-va_list argument off the stack. The correct approach matches the C standard library's use of printf/vprintf, scanf/vscanf, and so on. Once you make a va_list, you must pass it only to functions which expect a va_list parameter. src/ctx.cpp | 10 +++++++++- src/ctx.hpp | 3 ++- src/session_base.cpp | 7 ++++++- src/session_base.hpp | 2 ++ src/socket_base.cpp | 7 ++++++- src/socket_base.hpp | 2 ++ 6 files changed, 27 insertions(+), 4 deletions(-) commit 537a80278835d0f4290edce1bfc47d0624177cc5 Author: Arthur O'Dwyer Date: Fri Aug 24 16:38:46 2012 -0700 Add a missing null-check, turning a segfault into an assertion. Static analysis says: src\tcp_address.cpp(297): error V595: The 'res' pointer was utilized before it was verified against nullptr. Check lines: 297, 301. src\tcp_address.cpp(603): error V106: Implicit type conversion third argument 'full_bytes' of function 'memcmp' to memsize type. src\tcp_address.cpp(603): error V526: The 'memcmp' function returns 0 if corresponding buffers are equal. Consider examining the condition for mistakes. In fact the use of "memcmp" is correct, but the enclosing "if" isn't necessary, and the compiler is happier if "full_bytes" is a size_t. src/tcp_address.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 6347d392fdaa41131c7c7cb3b57c4aa6c1e7a399 Author: Arthur O'Dwyer Date: Fri Aug 24 16:35:14 2012 -0700 Fix a bug in pipe_t::flush(). Static analysis says: src\pipe.cpp(193): error V547: Expression is always false. Probably the '||' operator should be used here. If flush() is called on a pipe whose state was "terminated" or "double_terminated", the programmer's intent was to return immediately. But in fact the two conditions can never be true simultaneously, so the early return never happens, and we may try to flush a terminated pipe anyway. src/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0886b7a26bbca34fdeef3e06d0d75d023ef4b7eb Author: Arthur O'Dwyer Date: Fri Aug 24 16:33:48 2012 -0700 Silence a compiler warning. Static analysis says: src\fd.hpp(38): error V103: Implicit type conversion from memsize to 32-bit type. Adding the explicit cast should shut it up. src/fd.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a48751b34b7047cf77537f88861a5ae48127122a Author: Arthur O'Dwyer Date: Fri Aug 24 16:30:42 2012 -0700 The "count_" out-parameter is doubled instead of unchanged. Static analysis says: src\zmq.cpp(489): error V220: Suspicious sequence of types castings: memsize -> 32-bit integer -> memsize. The value being casted: '* count_'. src\zmq.cpp(510): error V127: An overflow of the 32-bit 'nread' variable is possible inside a long cycle which utilizes a memsize-type loop counter. I've silenced the warning on line 489 and ignored the other. But also, it looks to me like there's a serious bug here: The out-parameter "count_" is never set to zero before we start incrementing it. So its final value will always be between 1 and 2 times its initial value. The fix seems obvious. src/zmq.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d588dbf27c363b98a0d88e5d4c1c2c7c2227055f Merge: 033e311 28c9255 Author: Ian Barber Date: Thu Aug 23 13:02:30 2012 -0700 Merge pull request #410 from Quuxplusone/LIBZMQ-414 [LIBZMQ-414] Fix an error in the inline assembly for Thumb2. commit 033e311d66440d2e12ba7a344d9b405a9a79e423 Merge: 1283380 f718d2b Author: Ian Barber Date: Thu Aug 23 13:01:44 2012 -0700 Merge pull request #411 from Quuxplusone/fix-test_monitor-bug Fix a bug reported on the mailing list. commit f718d2beadf0fa58d3dc054e7b4cefba3f3bbbf9 Author: Arthur O'Dwyer Date: Thu Aug 23 12:56:00 2012 -0700 Fix a bug reported on the mailing list. Both memcmp and strcmp return zero on equal, nonzero on nonequal; so all of these tests were backwards. The original committer fixed the failure by comparing 22 bytes instead of the correct 21, so that the assertions would trigger only if the 22nd byte happened to match exactly --- which was rare. The correct fix is to compare the right number of bytes with the right sense. (I think all of the ".addr" fields are null-terminated, in which case it's more appropriate to use strcmp throughout.) tests/test_monitor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 28c9255d46edd96861c45ac89566d79c098ec0d1 Author: Arthur O'Dwyer Date: Thu Aug 23 12:49:21 2012 -0700 Fix an error in the inline assembly for Thumb2. Notice that ZeroMQ has never been compiled for Thumb2 before, and I personally don't make any guarantees that it will actually behave correctly once compiled. But after this patch, it is at least *possible* to compile it for Thumb2. (Thumb2 is the target for most iOS devices.) src/atomic_ptr.hpp | 1 + 1 file changed, 1 insertion(+) commit 12833804c910842121310b0ce52c19d2804ffd40 Merge: b32542e 1ab85f4 Author: Pieter Hintjens Date: Sun Aug 12 02:33:17 2012 -0700 Merge pull request #409 from hurtonm/master Exchange greeting messages for all socket types commit 1ab85f471a50fb5f15440900a4e3991c9fe5aac0 Author: Martin Hurton Date: Sat Aug 11 18:47:56 2012 +0200 Exchange greeting messages for all socket types Fixes #415. src/dealer.cpp | 1 - src/options.cpp | 1 - src/options.hpp | 5 +---- src/router.cpp | 1 - src/session_base.cpp | 27 +++++++++++++++++---------- src/session_base.hpp | 6 +++--- src/socket_base.cpp | 4 ++-- 7 files changed, 23 insertions(+), 22 deletions(-) commit b32542e39627e22b5dfd17666235e123bac0fbe3 Merge: 040d4d3 556074d Author: Ian Barber Date: Sun Aug 5 08:10:53 2012 -0700 Merge pull request #403 from methodmissing/efault-zmq-poll Revert zmq_poll NULL poll items check to 2.2 behavior - let the poll items count filter out empty poll sets and not return a sometimes unexpected EFAULT error status commit 040d4d322da6658a4bc7b9194ce08c42c41dee8d Merge: 5637ed0 a622328 Author: Ian Barber Date: Sun Aug 5 08:08:59 2012 -0700 Merge pull request #408 from teotwaki/master Fix reordering compile errors commit a622328a9c089e635e8af6b67f6a87251d3e34bf Author: Sebastian Lauwers Date: Sat Aug 4 12:39:46 2012 +0200 Fix reordering compile errors src/stream_engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5637ed08a59bff6bacbf9a0c85d803d7e3bb4d09 Merge: 1f22954 9dc248f Author: Pieter Hintjens Date: Sat Aug 4 04:21:49 2012 -0700 Merge pull request #407 from methodmissing/LIBZMQ-399 Fix invalid address metadata for ZMQ_EVENT_DISCONNECTED commit 9dc248f6abeb7461b9e85bb5d0106ad86bab089f Author: Lourens Naudé Date: Sat Aug 4 11:41:33 2012 +0100 Fix invalid address metadata for ZMQ_EVENT_DISCONNECTED src/ipc_connecter.cpp | 3 +-- src/ipc_listener.cpp | 4 ++-- src/session_base.cpp | 7 ------- src/session_base.hpp | 1 - src/stream_engine.cpp | 10 +++------- src/stream_engine.hpp | 2 +- src/tcp_connecter.cpp | 2 +- src/tcp_listener.cpp | 2 +- tests/test_monitor.cpp | 4 ++++ 9 files changed, 13 insertions(+), 22 deletions(-) commit 1f2295476297537f549e96e95763226e4111b538 Merge: 84560c1 9fab993 Author: Ian Barber Date: Tue Jul 31 11:17:45 2012 -0700 Merge pull request #406 from hurtonm/master Fix issue #406 commit 9fab9937e516e78e6dbdf890e34f56cf80c9ff14 Author: Martin Hurton Date: Tue Jul 31 16:31:41 2012 +0200 Fix issue #406 When a peer reconnects, the router socket receives an identity message containing this peer id. When this happens, the current implementation crashes. This patch makes a router socket to silently ignore all identity messages coming from reconnected peers. src/msg.cpp | 5 +++++ src/msg.hpp | 1 + src/router.cpp | 25 ++++++++++++++++++------- 3 files changed, 24 insertions(+), 7 deletions(-) commit 84560c1607249cea48f2f0009cc5d136377072ee Merge: 631e12d 92bee5a Author: Pieter Hintjens Date: Sun Jul 29 00:45:20 2012 -0700 Merge pull request #405 from jimenezrick/master Fix LIBZMQ-404: zmq_term not truly re-entrant commit 92bee5a6dbb150115058c494e83702097aa58747 Author: Ricardo Catalinas Jiménez Date: Sat Jul 28 11:04:03 2012 +0200 Fix LIBZMQ-404: zmq_term not truly re-entrant zmq_term can not safely be re-entered with pgm transport. Fix proposed by Steven McCoy. src/zmq.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 631e12d4e5f47615182b7ec6e28c6ee439309111 Merge: 9be0c7e a0eb0bb Author: Ian Barber Date: Thu Jul 26 14:12:05 2012 -0700 Merge pull request #404 from mimetnet/master Correction for LIBZMQ-335 commit a0eb0bb7e611496d90b37d6e51a79890227f7ea1 Author: Matthew Metnetsky Date: Thu Jul 26 13:55:27 2012 -0400 signaler.cpp's Windows Lock should be in the "Global" namespace That way it can be used more appropriately between processes. src/signaler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83537916f8e2c61161f06dc84dd21972bb65b5eb Author: Matthew Metnetsky Date: Thu Jul 26 13:52:38 2012 -0400 Fix issue 335 By assigning a SECURITY_DESCRIPTOR to the event we gain the ability to share it between service and console programs. We also added EVENT_MODIFY_STATE as a requirement to OpenEvent so we can SetEvent later in the method. src/signaler.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 556074d438870dd29bd6f6838d00715c01204a4c Author: Lourens Naudé Date: Tue Jul 24 02:22:27 2012 +0100 Revert zmq_poll NULL poll items check to 2.2 behavior - let the poll items count filter out empty poll sets and not return a sometimes unexpected EFAULT error status src/zmq.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 9be0c7e4b5c6aa335aeb59a9e5f09cf108edb20c Merge: bea0b48 92827e4 Author: Pieter Hintjens Date: Tue Jul 17 23:59:59 2012 -0700 Merge pull request #402 from hurtonm/master Small code cleanup commit 92827e45ee82bdb3719ddddc60889120a805a6a1 Author: Martin Hurton Date: Wed Jul 18 01:53:10 2012 +0200 Small code cleanup src/socket_base.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit bea0b4817b6470ad7a521618585e33e273fbaadb Merge: 43ee439 62b5b91 Author: Ian Barber Date: Fri Jul 13 07:14:27 2012 -0700 Merge pull request #401 from hurtonm/master Fix issue #397 commit 62b5b914f5119378e8cd03c858b2904b9ced58ab Author: Martin Hurton Date: Thu Jul 12 01:47:36 2012 +0200 Always mark socket as retired when closing ipc_listener When closing an ipc listener, the library may try to unlink the associated file. When this fails, the underlying socket is not marked as retired and this triggers assertion failure. Fixes issue #397 src/ipc_listener.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 43ee4396cf63ddcf8750eacf14d92efd111f8140 Merge: 0533fb1 c84ca01 Author: Ian Barber Date: Wed Jul 11 10:17:44 2012 -0700 Merge pull request #400 from hurtonm/master Be more conservative about when to generate ZMQ_EVENT_CLOSE_FAILED commit c84ca01e95349e8013f5014cedbb39a8d3570f24 Author: Martin Hurton Date: Wed Jul 11 17:59:22 2012 +0200 Be more conservative about when to generate ZMQ_EVENT_CLOSE_FAILED This also fixes a bug in tcp_connecter and tcp_listener, which generated the event not when they failed to close the socket but when the succeed to close it. src/ipc_connecter.cpp | 5 +---- src/ipc_listener.cpp | 5 +---- src/tcp_connecter.cpp | 4 ---- src/tcp_listener.cpp | 4 ---- 4 files changed, 2 insertions(+), 16 deletions(-) commit 0533fb1ce16ad19e683b5325a11f2cbd8e2892ba Merge: f8752bf 6ac5cf8 Author: Pieter Hintjens Date: Wed Jul 11 08:02:01 2012 -0700 Merge pull request #399 from hurtonm/master Small cleanup commit 6ac5cf8697b50b5e6afb6582b067840adac02981 Author: Martin Hurton Date: Wed Jul 11 15:11:48 2012 +0200 Simplify code for writer activation in Router socket src/router.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit f8752bf9fca34b7c3c492c57c434f8c8799f44d1 Merge: 823d14c e37814e Author: Ian Barber Date: Fri Jul 6 10:50:00 2012 -0700 Merge pull request #398 from hurtonm/master Rewrite event processing in io_thread commit e37814eca427574578fc53421abea844317222e9 Author: Martin Hurton Date: Fri Jul 6 13:24:59 2012 +0200 Rewrite event processing in io_thread src/io_thread.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 823d14c7fcb00aed6e6d66aeca84a4fc555ba1a3 Merge: 37d1e84 86eaa9c Author: Pieter Hintjens Date: Fri Jul 6 04:02:17 2012 -0700 Merge pull request #397 from hurtonm/master Code cleanup commit 37d1e84467cc16f0dda36998a340d20435515816 Merge: 73f960e 8d64fc6 Author: Martin Hurtoň Date: Fri Jul 6 03:54:55 2012 -0700 Merge pull request #396 from hintjens/master Reverting fix for #393 commit 86eaa9c8e753dfde77b675d25204f94080c65d92 Author: Martin Hurton Date: Fri Jul 6 12:17:13 2012 +0200 Rewrite process_command's loop src/socket_base.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 8d64fc6af83ed49624b11a6c30d5da3e79144d2c Author: Pieter Hintjens Date: Fri Jul 6 17:33:41 2012 +0900 Reverted fix for #393, was already fixed src/tcp_address.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 73f960e739583e88e13706c7dddb3456bf4a9d66 Merge: 77dd0a6 9aa8452 Author: Ian Barber Date: Thu Jul 5 23:02:20 2012 -0700 Merge pull request #395 from hintjens/master Fixed issue #393 - Android build error commit 9aa8452b804d33f0db92b47aadb8c4e4f16fcc2c Author: Pieter Hintjens Date: Fri Jul 6 12:23:51 2012 +0900 Fixed issue #393, compilation warnings src/tcp_address.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 77dd0a6fba14c636d84a5f43f6b79f7aadfbc8f2 Merge: e7f5929 8d96a43 Author: Martin Hurtoň Date: Wed Jul 4 05:20:51 2012 -0700 Merge pull request #394 from hintjens/master Fixed HWM doc on ZMQ_PULL commit 8d96a4397545069ec7401d145852644cdd0bef3e Author: Pieter Hintjens Date: Wed Jul 4 17:46:08 2012 +0900 Fixed documentation of HWM on ZMQ_PULL .gitignore | 1 + doc/zmq_socket.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit e7f59297d047fd498c4825c927178ab9382f79e5 Merge: 1ff5af0 0191977 Author: Pieter Hintjens Date: Tue Jul 3 18:30:09 2012 -0700 Merge pull request #393 from cyrilh/master Making Android&pyzmq friendly version with -avoid-version commit 01919774dc3935d86ea80acf5c47479bf5de7b68 Author: Cyril Holweck Date: Tue Jul 3 12:20:37 2012 +0200 Making Android&pyzmq friendly version with avoid-version configure.in | 5 ++++- src/Makefile.am | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 1ff5af098a1daec6acd9b6ae60368921d2adf8de Merge: e471e5b 1b0e6ef Author: Pieter Hintjens Date: Mon Jul 2 06:54:26 2012 -0700 Merge pull request #392 from hurtonm/master mtrie clenaup commit 1b0e6ef8b4db31b99fe0382eb1dddba1c503bdd9 Author: Martin Hurton Date: Mon Jul 2 07:55:13 2012 +0200 mtrie: Code simplification src/mtrie.cpp | 63 ++++++++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 39 deletions(-) commit 692648de96515132b59b71d6c404a4cd8253ce1d Author: Martin Hurton Date: Mon Jul 2 06:11:29 2012 +0200 mtrie: Do not throw exception on allocation failure src/mtrie.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e471e5b401387f0c4d03d2af67e41d4dbc8843f4 Merge: 6a1bd3e 9ccbeb8 Author: Chuck Remes Date: Tue Jun 26 11:39:35 2012 -0700 Merge pull request #391 from methodmissing/monitor-manual-format Let docs for zmq_ctx_set_monitor() respect a 80 char wide column width commit 9ccbeb84fade63e537f670f150ff1ff29ff3018d Author: Lourens NaudeÌ Date: Tue Jun 26 19:35:59 2012 +0100 Let docs for zmq_ctx_set_monitor() respect a 80 char wide column width doc/zmq_ctx_set_monitor.txt | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 6a1bd3e1e79706b997a76bbc7d3e2f32340fb800 Merge: 6f1229b 26e14d3 Author: Pieter Hintjens Date: Mon Jun 25 18:03:07 2012 -0700 Merge pull request #390 from hurtonm/master Small code simplification commit 26e14d3064fc3c042c2fc0f7a69378c0e7927cdd Author: Martin Hurton Date: Tue Jun 26 01:56:54 2012 +0200 Small code simplification src/xpub.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 6f1229be6ff61e1c579433ebc1bf203a62b4ec22 Merge: c251d94 f8293df Author: Pieter Hintjens Date: Mon Jun 25 05:09:00 2012 -0700 Merge pull request #389 from hurtonm/master Fix a bug in trie implementation commit f8293df4c563e1335365a42ca636249cdc3cdb5d Author: Martin Hurton Date: Mon Jun 25 13:37:32 2012 +0200 Fix a bug in trie implementation When removing keys for a specified value, make sure we drop empty node table. Failing to do this can lead to asserion failure. Refs: http://lists.zeromq.org/pipermail/zeromq-dev/2012-June/017589.html src/mtrie.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit c251d940b3424e045d59123f4bfc529c23bda3e9 Merge: b57b7de a178817 Author: Pieter Hintjens Date: Sat Jun 23 18:40:58 2012 -0700 Merge pull request #388 from minrk/forward-iovec declare struct iovec commit a178817141e605f919f71ef3318e702be52c32b7 Author: MinRK Date: Sat Jun 23 12:51:36 2012 -0700 forward-declare struct iovec avoids warnings of the form: warning: 'struct iovec' declared inside parameter list warning: its scope is only this definition or declaration, which is probably not what you want when building downstream projects include/zmq.h | 2 ++ 1 file changed, 2 insertions(+) commit b57b7debaae571ddb6206c28179bcb8d84fb1bcc Merge: c60b0f5 fc335c5 Author: Pieter Hintjens Date: Wed Jun 20 02:34:40 2012 -0700 Merge pull request #386 from steve-o/err-handler Fix missing ENETRESET for Jira #LIBZMQ-329. commit fc335c59ea40642fc708e3a7903d84de1947da6d Author: Steven McCoy Date: Tue Jun 19 14:15:48 2012 -0400 Fix missing ENETRESET for Jira #LIBZMQ-329. include/zmq.h | 3 +++ 1 file changed, 3 insertions(+) commit c60b0f579dc739069e1c26eebff72a5b81fcadd5 Merge: eb16f6b 85c19f1 Author: Ian Barber Date: Tue Jun 19 08:46:49 2012 -0700 Merge pull request #385 from jdc8/master Missing semi-colon makes Windows compilation fail, Missing files in WIndows solution file commit 85c19f12690fbb65f6669224680c959f6ecddddb Author: Jos Decoster Date: Tue Jun 19 17:05:15 2012 +0200 added missing files to MSVC10 solution file: tcp.cpp, tcp.hpp builds/msvc/libzmq/libzmq.vcxproj | 2 + builds/msvc/libzmq/libzmq.vcxproj.filters | 400 +++++++++++++++++++++++++++++ 2 files changed, 402 insertions(+) commit 98ee759dadf20fa958cda4290160f67c36444aeb Author: jdc8 Date: Tue Jun 19 09:37:06 2012 -0400 Added missing semi-colon. src/ip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb16f6b88e20bd16fb8409cdecc7025443d0522c Merge: 7bbccde 5b3d0c6 Author: Pieter Hintjens Date: Mon Jun 18 22:34:40 2012 -0700 Merge pull request #384 from steve-o/err-handler Add errno fallback values for MSVC2008. commit 5b3d0c633d2886bd14aaf35363787ca28081db12 Author: Steven McCoy Date: Mon Jun 18 17:13:17 2012 -0400 Add errno fallback values for MSVC2008. include/zmq.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 7bbccdeac9bef86988e136779367a6aabad00ac6 Merge: 21eb8c8 08749c8 Author: Ian Barber Date: Sun Jun 17 00:36:58 2012 -0700 Merge pull request #383 from Kobolog/master Reworked ZMQ_FAIL_UNROUTABLE to actually work as it was intended. commit 08749c8e7bf932672e1cf5e1e7830981aeb3b018 Author: Kobolog Date: Sun Jun 17 02:38:15 2012 +0400 Removed an unneeded include in tests tests/test_router_behavior.cpp | 1 - 1 file changed, 1 deletion(-) commit 6da48aed3a9b80d87f30ca634dd586a734c0df51 Author: Kobolog Date: Sun Jun 17 02:36:08 2012 +0400 Fixed tests tests/test_router_behavior.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 829d0003beb251643e9c7ece33c702a3a18fc017 Author: Kobolog Date: Sun Jun 17 02:33:43 2012 +0400 Verbose ROUTER socket behavior patch doc/zmq_setsockopt.txt | 16 +++++----- doc/zmq_socket.txt | 10 +++---- include/zmq.h | 2 +- src/router.cpp | 19 ++++++------ src/router.hpp | 5 ++-- tests/Makefile.am | 4 ++- tests/test_router_behavior.cpp | 64 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 93 insertions(+), 27 deletions(-) commit 21eb8c8fa50e1b00dbc27c41e4a7c6f69d8e79de Merge: 7753379 7d99129 Author: Pieter Hintjens Date: Sat Jun 16 12:53:11 2012 -0700 Merge pull request #382 from hurtonm/master Fix open_socket to return -1 (INVALID_SOCKET on Windows) on error commit 7d991294118edbe080da3a713a28c639c5ea1e96 Author: Martin Hurton Date: Sat Jun 16 21:46:05 2012 +0200 Fix open_socket to return -1 (INVALID_SOCKET on Windows) on error src/ip.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 7753379eab33109a8f15765d843df213a955978c Merge: c8d0d68 919bd96 Author: Pieter Hintjens Date: Thu Jun 14 23:09:59 2012 -0700 Merge pull request #381 from hurtonm/connecter_cleanups Connecter cleanups commit 919bd9628dfcfa497056a2e8427fafc46e206a2a Author: Martin Hurton Date: Fri Jun 15 02:12:26 2012 +0200 {tcp|ipc}_connecter: check whether socket is valid before closing it Calling close () when the underlying socket is invalid triggers an assertion failure. src/ipc_connecter.cpp | 3 ++- src/tcp_connecter.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit ec9f8994a742dc36b2da64e7de7480619cd30285 Author: Martin Hurton Date: Wed Jun 13 03:34:48 2012 +0200 Simplify {tcp|ipc}_connecter Make start_connecting () to have singe exit point. src/ipc_connecter.cpp | 8 ++++---- src/tcp_connecter.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit e0fed9d29a007f0d0e33a97b6cf617138081b578 Author: Martin Hurton Date: Wed Jun 13 02:33:02 2012 +0200 Simplify {tcp|ipc}_connecter The patch is meant to make the code easier to understand. The 'wait' attribute is replaced by 'delayed_start' and 'timer_started' attributes. The former is constant and is initialized in the constructor. The latter is a flag reflecting whether a timer has been started and changes during the lifetime of the object. src/ipc_connecter.cpp | 20 ++++++++++---------- src/ipc_connecter.hpp | 11 +++++++---- src/tcp_connecter.cpp | 20 ++++++++++---------- src/tcp_connecter.hpp | 11 +++++++---- 4 files changed, 34 insertions(+), 28 deletions(-) commit c8d0d684712c6fce6556ce992ff584a35ae877e0 Merge: 67ab339 eb6c668 Author: Pieter Hintjens Date: Thu Jun 14 12:17:51 2012 -0700 Merge pull request #380 from jlopex/master current libzmq not compiling with android NDK commit eb6c668c2ae961a4a53d11d81dd6d2df5bffa666 Author: Javier Lopez Date: Fri Jun 8 11:46:45 2012 -0700 libzmq3.x not compiling on Android crosscompiler - Android crosscompiler shows a warning about two signed/unsigned checks on compilation, this patch adds casts to avoid this, so zmq3.x can compile on it. src/tcp_address.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 67ab3390ecde685d4280c424ce3955363cdcd486 Merge: 426ea71 a96dcfb Author: Ian Barber Date: Thu Jun 14 02:55:32 2012 -0700 Merge pull request #379 from hitenp/doc-changes Correct typo: add missing single quote. commit a96dcfb29ac983f9a55011145e12c7fa3ae84fe4 Author: Hiten P Date: Thu Jun 14 10:52:44 2012 +0100 Correct typo: add missing single quote. doc/zmq_socket.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 426ea7169743f9105e2f1d5090e5d6285e4be0ea Merge: f35bed0 acbb993 Author: Pieter Hintjens Date: Wed Jun 13 16:45:48 2012 -0700 Merge pull request #378 from steve-o/err-handler Fix #LIBZMQ-329 assertion on WSAEACCES commit acbb99383f3079f258dd4e7708672330c21b6edb Author: Steven McCoy Date: Wed Jun 13 19:42:11 2012 -0400 Add additional Windows Sockets Error Codes. src/err.cpp | 61 +++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 10 deletions(-) commit f35bed0edce3579ba24a415092f3975ac22b9735 Merge: a9507cc 75d6728 Author: Pieter Hintjens Date: Wed Jun 13 06:09:42 2012 -0700 Merge pull request #377 from hurtonm/master {tcp|ipc}_listener: close socket when set_address () fails commit 75d67286cc7863f1a7cbb00f4e1bc872dffa964a Author: Martin Hurton Date: Wed Jun 13 14:48:27 2012 +0200 {tcp|ipc}_listener: close socket when set_address () fails src/ipc_listener.cpp | 10 ++++++++-- src/tcp_listener.cpp | 14 ++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) commit a9507cc267aac358f40900eac6f482bf34147761 Merge: dc9749f c7c834a Author: Pieter Hintjens Date: Wed Jun 13 04:20:04 2012 -0700 Merge pull request #376 from ianbarber/master Add unistd header to test commit c7c834a9453932c091bea3a7434444413b58713b Author: Ian Barber Date: Wed Jun 13 12:18:22 2012 +0100 Add unistd header to test_connect_delay header For sleep and usleep tests/test_connect_delay.cpp | 1 + 1 file changed, 1 insertion(+) commit dc9749fc67208f2c01f045da049d597ff9ff76df Merge: 9e1e68e 35c55a2 Author: Pieter Hintjens Date: Wed Jun 13 00:04:13 2012 -0700 Merge pull request #375 from ianbarber/master Add newline to end of new test file commit 35c55a2cde07434bc185d81ed2f567a56959a0a4 Author: Ian Barber Date: Wed Jun 13 07:47:18 2012 +0100 Add newline to end of test_connect_delay file tests/test_connect_delay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e1e68ef16a44e1b66cecbaee9fc6712461b3162 Merge: 076e081 b2e56c5 Author: Pieter Hintjens Date: Tue Jun 12 23:15:11 2012 -0700 Merge pull request #374 from steve-o/branding Add ZeroMQ branding. commit b2e56c5e4f604ce82a735a5c4570b71307f51ccf Author: Steven McCoy Date: Tue Jun 12 21:30:24 2012 -0400 Add ZeroMQ branding. branding.bmp | Bin 0 -> 25818 bytes installer.ico | Bin 0 -> 2842 bytes src/version.rc.in | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) commit 076e081de2f27c054ba04c5721b0901a7baaa8c0 Merge: e1cc2d4 bc9ae71 Author: Pieter Hintjens Date: Tue Jun 12 14:18:51 2012 -0700 Merge pull request #373 from ianbarber/master Add ZMQ_DELAY_ATTACH_ON_CONNECT sockopt commit e1cc2d4a41275190391ff71398689a50956118fb Merge: 95cbad3 704b952 Author: Pieter Hintjens Date: Tue Jun 12 12:26:20 2012 -0700 Merge pull request #372 from ianbarber/manfix Update bind and connect documentation for clarity commit bc9ae715c33fff8dbe3f4c8ecce46c691ad82f41 Author: Ian Barber Date: Tue Jun 12 17:56:39 2012 +0100 Add asserts and rename pipe set Rename the pipeset to terminating_pipes, as suggested by Martin H. Adds asserts to test the pipe is contained in the terminating set where appropriate. src/session_base.cpp | 16 ++++++++++------ src/session_base.hpp | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) commit 704b952274b7bfe2952f564d6d81dff1f279a453 Author: Ian Barber Date: Tue Jun 12 15:49:18 2012 +0100 Add reference to the inproc documentation The previous note in connect introduced but did not elaborate on the requirement to bind before connect in inproc. As that discussion is in detail in the inproc docs link to there. doc/zmq_connect.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7b78ed9d604a5d78af65eefaa456e98854874b3d Author: Ian Barber Date: Tue Jun 12 15:46:26 2012 +0100 Update bind and connect documentation for clarity Based on discussion with Steve O on the list, make the difference between bind and connect usage more clear, and add a note reflecting the fact that inproc must have bind before connect to reinforce the information in zmq_inproc. doc/zmq_bind.txt | 12 +++++++----- doc/zmq_connect.txt | 17 +++++++++++------ 2 files changed, 18 insertions(+), 11 deletions(-) commit e5904e63cebc96048bac7c30ae91c16edfff5922 Author: Ian Barber Date: Tue Jun 12 15:34:48 2012 +0100 Allow blocking while connect() is completing This patch, salvaged from a trainwreck accidental merge earlier, adds a new sockopt, ZMQ_DELAY_ATTACH_ON_CONNECT which prevents a end point being available to push messages to until it has fully connected, making connect work more like bind. This also applies to reconnecting sockets, which may cause message loss of in-queue messages, so it is sensible to use this in conjunction with a low HWM and potentially an alternative acknowledgement path. Notes on most of the individual commits can be found the repository log. .gitignore | 1 + doc/zmq_getsockopt.txt | 15 +++++++++++++++ doc/zmq_setsockopt.txt | 14 ++++++++++++++ include/zmq.h | 1 + src/lb.cpp | 3 +-- src/options.cpp | 27 +++++++++++++++++++++++++++ src/options.hpp | 4 ++++ src/session_base.cpp | 40 ++++++++++++++++++++++++++++++---------- src/session_base.hpp | 3 +++ src/socket_base.cpp | 34 ++++++++++++++++++++-------------- tests/Makefile.am | 2 ++ 11 files changed, 118 insertions(+), 26 deletions(-) commit 409d5e8fff0dc0ebdefe3da2a866021ce2aca18d Author: Ian Barber Date: Tue Jun 12 15:31:23 2012 +0100 Allow blocking while connect() is completing This patch, salvaged from a trainwreck accidental merge earlier, adds a new sockopt, ZMQ_DELAY_ATTACH_ON_CONNECT which prevents a end point being available to push messages to until it has fully connected, making connect work more like bind. This also applies to reconnecting sockets, which may cause message loss of in-queue messages, so it is sensible to use this in conjunction with a low HWM and potentially an alternative acknowledgement path. Notes on most of the individual commits can be found the repository log. tests/test_connect_delay.cpp | 260 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) commit 95cbad3841fdd319cd19722ef88b9e49909aff2f Author: Ian Barber Date: Tue Jun 12 14:53:57 2012 +0100 Revert "After speaking with Ben Gray and the discussion on the mailing list, this is an attempt to create a sockopt to allow connecting pipes to not immediately be available for traffic. The problem is in a PUSH to many PULL situation, where there is a connect to a PULL which is not there. This connect will immediately create a pipe (unlike bind), and traffic will be load balanced to that pipe. This means if there is a persistently unavailable end point then the traffic will queue until HWM is hit, and older messages will be lost." This reverts commit fe3fb419fe249d7015a6c864d18464d434a55468. .gitignore | 1 - doc/zmq_getsockopt.txt | 15 ----- doc/zmq_setsockopt.txt | 13 ----- include/zmq.h | 1 - src/lb.cpp | 3 +- src/options.cpp | 25 -------- src/options.hpp | 4 -- src/session_base.cpp | 29 ---------- src/session_base.hpp | 6 -- src/socket_base.cpp | 5 +- tests/Makefile.am | 2 - tests/test_connect_delay.cpp | 131 ------------------------------------------ 12 files changed, 3 insertions(+), 232 deletions(-) commit a563d494bbbaf0d003bad0901a7d49ac24041857 Author: Ian Barber Date: Tue Jun 12 14:53:38 2012 +0100 Revert "Remove extra brackets as suggested by Martin H, and fix up a comment which was missing a word" This reverts commit b79aaaf473c4ef61bbd45e711d48fceb06dc9ad1. src/session_base.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cc230cfe6097e0ad68375d0251c879bac551016e Author: Ian Barber Date: Tue Jun 12 14:52:38 2012 +0100 Revert "And another typo on the same comment" This reverts commit 297af954514d9b2097c5e2df980bbe16dd72e761. src/session_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b167aa8964fbe65546bf3717ec7b53fb0a0e82d Author: Ian Barber Date: Tue Jun 12 14:52:18 2012 +0100 Revert "Remove the extra outpipe handling as the session is quite capable of delaying the creation of the pipe until the connection has happened. Simply don't build the pipe, and let it do that automatically." This reverts commit 06485d9200ac697896dc4bd162fa4f8b4c2ddaf6. src/session_base.cpp | 32 ++++++++++++++++++++++++++++++-- src/session_base.hpp | 5 ++++- src/socket_base.cpp | 31 ++++++++++++++++--------------- 3 files changed, 50 insertions(+), 18 deletions(-) commit 81b8362a5909975125ca627abd00e1461f56fffa Author: Ian Barber Date: Tue Jun 12 14:51:50 2012 +0100 Revert "Fix a number of whitespace issues in various parts of the code, add validation to most calls on the test and take a first stab at implementing the reconnection pipe blocking." This reverts commit 6f6466f0884a169fd25a48195dd9a4e2135818e6. src/command.hpp | 6 ----- src/object.cpp | 19 -------------- src/object.hpp | 2 -- src/session_base.cpp | 13 +--------- src/session_base.hpp | 8 +++--- src/socket_base.cpp | 17 +++---------- src/socket_base.hpp | 3 --- tests/test_connect_delay.cpp | 58 +++++++++++++++--------------------------- 8 files changed, 29 insertions(+), 97 deletions(-) commit 48d3977632fd6eed6977d2eab0ac421efd454b8e Author: Ian Barber Date: Tue Jun 12 14:51:33 2012 +0100 Revert "Fix condition so that PGM and EPGM sockets always create pipes immediately, even if delay_attach_on_connect is set. This allows passing through the icanhasall flag, and is realistic given the fact those protocols should be able to connect immediately" This reverts commit b5ace39e2a48b906237d869f4f819f1a28a8cee7. src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c382c5c61b9b31050cf92cd6119184cb38e7ab1 Author: Ian Barber Date: Tue Jun 12 14:51:19 2012 +0100 Revert "Fix whitespace in test" This reverts commit 0b3478d6ecf0772c4c6e6ff4e4bdfdeef61cf003. tests/test_connect_delay.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 72bae207a3dd2891f27f3f052e82631dfbf04712 Author: Ian Barber Date: Tue Jun 12 14:51:05 2012 +0100 Revert "Rebinding on reconnection to allow for the pipe blocking will set the event sink again, which will cause an assert to be triggered. I have modified that to allow for setting the same sink to be OK. I believe this should be ok - on termination, if a pipe hasn't reconnected, it would just attempt to be erased from the pipes list again, which is reasonable" This reverts commit 1566091bc6cbf2a69b19243be3906c6d92ac339a. src/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0920caf0226f724e46f0b843b72841be3dcbc1f Author: Ian Barber Date: Tue Jun 12 14:50:50 2012 +0100 Revert "On the advice of Martin Hurton, removed the new command type and just terminated the pipe in a reconnect situation, and notified the socket of the same. This handles the blocking properly, but at the cost of potentially losing in flight messages. However, this is a reasonable trade off given how much simpler it makes the patch." This reverts commit c13f1d52ff9ed51a651ad8bcc9379e82d9318e86. src/command.hpp | 6 ++++++ src/object.cpp | 19 +++++++++++++++++++ src/object.hpp | 2 ++ src/session_base.cpp | 13 +++++-------- src/socket_base.cpp | 11 +++++++++++ src/socket_base.hpp | 3 +++ 6 files changed, 46 insertions(+), 8 deletions(-) commit b020bd4ba8b8860aa868663999f6fb9395cc98d7 Author: Ian Barber Date: Tue Jun 12 14:49:44 2012 +0100 Revert "Remove unnecessary extra test in pipe assertion - now we are terminating pipes we don't need to allow the case in which a pipe is rebound to the same sink" This reverts commit 29f8d9ca15f679132302ca5a9016692c2be1d6b2. src/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 956cfd9f75963b25632c1e7b53a82661c753525e Author: Ian Barber Date: Tue Jun 12 14:49:21 2012 +0100 Revert "Fix incorrect whitespace in if statement" This reverts commit 55cbdfcf261b41f6a9b71bb26ce7336da7f73eec. src/session_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74175decb43386f1b7f95670560be40ae5915774 Author: Ian Barber Date: Tue Jun 12 14:48:24 2012 +0100 Revert "Removing unnecessary outpipe values that had been used for reconnecting existing pipes - no longer needed when using a pipe term for the delay_attach situation." This reverts commit ace7c99b917dd66f1fcaed3cbb50c988b7e33b09. src/session_base.cpp | 6 ++++++ src/session_base.hpp | 3 +++ 2 files changed, 9 insertions(+) commit 440af0022df056d00e29c7a095e9b1cf7eb48118 Author: Ian Barber Date: Tue Jun 12 14:48:00 2012 +0100 Revert "Restoring comment for clarity" This reverts commit 09956dee939a06c0734004aa3f39c491ec49c6f8. src/session_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8968b294e0da4ea8811441ffd62a5bc84b73839c Author: Ian Barber Date: Tue Jun 12 14:47:27 2012 +0100 Revert "When detaching a pipe, as well as checking the delay on connect sockopt is set, also ensure that the protocol is not pgm or epgm as we are not implementing the functionality for multicase types" This reverts commit 5008f385bab2dd89c68d7ff93e0c5b303c6043e8. src/session_base.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 836fa4b7cac4dfbb70c7babaef2abcef92249c89 Author: Ian Barber Date: Tue Jun 12 14:47:10 2012 +0100 Revert "The previous code to block the socket from receiving on that pipe during a disconnect was vulnerable to a race condition. This code calls with the terminate functions of both ends of the pipe - I believe this should be safer. This required storing a pointer to the socket end of the pipe" This reverts commit 336f72720a99195942ced5c6aad2bb8e0baa3f32. src/session_base.cpp | 6 ++---- src/session_base.hpp | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) commit 2c6f26153e913e159f1fb739ec80ea73fbb53d6a Author: Ian Barber Date: Tue Jun 12 14:46:38 2012 +0100 Revert "Reverted to a simpler shutdown. This seems to disconnect and reconnect the pipe properly, but there is a problem in overall shutdown when the pipe has blocked and reconnected - the session seems to get terminated() called on it only in shutdown for the original pipe, by which point it has been replaced. I am not sure at the moment why this only happens then, but this does mean this patch is broken at the moment" This reverts commit b84b007981d9247bcc7bd000e4aeb56baed56de2. src/session_base.cpp | 21 ++++++++++++--------- src/session_base.hpp | 3 +++ 2 files changed, 15 insertions(+), 9 deletions(-) commit 3ae68d67a451162cf70dadc72f39da892be6f0a0 Author: Ian Barber Date: Tue Jun 12 14:46:23 2012 +0100 Revert "Use the hiccup mechanism to notify the socket end of the pair of the change in state, and have it shutdown that end, and shutdown the local end normally. This seems to resolve the shutdown and race condition issues." This reverts commit 67497a26439239fdb95652b46d7e4e41fe672b31. src/session_base.cpp | 6 +++--- src/socket_base.cpp | 7 +------ 2 files changed, 4 insertions(+), 9 deletions(-) commit f5a072fee1067d07e33005534e37c452645b2e03 Author: Ian Barber Date: Tue Jun 12 14:46:01 2012 +0100 Revert "Code formatting, and clean up so that xhiccuped is only handled in case the pipe isn't terminating" This reverts commit 5da289cd5bf0f3c367d3eb091ac66e5f4ce2b97c. src/socket_base.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 6eeaf151797411914d5af48a89c70be3959e6e0d Author: Ian Barber Date: Tue Jun 12 14:45:36 2012 +0100 Revert "Remove unnecessary condition in assert" This reverts commit 3053f7e368149044e5d5887e78fc96c1b9f33141. src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9926f6f24fd931e97950033cff4a172ab4f7426 Author: Ian Barber Date: Tue Jun 12 14:45:14 2012 +0100 Revert "As Martin pointed out, there is a race condition in the old code where a pipe could start shutting down after disconnection, but the new one could connect first. This connection would not get a pipe created for it, so the messages could never flow. The simplest way round this would be a flag, but it is possibly for a very bouncy but fast connection to go up and down twice I imagine, so instead I have added a counter. This starts at zero, and will null out the pipe if terminate is called while it is zero. On a disconnect situation the counter is incremented, and the pipe is the not nulled if the value is non zero. In the terminated function it is decremented for each pipe that is shut down, and the assertion that the terminated pipe == the current pipe is skipped while it is non-zero. This should deal with the race condition and not allow any extra terminated() calls without hitting the assertion." This reverts commit a5f7300da6aa2224638fc932fe5ca3624189b1c1. src/session_base.cpp | 15 ++++----------- src/session_base.hpp | 3 --- 2 files changed, 4 insertions(+), 14 deletions(-) commit 19da88be67a23ffffe3530526e6af6e238c12fd3 Author: Ian Barber Date: Tue Jun 12 14:44:41 2012 +0100 Revert "Filter read and write activated calls from the pipe to the session, and delay shutdown in terminated until the final pipe is shutdown." This reverts commit a90c1db7d2c0d32f9a0177d46502505efac654a5. src/session_base.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit 4aaf3e6389f8c72d5492905f80bb2a6c6db6ca44 Author: Ian Barber Date: Tue Jun 12 14:44:12 2012 +0100 Revert "Add disconnect test" This reverts commit d8f3487ee1c15e9cd9df8a795529765f7bb00ef1. tests/test_connect_delay.cpp | 121 ++---------------------------------------- 1 file changed, 3 insertions(+), 118 deletions(-) commit eb14890d2363c15fe0486acbdaf698b6068f4d97 Author: Ian Barber Date: Tue Jun 12 14:43:18 2012 +0100 Revert "Revert "Merge branch 'master' of github.com:ianbarber/libzmq"" This reverts commit 029d3dfae2c2bf9e10c7f05d78593f481569bbd7. src/Makefile.am | 2 + src/decoder.cpp | 2 +- src/fq.cpp | 10 ++-- src/ip.cpp | 83 --------------------------- src/ip.hpp | 6 -- src/session_base.cpp | 48 +++++++++++----- src/session_base.hpp | 4 +- src/signaler.cpp | 4 +- src/socket_base.cpp | 6 +- src/tcp.cpp | 122 ++++++++++++++++++++++++++++++++++++++++ src/tcp.hpp | 38 +++++++++++++ src/tcp_connecter.cpp | 1 + src/tcp_listener.cpp | 1 + tests/test_connect_delay.cpp | 121 ++++++++++++++++++++++++++++++++++++++- tests/test_connect_resolve.cpp | 2 +- 15 files changed, 331 insertions(+), 119 deletions(-) commit bdd4e1351d0446579caaad19e8ef4a4cf3d5e710 Author: Ian Barber Date: Tue Jun 12 14:28:32 2012 +0100 Revert "Revert "Merge branch 'master' of github.com:zeromq/libzmq"" This reverts commit dde69fb9fb928db1850eb209db7aed79e26777fb. src/ipc_connecter.cpp | 28 +++++++++++++++++++++------- src/ipc_connecter.hpp | 1 + src/ipc_listener.cpp | 3 +-- src/tcp_connecter.cpp | 28 +++++++++++++++++++++------- src/tcp_connecter.hpp | 1 + src/tcp_listener.cpp | 3 +-- 6 files changed, 46 insertions(+), 18 deletions(-) commit 029d3dfae2c2bf9e10c7f05d78593f481569bbd7 Author: Ian Barber Date: Tue Jun 12 14:13:17 2012 +0100 Revert "Merge branch 'master' of github.com:ianbarber/libzmq" This reverts commit 33459029793474d14cdb48f85ad2c58dc7ed156f, reversing changes made to 889b0e6f29f0cce566339b13b8a44f3b97836b6e. src/Makefile.am | 2 - src/decoder.cpp | 2 +- src/fq.cpp | 10 ++-- src/ip.cpp | 83 +++++++++++++++++++++++++++ src/ip.hpp | 6 ++ src/session_base.cpp | 48 +++++----------- src/session_base.hpp | 4 +- src/signaler.cpp | 4 +- src/socket_base.cpp | 6 +- src/tcp.cpp | 122 ---------------------------------------- src/tcp.hpp | 38 ------------- src/tcp_connecter.cpp | 1 - src/tcp_listener.cpp | 1 - tests/test_connect_delay.cpp | 121 +-------------------------------------- tests/test_connect_resolve.cpp | 2 +- 15 files changed, 119 insertions(+), 331 deletions(-) commit dde69fb9fb928db1850eb209db7aed79e26777fb Author: Ian Barber Date: Tue Jun 12 14:12:03 2012 +0100 Revert "Merge branch 'master' of github.com:zeromq/libzmq" This reverts commit 7b10586558268479e62ed901f3d8d76916bc6c8a, reversing changes made to 33459029793474d14cdb48f85ad2c58dc7ed156f. src/ipc_connecter.cpp | 28 +++++++--------------------- src/ipc_connecter.hpp | 1 - src/ipc_listener.cpp | 3 ++- src/tcp_connecter.cpp | 28 +++++++--------------------- src/tcp_connecter.hpp | 1 - src/tcp_listener.cpp | 3 ++- 6 files changed, 18 insertions(+), 46 deletions(-) commit 6117a2b09945f8bda67eb61f7baec4ed9ae7fc8a Author: Ian Barber Date: Tue Jun 12 14:07:54 2012 +0100 Revert "Replace incomplete count with a std::set" This reverts commit 4aa5ba3d119b98c8f1e4e682a6ee7c57d460cc55. Unintentional merge src/session_base.cpp | 33 +++++++++++++++++++-------------- src/session_base.hpp | 4 ++-- tests/test_connect_delay.cpp | 2 ++ 3 files changed, 23 insertions(+), 16 deletions(-) commit 4aa5ba3d119b98c8f1e4e682a6ee7c57d460cc55 Author: Ian Barber Date: Tue Jun 12 12:13:21 2012 +0100 Replace incomplete count with a std::set This commit removes the countdown flag and adds a set to store the pipes that are currently being disconnected. src/session_base.cpp | 33 ++++++++++++++------------------- src/session_base.hpp | 4 ++-- tests/test_connect_delay.cpp | 2 -- 3 files changed, 16 insertions(+), 23 deletions(-) commit 7b10586558268479e62ed901f3d8d76916bc6c8a Merge: 3345902 b448de9 Author: Ian Barber Date: Tue Jun 12 11:34:24 2012 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit 33459029793474d14cdb48f85ad2c58dc7ed156f Merge: 889b0e6 d8f3487 Author: Ian Barber Date: Tue Jun 12 11:34:17 2012 +0100 Merge branch 'master' of github.com:ianbarber/libzmq commit b448de926befa42c4e9054464ec5635c95cc4d96 Merge: ace8f75 3ec8e57 Author: Ian Barber Date: Mon Jun 11 23:57:21 2012 -0700 Merge pull request #371 from hurtonm/fix_race_condition_in_connecters Fix race conditions in {tcp,ipc}_connecter commit 3ec8e576d99a332514a5338671a18413ce03ba98 Author: Martin Hurton Date: Tue Jun 12 01:39:16 2012 +0200 Fix race conditions in {tcp,ipc}_connecter Once the object has been terminated, it is unsafe for this object to refer to its parent. The bug was responsible for occasional test_shutdown_stress failures. src/ipc_connecter.cpp | 28 +++++++++++++++++++++------- src/ipc_connecter.hpp | 1 + src/ipc_listener.cpp | 3 +-- src/tcp_connecter.cpp | 28 +++++++++++++++++++++------- src/tcp_connecter.hpp | 1 + src/tcp_listener.cpp | 3 +-- 6 files changed, 46 insertions(+), 18 deletions(-) commit d8f3487ee1c15e9cd9df8a795529765f7bb00ef1 Author: Ian Barber Date: Mon Jun 11 20:04:09 2012 +0100 Add disconnect test Add a new section to the connect delay test that disconnects and reconnects a socket to ensure that some messages are appropriately blocked. tests/test_connect_delay.cpp | 121 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 118 insertions(+), 3 deletions(-) commit a90c1db7d2c0d32f9a0177d46502505efac654a5 Author: Ian Barber Date: Mon Jun 11 07:58:59 2012 +0100 Filter read and write activated calls from the pipe to the session, and delay shutdown in terminated until the final pipe is shutdown. src/session_base.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit a5f7300da6aa2224638fc932fe5ca3624189b1c1 Author: Ian Barber Date: Sun Jun 10 19:57:02 2012 +0100 As Martin pointed out, there is a race condition in the old code where a pipe could start shutting down after disconnection, but the new one could connect first. This connection would not get a pipe created for it, so the messages could never flow. The simplest way round this would be a flag, but it is possibly for a very bouncy but fast connection to go up and down twice I imagine, so instead I have added a counter. This starts at zero, and will null out the pipe if terminate is called while it is zero. On a disconnect situation the counter is incremented, and the pipe is the not nulled if the value is non zero. In the terminated function it is decremented for each pipe that is shut down, and the assertion that the terminated pipe == the current pipe is skipped while it is non-zero. This should deal with the race condition and not allow any extra terminated() calls without hitting the assertion. src/session_base.cpp | 15 +++++++++++---- src/session_base.hpp | 3 +++ 2 files changed, 14 insertions(+), 4 deletions(-) commit 841cf69eb7560c425ea5fa4566048b7ab01daa42 Merge: 3053f7e ace8f75 Author: Ian Barber Date: Sun Jun 10 19:18:18 2012 +0100 Merge branch 'master' of https://github.com/zeromq/libzmq commit ace8f753e10e3ff35791a0cbc3399958c0b039a5 Merge: e9bfd76 1f53697 Author: Ian Barber Date: Sun Jun 10 04:07:12 2012 -0700 Merge pull request #370 from hurtonm/code_cleanup Use struct keyword consistently with sockaddr and sockaddr_in commit 1f536972115dc4daf3a279fd557f069e00686a24 Author: Martin Hurton Date: Sun Jun 10 02:14:43 2012 +0200 Use struct keyword consistently with sockaddr and sockaddr_in src/signaler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9bfd76f8761a6724801bf2676897f69ea87aea6 Merge: 66b7edf 602c501 Author: Pieter Hintjens Date: Sat Jun 9 07:13:30 2012 -0700 Merge pull request #368 from hurtonm/code_cleanup Small code simplification commit 66b7edfbd16c36e7c684bb21b4779e2b80b56266 Merge: b0792ec 796212a Author: Pieter Hintjens Date: Sat Jun 9 07:12:48 2012 -0700 Merge pull request #367 from hurtonm/issue_309 Fix the message decoder to ignore reserved flags. commit 602c50117c4325c87c93f9ce038f4c1c9067a307 Author: Martin Hurton Date: Sat Jun 9 14:21:01 2012 +0200 Small code simplification src/fq.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 796212a985964162a284cc667ab09834ce681466 Author: Martin Hurton Date: Sat Jun 9 12:52:26 2012 +0200 Fix the message decoder to ignore reserved flags. Failing to clear the reserved flags, the decoder may produce messages with 'identity' and 'shared' flags set. This unintended modification of message flags can lead to memory errors or asserion failures. Fixes issue #309 src/decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3053f7e368149044e5d5887e78fc96c1b9f33141 Author: Ian Barber Date: Sat Jun 9 00:08:14 2012 +0100 Remove unnecessary condition in assert src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5da289cd5bf0f3c367d3eb091ac66e5f4ce2b97c Author: Ian Barber Date: Sat Jun 9 00:07:30 2012 +0100 Code formatting, and clean up so that xhiccuped is only handled in case the pipe isn't terminating src/socket_base.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0bf1d0262e6b985622461888b1e2e5f732bd95b4 Merge: 67497a2 b0792ec Author: Ian Barber Date: Fri Jun 8 23:55:58 2012 +0100 Merge branch 'master' of https://github.com/zeromq/libzmq commit 67497a26439239fdb95652b46d7e4e41fe672b31 Author: Ian Barber Date: Fri Jun 8 23:55:42 2012 +0100 Use the hiccup mechanism to notify the socket end of the pair of the change in state, and have it shutdown that end, and shutdown the local end normally. This seems to resolve the shutdown and race condition issues. src/session_base.cpp | 6 +++--- src/socket_base.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) commit b0792ec78a1ec7fe207f3c44c363be58a6805afe Merge: 1c65921 db13fbf Author: Ian Barber Date: Fri Jun 8 15:04:09 2012 -0700 Merge pull request #366 from hitenp/tcp-consolidate Consolidate TCP-specific common code into their own files. commit db13fbf4a996726bd634f050c98be7a0762b2822 Author: Hiten P Date: Fri Jun 8 18:04:40 2012 +0100 Consolidate TCP-specific common code into their own files. The TCP keepalive tuning code has been moved into the newly added files; this also allows future TCP-specific code to be added into these files, without bloating the IP level code and establishes a known file structure for other IP-based transports. Remember: this is a no-op change, hence no API or functionality was changed as part of this commit. src/Makefile.am | 2 + src/ip.cpp | 83 --------------------------------- src/ip.hpp | 6 --- src/tcp.cpp | 122 +++++++++++++++++++++++++++++++++++++++++++++++++ src/tcp.hpp | 38 +++++++++++++++ src/tcp_connecter.cpp | 1 + src/tcp_listener.cpp | 1 + 7 files changed, 164 insertions(+), 89 deletions(-) commit 1c6592157b2444f96a6f1be19a673d7dec621c0d Merge: 1dcedf7 31cb1f2 Author: Ian Barber Date: Fri Jun 8 05:24:26 2012 -0700 Merge pull request #365 from hitenp/master Change connection failure test to use an invalid hostname commit 31cb1f297d5a25eec25feb263e67e23a1812339d Author: Hiten P Date: Fri Jun 8 13:15:45 2012 +0100 Change connection failure test to use an invalid hostname - invalid hostname set to 0mq.is.the.best (naturally!) - issue happens as other valid-like non-existent hostnames were redirected by buggy Cable/ISP DNS servers tests/test_connect_resolve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b84b007981d9247bcc7bd000e4aeb56baed56de2 Author: Ian Barber Date: Wed Jun 6 23:12:56 2012 +0100 Reverted to a simpler shutdown. This seems to disconnect and reconnect the pipe properly, but there is a problem in overall shutdown when the pipe has blocked and reconnected - the session seems to get terminated() called on it only in shutdown for the original pipe, by which point it has been replaced. I am not sure at the moment why this only happens then, but this does mean this patch is broken at the moment src/session_base.cpp | 21 +++++++++------------ src/session_base.hpp | 3 --- 2 files changed, 9 insertions(+), 15 deletions(-) commit 889b0e6f29f0cce566339b13b8a44f3b97836b6e Merge: 8643d71 1dcedf7 Author: Ian Barber Date: Wed Jun 6 15:23:51 2012 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit 1dcedf7ab16765d9008c4852361af7ad65f54bd5 Merge: 3db9bf3 271ced9 Author: Ian Barber Date: Wed Jun 6 07:16:29 2012 -0700 Merge pull request #364 from AlexBio/fix_unused_variable Remove unused variable which causes build to fail with -Werror commit 8643d71ee80a17466c87bb3ce6be79ee09c1a410 Merge: 336f727 3db9bf3 Author: Ian Barber Date: Wed Jun 6 15:04:56 2012 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit 3db9bf31b3a50f49ee9247ae8096a5d7f312c5fe Merge: f611c57 4bd78bb Author: Ian Barber Date: Wed Jun 6 06:29:41 2012 -0700 Merge pull request #363 from AlexBio/fix_nosigpipe_check Check if SO_NOSIGPIPE is defined commit 4bd78bb4cf7be4036cf7bf077738f50849e06c19 Author: Alessandro Ghedini Date: Wed Jun 6 15:08:00 2012 +0200 Check if SO_NOSIGPIPE is defined src/stream_engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 271ced98cf55447260d8c13086126b74ef1df215 Author: Alessandro Ghedini Date: Wed Jun 6 11:30:41 2012 +0200 Remove unused variable which causes build to fail with -Werror src/pgm_socket.cpp | 1 - 1 file changed, 1 deletion(-) commit f611c57c48cf6b0d89766ff45906072271c69649 Merge: 4d4674e e5bb5a6 Author: Ian Barber Date: Tue Jun 5 23:47:36 2012 -0700 Merge pull request #362 from hintjens/master Bumped version for next release (3.3.0) commit e5bb5a60f41e7d22b360f4436d0ccce79d9c625e Author: Pieter Hintjens Date: Wed Jun 6 06:57:43 2012 +0200 Bumped version to 3.3.0 include/zmq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 336f72720a99195942ced5c6aad2bb8e0baa3f32 Author: Ian Barber Date: Tue Jun 5 21:44:23 2012 +0100 The previous code to block the socket from receiving on that pipe during a disconnect was vulnerable to a race condition. This code calls with the terminate functions of both ends of the pipe - I believe this should be safer. This required storing a pointer to the socket end of the pipe src/session_base.cpp | 6 ++++-- src/session_base.hpp | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 5008f385bab2dd89c68d7ff93e0c5b303c6043e8 Author: Ian Barber Date: Tue Jun 5 18:41:38 2012 +0100 When detaching a pipe, as well as checking the delay on connect sockopt is set, also ensure that the protocol is not pgm or epgm as we are not implementing the functionality for multicase types src/session_base.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4d4674e088c74d955b6e86182ea0c89815e95881 Merge: f8b79f8 97c48cc Author: Ian Barber Date: Tue Jun 5 10:33:34 2012 -0700 Merge pull request #360 from vortechs2000/fix_hpux Fix build on HPUX 11iv3 commit 09d18e4b3cca0bd95adfde49096be6e380097f5d Merge: 09956de f8b79f8 Author: Ian Barber Date: Tue Jun 5 18:32:15 2012 +0100 Merge branch 'master' of https://github.com/zeromq/libzmq commit f8b79f888fa3a3743d28bb2611af0670144f7749 Merge: 897b6b5 616bcf9 Author: Pieter Hintjens Date: Tue Jun 5 09:38:38 2012 -0700 Merge pull request #361 from vortechs2000/fix_aix7 Fix up build on AIX7 commit 897b6b58ea5830024e447e48c634d0fceb89abf9 Merge: 98ef560 3687789 Author: Pieter Hintjens Date: Tue Jun 5 09:11:25 2012 -0700 Merge pull request #359 from vortechs2000/fix_older_linux_gcc Fix build on RHEL5 and SLES10 commit 97c48ccda6d772ed65b8b2f1ce4c94cf760a0270 Author: AJ Lewis Date: Tue Jun 5 09:44:02 2012 -0500 Fix build on HPUX 11iv3 The socket length variable for getsockname and accept must be an (int *) instead of a (socklen_t *) on HPUX. Signed-off-by: AJ Lewis src/ipc_listener.cpp | 4 ++++ src/tcp_listener.cpp | 8 ++++++++ 2 files changed, 12 insertions(+) commit 3687789f9d4cea0e23f462022248463d5050cc98 Author: AJ Lewis Date: Tue Jun 5 09:22:22 2012 -0500 Fix build on RHEL5 and SLES10 GCC 4.1.2 on RHEL5 and SLES10 don't like not having a newline at the end of a source file, and error out if it's missing. Signed-off-by: AJ Lewis tests/test_monitor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 616bcf9fc2b0b6876014d5e5e4d52eef67a9137c Author: AJ Lewis Date: Tue Jun 5 09:15:37 2012 -0500 Fix up build on AIX7 Copy logic from zmq.cpp into device.cpp for getting poll.h included. Ensure that zmq.h is included *after* poll.h in both zmq.cpp and device.cpp. Signed-off-by: AJ Lewis src/device.cpp | 25 +++++++++++++++++++++++++ src/zmq.cpp | 4 +++- 2 files changed, 28 insertions(+), 1 deletion(-) commit 09956dee939a06c0734004aa3f39c491ec49c6f8 Author: Ian Barber Date: Mon Jun 4 11:41:20 2012 +0100 Restoring comment for clarity src/session_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ace7c99b917dd66f1fcaed3cbb50c988b7e33b09 Author: Ian Barber Date: Mon Jun 4 11:40:14 2012 +0100 Removing unnecessary outpipe values that had been used for reconnecting existing pipes - no longer needed when using a pipe term for the delay_attach situation. src/session_base.cpp | 6 ------ src/session_base.hpp | 3 --- 2 files changed, 9 deletions(-) commit 55cbdfcf261b41f6a9b71bb26ce7336da7f73eec Author: Ian Barber Date: Mon Jun 4 10:31:30 2012 +0100 Fix incorrect whitespace in if statement src/session_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29f8d9ca15f679132302ca5a9016692c2be1d6b2 Author: Ian Barber Date: Mon Jun 4 10:29:44 2012 +0100 Remove unnecessary extra test in pipe assertion - now we are terminating pipes we don't need to allow the case in which a pipe is rebound to the same sink src/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c13f1d52ff9ed51a651ad8bcc9379e82d9318e86 Author: Ian Barber Date: Mon Jun 4 10:27:16 2012 +0100 On the advice of Martin Hurton, removed the new command type and just terminated the pipe in a reconnect situation, and notified the socket of the same. This handles the blocking properly, but at the cost of potentially losing in flight messages. However, this is a reasonable trade off given how much simpler it makes the patch. src/command.hpp | 6 ------ src/object.cpp | 19 ------------------- src/object.hpp | 2 -- src/session_base.cpp | 13 ++++++++----- src/socket_base.cpp | 11 ----------- src/socket_base.hpp | 3 --- 6 files changed, 8 insertions(+), 46 deletions(-) commit 1566091bc6cbf2a69b19243be3906c6d92ac339a Author: Ian Barber Date: Sun Jun 3 23:27:02 2012 +0100 Rebinding on reconnection to allow for the pipe blocking will set the event sink again, which will cause an assert to be triggered. I have modified that to allow for setting the same sink to be OK. I believe this should be ok - on termination, if a pipe hasn't reconnected, it would just attempt to be erased from the pipes list again, which is reasonable src/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b3478d6ecf0772c4c6e6ff4e4bdfdeef61cf003 Author: Ian Barber Date: Sun Jun 3 23:11:08 2012 +0100 Fix whitespace in test tests/test_connect_delay.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit b5ace39e2a48b906237d869f4f819f1a28a8cee7 Author: Ian Barber Date: Sun Jun 3 23:01:24 2012 +0100 Fix condition so that PGM and EPGM sockets always create pipes immediately, even if delay_attach_on_connect is set. This allows passing through the icanhasall flag, and is realistic given the fact those protocols should be able to connect immediately src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f6466f0884a169fd25a48195dd9a4e2135818e6 Author: Ian Barber Date: Sun Jun 3 22:57:47 2012 +0100 Fix a number of whitespace issues in various parts of the code, add validation to most calls on the test and take a first stab at implementing the reconnection pipe blocking. It didn't seem straightforward to use any of the existing process calls, so I have added a new command to command_t and friends called detach. This instructs the socket_base to remove the pipe from it's pipe list. The session base stores a copy of the outpipe, and will resend the bind command on reconnection. This should allow balancing again. src/command.hpp | 6 +++++ src/object.cpp | 19 ++++++++++++++ src/object.hpp | 2 ++ src/session_base.cpp | 13 +++++++++- src/session_base.hpp | 8 +++--- src/socket_base.cpp | 17 ++++++++++--- src/socket_base.hpp | 3 +++ tests/test_connect_delay.cpp | 58 +++++++++++++++++++++++++++--------------- 8 files changed, 97 insertions(+), 29 deletions(-) commit 06485d9200ac697896dc4bd162fa4f8b4c2ddaf6 Author: Ian Barber Date: Sun Jun 3 22:05:36 2012 +0100 Remove the extra outpipe handling as the session is quite capable of delaying the creation of the pipe until the connection has happened. Simply don't build the pipe, and let it do that automatically. src/session_base.cpp | 32 ++------------------------------ src/session_base.hpp | 5 +---- src/socket_base.cpp | 31 +++++++++++++++---------------- 3 files changed, 18 insertions(+), 50 deletions(-) commit 297af954514d9b2097c5e2df980bbe16dd72e761 Author: Ian Barber Date: Sun Jun 3 21:38:41 2012 +0100 And another typo on the same comment src/session_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b79aaaf473c4ef61bbd45e711d48fceb06dc9ad1 Author: Ian Barber Date: Sun Jun 3 21:34:41 2012 +0100 Remove extra brackets as suggested by Martin H, and fix up a comment which was missing a word src/session_base.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f687a2989b7b4766e8ef7c459c8426e2e7ccbce7 Merge: fe3fb41 98ef560 Author: Ian Barber Date: Fri Jun 1 21:49:07 2012 +0100 Merge branch 'master' of https://github.com/zeromq/libzmq commit 98ef56039ee1c43f31fd6c411447165a5046e347 Merge: c28af41 0f58a98 Author: Ian Barber Date: Fri Jun 1 10:10:44 2012 -0700 Merge pull request #358 from steve-o/issue-320-author Issue 320 author commit 0f58a98b3e6b406e4eafe456351d1948e4351f47 Merge: 320684e 13976a3 Author: Steven McCoy Date: Fri Jun 1 13:03:19 2012 -0400 Merge branch 'issue-320' of https://github.com/steve-o/libzmq into issue-320-author commit 320684ef3998c5d8120e5e0e7b3e76cb38e5c3ad Author: Douglas Young Date: Wed May 30 20:52:19 2012 -0400 Return error on invalid PGM url instead of raising assertion (Douglas Young). Fix Win32 build. src/decoder.cpp | 5 +++++ src/pgm_socket.cpp | 52 ++++++++++++++++++++++++++++++++++----------------- src/pgm_socket.hpp | 3 +++ src/socket_base.cpp | 14 ++++++++++++++ 4 files changed, 57 insertions(+), 17 deletions(-) commit fe3fb419fe249d7015a6c864d18464d434a55468 Author: Ian Barber Date: Fri Jun 1 17:58:19 2012 +0100 After speaking with Ben Gray and the discussion on the mailing list, this is an attempt to create a sockopt to allow connecting pipes to not immediately be available for traffic. The problem is in a PUSH to many PULL situation, where there is a connect to a PULL which is not there. This connect will immediately create a pipe (unlike bind), and traffic will be load balanced to that pipe. This means if there is a persistently unavailable end point then the traffic will queue until HWM is hit, and older messages will be lost. This patch adds a sockopt ZMQ_DELAY_ATTACH_ON_CONNECT, which if set to 1 will attempt to preempt this behavior. It does this by extending the use of the session_base to include in the outbound as well as the inbound pipe, and only associates the pipe with the socket once it receives the connected callback via a process_attach message. This works, and a test has been added to show so, but may introduce unexpected complications. The shutdown logic in this class has become marginally more awkward because of this, requiring the session to serve as the sink for both pipes if shutdown occurs with a still-connecting pipe in place. It is also possible there could be issues around flushing the messages, but as I could not directly think how to create such an issue I have not written any code with regards to that. The documentation has been updated to reflect the change, but please do check over the code and test and review. .gitignore | 1 + doc/zmq_getsockopt.txt | 15 +++++ doc/zmq_setsockopt.txt | 13 +++++ include/zmq.h | 1 + src/lb.cpp | 3 +- src/options.cpp | 25 ++++++++ src/options.hpp | 4 ++ src/session_base.cpp | 29 ++++++++++ src/session_base.hpp | 6 ++ src/socket_base.cpp | 5 +- tests/Makefile.am | 2 + tests/test_connect_delay.cpp | 131 ++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 232 insertions(+), 3 deletions(-) commit c28af41ca4a02484577afc6376ed278292ee43da Merge: bc150de 89ff277 Author: Pieter Hintjens Date: Thu May 31 07:29:55 2012 -0700 Merge pull request #356 from hurtonm/code_cleanup lb: code cleanup commit bc150de81e5416e798b9ca4b70780198b30911f9 Merge: 4e7be10 2973eaf Author: Pieter Hintjens Date: Thu May 31 07:29:22 2012 -0700 Merge pull request #355 from hurtonm/fq_lb_fix Prevent connection starvation commit 89ff277becdba92def3ea6ba4b7afe3c7af6adbe Author: Martin Hurton Date: Thu May 31 15:59:59 2012 +0200 lb: code cleanup src/lb.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 2973eaf44629dba0b27735549fa5bb627d5a7301 Author: Martin Hurton Date: Thu May 31 15:34:30 2012 +0200 Prevent connection starvation When removing a pipe from the lb or fq component, make sure we do not remove another pipe from the active set. src/fq.cpp | 5 ++++- src/lb.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit 4e7be102f4d09c27b76f52e9d3f84f23cebf6cff Merge: 32befeb 13976a3 Author: Pieter Hintjens Date: Thu May 31 01:19:22 2012 -0700 Merge pull request #354 from steve-o/issue-320 Return error on invalid PGM url instead of raising assertion. commit 13976a3d656989997077dc9b1c5fe1ec42f991e9 Author: Steven McCoy Date: Wed May 30 20:52:19 2012 -0400 Return error on invalid PGM url instead of raising assertion. Fix Win32 build. src/decoder.cpp | 5 +++++ src/pgm_socket.cpp | 52 ++++++++++++++++++++++++++++++++++----------------- src/pgm_socket.hpp | 3 +++ src/socket_base.cpp | 14 ++++++++++++++ 4 files changed, 57 insertions(+), 17 deletions(-) commit 32befeb0a6215aede34b58eb38bd853133473113 Merge: 1adb7b1 75df019 Author: Pieter Hintjens Date: Wed May 30 09:59:55 2012 -0700 Merge pull request #353 from steve-o/master Fix title on zmq_disconnect manpage. commit 75df0194bf50e14eec756dabbc59f1a0cfbdf027 Author: Steven McCoy Date: Wed May 30 12:53:53 2012 -0400 Fix title on zmq_disconnect manpage. doc/zmq_disconnect.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1adb7b10175ddefcdc8cd60eb46cd2bd441b69b9 Merge: f7bd543 7fe45af Author: Pieter Hintjens Date: Tue May 29 13:29:58 2012 -0700 Merge pull request #352 from hurtonm/issue_370 Fix issue #370 commit 7fe45af30f5978e490575b0c088cf7b444c98e9f Author: Martin Hurton Date: Tue May 29 21:59:22 2012 +0200 Fix issue #370 The patch extends the internal session's API with the reset method. This method is used to reset a session's state so that it can handle a new connection. src/req.cpp | 5 +++++ src/req.hpp | 1 + src/session_base.cpp | 11 ++++++++--- src/session_base.hpp | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) commit f7bd543c36ee0850e9843eb24e21f8a9c5cbfbbd Merge: 8152502 24b79c7 Author: Pieter Hintjens Date: Mon May 28 14:34:57 2012 -0700 Merge pull request #351 from hurtonm/code_cleanup Code cleanup commit 24b79c7e0bcd9325c34f183666d08738f6ebdbb8 Author: Martin Hurton Date: Mon May 28 23:13:09 2012 +0200 Prefer errno_assert/alloc_assert to zmq_assert src/ctx.cpp | 2 +- src/dealer.cpp | 2 +- src/dist.cpp | 2 +- src/lb.cpp | 2 +- src/mtrie.cpp | 16 ++++++++-------- src/pgm_sender.cpp | 2 +- src/session_base.cpp | 7 ++++--- src/signaler.cpp | 4 ++-- src/socket_base.cpp | 10 +++++----- src/tcp_address.cpp | 12 ++++++------ src/trie.cpp | 10 +++++----- src/xsub.cpp | 8 ++++---- 12 files changed, 39 insertions(+), 38 deletions(-) commit 013967681dda83af378ed47343dc68561ec687e3 Author: Martin Hurton Date: Mon May 28 22:01:37 2012 +0200 fq: code cleanup src/fq.cpp | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 8152502f6924f271c63df6dae100c14c5445e468 Merge: e30e48c 130dfc5 Author: Pieter Hintjens Date: Mon May 28 08:39:20 2012 -0700 Merge pull request #350 from hurtonm/issue_369 Fix issue #369 commit 130dfc5b5f0ecf23e80be16fcd307dad7e649fd7 Author: Martin Hurton Date: Mon May 28 17:02:08 2012 +0200 Fix issue #369 The bug was that after reconnect, the session did not handle identity messages properly. src/session_base.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit e30e48c23effe286135e727e0795b91b268986d0 Merge: 3a76d24 2ab12ef Author: Ian Barber Date: Mon May 28 02:16:29 2012 -0700 Merge pull request #349 from hintjens/master Fixed zmq_poll.txt manpage for issue #361 commit 2ab12efe11411d0f05b08fa8eb54ff9c5b16a9a0 Author: Pieter Hintjens Date: Mon May 28 11:01:18 2012 +0200 Fixing issue #361 doc/zmq_poll.txt | 3 +++ 1 file changed, 3 insertions(+) commit 3a76d246a8808bf8357a91319f9b17e731e41407 Merge: 5db30fe d0b9005 Author: Pieter Hintjens Date: Mon May 28 00:47:26 2012 -0700 Merge pull request #348 from hurtonm/code_cleanup Code cleanup commit d0b9005ef002fce2de2fbbfa5d29fe2bef871cb5 Author: Martin Hurton Date: Sun May 27 23:26:14 2012 +0200 Don't assume SOCKET_ERROR is -1 on Windows src/stream_engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac53f1a7284b85849e0a31fdec80e0f51293f3d0 Author: Martin Hurton Date: Sun May 27 22:51:56 2012 +0200 Remove unnecessary casts src/pgm_socket.cpp | 2 +- src/stream_engine.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit e0534643fa65890145aabfe6423695b63b1d9bb4 Author: Martin Hurton Date: Sun May 27 23:35:32 2012 +0200 Simplify error handling in tcp_connecter src/tcp_connecter.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 13ef1e4f268452a076205d9c974a33e111401ef2 Author: Martin Hurton Date: Sun May 27 16:10:19 2012 +0200 Make wsa_error_to_errno pure function src/err.cpp | 38 ++++++++++++++------------------------ src/err.hpp | 2 +- src/tcp_connecter.cpp | 4 ++-- src/tcp_listener.cpp | 8 ++++---- src/zmq.cpp | 12 +++++------- 5 files changed, 26 insertions(+), 38 deletions(-) commit a8f9a0d8918c6ede1617beda9c65ff70b5a1977a Author: Martin Hurton Date: Sun May 27 15:31:59 2012 +0200 Use zmq_assert rather then assert src/devpoll.cpp | 4 ++-- src/poll.cpp | 4 ++-- src/router.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit 52ed4cdccf16567674e9c949da74b484b596f8a8 Author: Martin Hurton Date: Sun May 27 14:51:12 2012 +0200 Remove dead code src/session_base.cpp | 8 +------- src/stream_engine.cpp | 28 ++++------------------------ 2 files changed, 5 insertions(+), 31 deletions(-) commit 7cfd03ba72dd91d2e8f1b246bf68dbf43ec135f4 Author: Martin Hurton Date: Sun May 27 15:15:09 2012 +0200 Remove unplug from i_engine interface src/i_engine.hpp | 3 --- src/pgm_receiver.hpp | 4 +++- src/pgm_sender.hpp | 4 +++- src/stream_engine.hpp | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) commit 5db30fe991137e80926a549f99e45e2854d63e91 Merge: 74af2f9 b85ff17 Author: Pieter Hintjens Date: Thu May 24 06:45:27 2012 -0700 Merge pull request #347 from methodmissing/monitor-doc-fails Fix too long underline in zmq_ctx_set_monitor() docs commit b85ff17822b3a2b4737c964f38d82b5dde568a11 Author: Lourens NaudeÌ Date: Thu May 24 09:39:48 2012 +0100 Fix too long underline in monitor docs doc/zmq_ctx_set_monitor.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74af2f9402f68b2c1d96dfaeefa69f490ae79db0 Merge: 22b4388 400f6f3 Author: Pieter Hintjens Date: Wed May 23 07:21:41 2012 -0700 Merge pull request #346 from methodmissing/monitor-regressions Rename monitor documentation source file to match zmq_ctx_set_monitor() API commit 400f6f3863c32ebfa783acade8e36d45c9d936e7 Author: Lourens Naudé Date: Wed May 23 01:35:22 2012 +0100 Rename monitor documentation source file to match zmq_ctx_set_monitor() API doc/zmq_ctx_set_monitor.txt | 221 +++++++++++++++++++++++++++++++++++++++++++ doc/zmq_monitor.txt | 221 ------------------------------------------- 2 files changed, 221 insertions(+), 221 deletions(-) commit 22b4388e29fcb6cf576ef4d1e92e939560d30f99 Merge: 20152a6 1e92ee0 Author: Pieter Hintjens Date: Tue May 22 16:18:54 2012 -0700 Merge pull request #345 from methodmissing/monitor-regressions Moves the monitoring infrastructure to a global zmq_ctx_set_monitor () API to avoid strict aliasing issues with function pointers and socket options. commit 1e92ee0a0e9f4996259c662d4a6e8f71f6f45843 Author: Lourens Naudé Date: Tue May 22 23:45:15 2012 +0100 Oust last remaning ZMQ_MONITOR reference from NEWS as well NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit adf7a7ade12598d14d9e7948922b68f4bab60657 Merge: 991b7fc 20152a6 Author: Lourens Naudé Date: Tue May 22 23:35:30 2012 +0100 Merge branch 'master' into monitor-regressions commit 991b7fcc04de7d694dc54430c43f6bb01494086a Author: Lourens Naudé Date: Tue May 22 20:15:18 2012 +0100 Rename zmq_monitor to zmq_ctx_set_monitor for compat with existing context specific APIs doc/Makefile.am | 2 +- doc/zmq.txt | 2 +- doc/zmq_monitor.txt | 18 +++++++++--------- include/zmq.h | 2 +- src/zmq.cpp | 2 +- tests/test_monitor.cpp | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) commit 04f0e7f26e18a2802d8683fc12ef8a67197fda6c Author: Lourens Naudé Date: Tue May 22 20:08:02 2012 +0100 Documentation for zmq_monitor doc/Makefile.am | 2 +- doc/zmq.txt | 3 + doc/zmq_getsockopt.txt | 11 --- doc/zmq_monitor.txt | 221 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_setsockopt.txt | 40 --------- 5 files changed, 225 insertions(+), 52 deletions(-) commit 20152a6e3e1e46e3c930afdb2da122939f6f97e9 Merge: 7cb19fb 604456a Author: Ian Barber Date: Tue May 22 07:31:28 2012 -0700 Merge pull request #344 from hintjens/master Fixed bogus reference to zmq_ctx_put commit 604456a8b0a1661859779d467c6cca40192c6f28 Author: Pieter Hintjens Date: Mon May 21 15:59:55 2012 -0500 Man page for zmq_ctx_new had error, fixed doc/zmq_ctx_new.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f27c02d01e323c2d5d2d3d889f5e8d5a7cbff73d Author: Lourens Naudé Date: Mon May 21 21:22:16 2012 +0100 Change context monitor_event prototype to accept a va_list instead src/ctx.cpp | 45 +++++++++++++++++++++------------------------ src/ctx.hpp | 2 +- 2 files changed, 22 insertions(+), 25 deletions(-) commit 4767159f39001b7f5a2cc6b9d63a548a57c286d5 Author: Lourens Naudé Date: Mon May 21 20:47:11 2012 +0100 Initial stab at a context level monitor callback and registration API include/zmq.h | 24 +++++++-------- src/ctx.cpp | 65 ++++++++++++++++++++++++++++++++++++++++- src/ctx.hpp | 8 +++++ src/options.cpp | 24 --------------- src/options.hpp | 3 -- src/socket_base.cpp | 56 +++-------------------------------- src/zmq.cpp | 8 +++++ tests/test_monitor.cpp | 76 +++++++++++++++--------------------------------- 8 files changed, 118 insertions(+), 146 deletions(-) commit 7cb19fbf1c736f72ac2ed35bab9645f3700be634 Merge: 65b6351 0e053e3 Author: Pieter Hintjens Date: Mon May 21 06:00:02 2012 -0700 Merge pull request #343 from jimenezrick/master Doc improvement: document interface omission in zmq_pgm.txt commit 65b6351e4a11f4424fbd80ae0dc25f80a8c9c7bc Merge: 5ef6331 d25dce9 Author: Pieter Hintjens Date: Mon May 21 05:59:32 2012 -0700 Merge pull request #342 from ipechorin/master Solaris/SunCC build fix: could not find a match for std::multimap<...>::insert(std::pair<...,...>) commit 0e053e34789521b45c1fd5b982654612e8bfc2c6 Author: Ricardo Catalinas Jiménez Date: Mon May 21 14:06:34 2012 +0200 Doc improvement: document interface omission in zmq_pgm.txt The PGM transport supports the omission of the network interface to select the default one like: announce.connect("epgm://eth0;239.255.128.46:64646"); // Use eth0 announce.connect("epgm://239.255.128.46:64646"); // Use the default Also, mention C++ in the additional community bindings of 0MQ in zmq.txt. doc/zmq.txt | 6 +++--- doc/zmq_pgm.txt | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) commit e13b3723b8246b0526298698f9070d077b3322e3 Author: Lourens Naudé Date: Sun May 20 18:27:59 2012 +0100 Rename type zmq_monitor_fn -> zmq_monitor for a more natural callback definition API (zmq_monitor type, monitor.function callback) doc/zmq_getsockopt.txt | 2 +- doc/zmq_setsockopt.txt | 4 ++-- include/zmq.h | 2 +- src/options.cpp | 6 +++--- src/options.hpp | 4 ++-- tests/test_monitor.cpp | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) commit 06cce1547996c0aa42038d0eccfbf63efe18f0bb Author: Lourens Naudé Date: Sun May 20 18:16:23 2012 +0100 Change zmq_monitor_fn type to cast between pointer-to-object and pointer-to-function in a more standards compliant way doc/zmq_setsockopt.txt | 2 +- include/zmq.h | 5 ++++- src/socket_base.cpp | 2 +- tests/test_monitor.cpp | 16 ++++++++-------- 4 files changed, 14 insertions(+), 11 deletions(-) commit d25dce9df916b6fa646776015162415cc9efb835 Author: Ivan Pechorin Date: Sun May 20 13:34:08 2012 +0200 Solaris/SunCC build fix: could not find a match for std::multimap<...>::insert(std::pair<...,...>) src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ef63318f876fe982f24b4b209e7f961ecd9b2bf Merge: 89d5054 c995de6 Author: Pieter Hintjens Date: Sun May 13 06:39:16 2012 -0700 Merge pull request #341 from kennytm/master Allow the ZMQ_MONITOR code compilable on gcc 4.7 on Linux. commit c995de65847d8a97dc75294fb1b9b6a057fd3c1d Author: KennyTM~ Date: Sun May 13 20:49:05 2012 +0800 Allow the ZMQ_MONITOR code compilable on gcc 4.7 on Linux. The current ZMQ_MONITOR code does not compile in gcc 4.7, as -pedantic and -Werror are enabled, and ISO C++ doesn't allow casting between normal pointers (void*) and function pointers, as pedantically their size could be different. This caused the library not compilable. This commit workaround the problem by introducing one more indirection, i.e. instead of calling (void *)listener which is an error, we have to use *(void **)&listener which is an undefined behavior :) but works on most platforms Also, `optval_ = monitor` will not set the parameter in getsockopt(), and the extra casting caused the LHS to be an rvalue which again makes the code not compilable. The proper way is to pass a pointer of function pointer and assign with indirection, i.e. `*optval_ = monitor`. Also, fixed an asciidoc error in zmq_getsockopt.txt because the `~~~~` is too long. doc/zmq_getsockopt.txt | 2 +- src/options.cpp | 6 +++--- src/session_base.cpp | 2 ++ tests/test_monitor.cpp | 15 +++++++++------ 4 files changed, 15 insertions(+), 10 deletions(-) commit 89d5054e596e61fa2cd9ae4d62be423b7d2aecf0 Merge: 70b067e d046175 Author: Pieter Hintjens Date: Fri May 11 15:18:50 2012 -0700 Merge pull request #340 from methodmissing/events Expose a ZMQ_MONITOR socket option to register a callback for notification of state changes in socket state ( stream engine, tcp and ipc transport only ) commit d0461752ff211f4277722505c9cda6703e845943 Merge: c38aecd 70b067e Author: Lourens Naudé Date: Fri May 11 22:08:17 2012 +0100 Merge branch 'master' into events commit 70b067ecc6b33611aca4f68f6f19557a8e339f04 Merge: c7af07c e65d228 Author: Pieter Hintjens Date: Fri May 11 06:23:58 2012 -0700 Merge pull request #339 from ianbarber/master Add disconnect and unbind documentation commit e65d228f4f829d23134a97c57121a066d92a1538 Author: Ian Barber Date: Fri May 11 14:17:45 2012 +0100 gitignore endpoint test and add docs for unbind and disconnect .gitignore | 1 + doc/zmq_disconnect.txt | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_unbind.txt | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+) commit c7af07cc773c922fc8fdae0dab740d7330edbca3 Merge: d087548 5fe6ddf Author: Ian Barber Date: Tue May 8 06:42:12 2012 -0700 Merge pull request #336 from mauri-melato/master Fix #366 - On Windows, preventing sockets to be inherited by child processes. commit d087548286439f02ee70b1b3793dd71c01529539 Merge: 80e8baa 6419439 Author: Ian Barber Date: Tue May 8 06:41:22 2012 -0700 Merge pull request #338 from hurtonm/code_cleanup Simplify encoder's loop commit 641943944d1c6c148815f42f1e9a196d6cf5d925 Author: Martin Hurton Date: Tue May 8 13:30:13 2012 +0200 Simplify encoder's loop src/encoder.hpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 80e8baaff473892e5b5b4d4c59edcd146712a7d2 Merge: 5dc44a6 3d93c1a Author: Ian Barber Date: Tue May 8 02:25:16 2012 -0700 Merge pull request #337 from hurtonm/issue_268 Fix issue #268 commit 3d93c1af5baded5fd1597261345438c393f3bcbd Author: Martin Hurton Date: Tue May 8 09:28:17 2012 +0200 Fix issue #268 This patch fixes a bug in the message encoder which was responsible for computing incorrect message offset. The bug affected PGM receiver making it unable to decode inital messages. src/encoder.cpp | 8 +++----- src/encoder.hpp | 14 ++++++-------- 2 files changed, 9 insertions(+), 13 deletions(-) commit 5fe6ddfda3ab207c579c7dc6a9b2be48bf3cdb92 Author: unknown Date: Mon May 7 15:46:55 2012 +0200 On Windows, preventing sockets to be inherited by child processes. src/ip.cpp | 6 ++++++ src/signaler.cpp | 10 +++++++++- src/tcp_listener.cpp | 6 ++++++ 3 files changed, 21 insertions(+), 1 deletion(-) commit 5dc44a63d656be113dba904a384038c7f7b99700 Merge: 47dbd4a 37e4a38 Author: Pieter Hintjens Date: Sun May 6 03:07:35 2012 -0700 Merge pull request #335 from jdc8/master Fix for issue 355 and fix for compile error with Visual C++ 2008 commit 37e4a38eb547942da7b0d4e901d02632918a0cf0 Author: Jos Decoster Date: Sat May 5 23:56:49 2012 +0200 Fix compile error with Visual C++ 2008 File decoder.cpp does not compile with Visual C++ 2008: 1>c:\tmp\libzmq\src\decoder.cpp(117) : warning C4003: not enough actual parameters for macro 'max' 1>c:\tmp\libzmq\src\decoder.cpp(117) : error C2589: '(' : illegal token on right side of '::' 1>c:\tmp\libzmq\src\decoder.cpp(117) : error C2059: syntax error : '::' 1>c:\tmp\libzmq\src\decoder.cpp(117) : error C2143: syntax error : missing ';' before '{' This error is caused by the precense of a macro 'max' when including 'windows.h'. To solve this problem, the preprocessor macro /DNOMINMAX must be specified. builds/msvc/libzmq/libzmq.vcproj | 1 + 1 file changed, 1 insertion(+) commit 68c1be8bf6539a317c48810fb7af7b2e59cd7dfa Author: Jos Decoster Date: Sat May 5 23:25:46 2012 +0200 Fix for issue 355. Added missing source files dealer.cpp, device,cpp and router.cpp. Removed source files no longer present: xrep.cpp and xreq.cpp builds/msvc/libzmq/libzmq.vcproj | 20 ++++++++++++-------- builds/msvc/libzmq/libzmq.vcxproj | 5 +++-- 2 files changed, 15 insertions(+), 10 deletions(-) commit c38aecdc50249df84ee585ea4cec1ee1c0f0b2df Merge: 5c6f72c 47dbd4a Author: Lourens Naudé Date: Fri May 4 02:35:22 2012 +0100 Merge branch 'master' into events commit 5c6f72c17c1139f6c9699f998c9ca6eedfc535af Author: Lourens Naudé Date: Fri May 4 02:32:46 2012 +0100 ZMQ_MONITOR socket option registers a callback / event sink for changes in socket state .gitignore | 2 + AUTHORS | 1 + NEWS | 2 + doc/zmq_getsockopt.txt | 10 ++++ doc/zmq_setsockopt.txt | 41 ++++++++++++- include/zmq.h | 68 +++++++++++++++++++++- src/address.cpp | 2 +- src/address.hpp | 2 +- src/ipc_connecter.cpp | 14 ++++- src/ipc_connecter.hpp | 3 + src/ipc_listener.cpp | 20 +++++-- src/ipc_listener.hpp | 3 + src/options.cpp | 23 ++++++++ src/options.hpp | 4 ++ src/session_base.cpp | 15 +++++ src/session_base.hpp | 3 + src/socket_base.cpp | 58 ++++++++++++++++++ src/socket_base.hpp | 3 + src/stream_engine.cpp | 4 ++ src/stream_engine.hpp | 4 ++ src/tcp_connecter.cpp | 14 ++++- src/tcp_connecter.hpp | 4 ++ src/tcp_listener.cpp | 14 ++++- src/tcp_listener.hpp | 4 ++ tests/Makefile.am | 4 +- tests/test_monitor.cpp | 152 ++++++++++++++++++++++++++++++++++++++++++++++++ 26 files changed, 461 insertions(+), 13 deletions(-) commit 47dbd4aa968f756f6e8afaa17aca6553e3f46d15 Merge: f497aae 1075005 Author: Pieter Hintjens Date: Thu May 3 06:08:02 2012 -0700 Merge pull request #334 from ianbarber/master Async connect error handling commit 1075005b500b86aa5ca828198bfedcd0067946fd Author: Ian Barber Date: Thu May 3 13:24:12 2012 +0100 Patch from Mato that fixes a subtle connect bug: EAGAIN was being used as a translation value for EINPROGRESS, thus shadowing a real EAGAIN return value from the OS. This caused later assertions of "Invalid argument" in stream_engine.cpp when it attempted to use a socket which was not connected. I also add EINTR to mean EINPROGRESS, as per the POSIX and FreeBSD documentation which specifies that a connect() call interrupted due to a signal will complete asynchronously. Signed-off-by: Martin Lucina src/ipc_connecter.cpp | 7 +++++++ src/tcp_connecter.cpp | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit f497aae8df340c1543dc822b6ee284dc7e4bea7d Merge: 36bfaaa 5227f67 Author: Pieter Hintjens Date: Sun Apr 29 22:33:31 2012 -0700 Merge pull request #333 from hurtonm/fix_decoder_to_properly_handle_large_messages Fix decoder to properly handle large messages commit 36bfaaabe68af2db492280f62fdbbe056418be9f Merge: 9098f4d 776563f Author: Pieter Hintjens Date: Sun Apr 29 22:33:16 2012 -0700 Merge pull request #332 from hurtonm/fix_issue_264 Fix issue #264 commit 9098f4d655f2a9f6a1bced2888090c1dd66acdb6 Merge: dd3eb08 394a248 Author: Pieter Hintjens Date: Sun Apr 29 22:32:57 2012 -0700 Merge pull request #331 from hurtonm/code_cleanup socket_base: process_unplug () is not used, remove it commit dd3eb08d3325af0b91e09317c3dbd280536431ea Merge: 16ec286 d847094 Author: Pieter Hintjens Date: Sun Apr 29 22:32:39 2012 -0700 Merge pull request #330 from hurtonm/pair_socket_rejects_additional_connections Do not crash when multiple peers connect to PAIR socket commit d84709497edc9eba051374874e9318b2e1bacb95 Author: Martin Hurton Date: Mon Apr 30 00:48:07 2012 +0200 Do not crash when multiple peers connect to PAIR socket When more then one peer connected to a ZMQ_PAIR socket, an application aborted due to assertion failure. This patch changes the ZMQ_PAIR socket behaviour so that it rejects any further connection requests. src/pair.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 5227f676f4259050f067386c58e6bcf7f148c333 Author: Martin Hurton Date: Sun Apr 29 15:27:41 2012 +0200 Fix decoder to properly handle large messages The decoder did not properly decode large messages on systems where sizeof (size_t) < sizeof (uint64_t). src/decoder.cpp | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit 776563fcffe975774c713ade357ea2b83d22da7c Author: Martin Hurton Date: Sun Apr 29 17:13:18 2012 +0200 Fix issue #264 Before this patch, the stream engine terminated itself whenever it had detected an IO error. If this happened when sending a message, the engine lost all in-flight messages, messages waiting to be decoded, and the last decoded message that had not been accepted, if there was one. The new behaviour is to terminate the engine only after the input error has been detected and the last decoded src/decoder.cpp | 5 +++++ src/decoder.hpp | 16 ++++++++++------ src/stream_engine.cpp | 34 +++++++++++++++++++++++++++++----- src/stream_engine.hpp | 1 + 4 files changed, 45 insertions(+), 11 deletions(-) commit 394a24857905c2489b555803170a0d640f38b4a8 Author: Martin Hurton Date: Sat Apr 28 16:28:12 2012 +0200 socket_base: process_unplug () is not used, remove it src/socket_base.cpp | 4 ---- src/socket_base.hpp | 1 - 2 files changed, 5 deletions(-) commit 16ec2868c5f786b2267a003e2d3f1e4279c08d91 Merge: 7c5d79d b7c9fc0 Author: Pieter Hintjens Date: Fri Apr 27 11:06:14 2012 -0700 Merge pull request #329 from ianbarber/master Tweak FD sockopt text commit b7c9fc07505119fad234a21cdb925449eca16fc9 Author: Ian Barber Date: Fri Apr 27 11:22:17 2012 +0100 Slight tweak to text for readability doc/zmq_getsockopt.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 7c5d79ddd38b5110982e02aa2c2d3dc61f111419 Merge: 29000d3 138def0 Author: Ian Barber Date: Fri Apr 27 03:04:42 2012 -0700 Merge pull request #328 from tailhook/patch-1 Added refinement for ZMQ_FD option commit 138def0b992e250833020ebaca0ebb4d9a73dd71 Author: Paul Colomiets Date: Fri Apr 27 12:55:17 2012 +0300 Added refinement for ZMQ_FD option doc/zmq_getsockopt.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 29000d3b021147384bff0e2a9d1f64b7b71cfa5d Merge: 41c82bd 1788fd3 Author: Ian Barber Date: Thu Apr 26 04:59:11 2012 -0700 Merge pull request #326 from hurtonm/pipe_code_cleanup pipe: code cleanup commit 41c82bdda140e047533cf5b57522b5bc131b55f7 Merge: 648e319 2cbf799 Author: Ian Barber Date: Thu Apr 26 04:57:45 2012 -0700 Merge pull request #327 from hurtonm/fq_drop_unused_parameter fq: remove unused parameter commit 2cbf7993dcc52d65c9394b38e40ae5e6e4897b28 Author: Martin Hurton Date: Thu Apr 26 13:16:51 2012 +0200 fq: remove unused parameter The recv function accepted flags parameter but this was unused. src/dealer.cpp | 2 +- src/fq.cpp | 6 +++--- src/fq.hpp | 4 ++-- src/pull.cpp | 2 +- src/router.cpp | 4 ++-- src/xsub.cpp | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) commit 1788fd396b609daf404a3b92bcafe98892603c71 Author: Martin Hurton Date: Wed Apr 25 11:07:19 2012 +0200 pipe: code cleanup src/pipe.cpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 648e31994d4239136d2325c16500afee01aa7c33 Merge: e8b701c a2c3772 Author: Ian Barber Date: Wed Apr 25 01:52:06 2012 -0700 Merge pull request #325 from hurtonm/update_comment_in_device_plus_whitespace_fixes Mention limitation of the device implementation commit a2c3772531960df70b672f1124b090224c9784ea Author: Martin Hurton Date: Wed Apr 25 10:43:00 2012 +0200 Mention limitation of the device implementation + fix whitespace errors + drop some unnecessary parens src/device.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit e8b701cb9285d32c21b22c3c3c9b0b6681ad965e Merge: 9d02b3d 873abdd Author: Pieter Hintjens Date: Wed Apr 25 00:27:51 2012 -0700 Merge pull request #324 from hurtonm/rename_xrep_xreq_in_tests Rename XREP/XREQ to ROUTER/DEALER in tests commit 9d02b3dafbb11bbfc1d14b4c663a5bce9770f0d9 Merge: 016df8e df5344b Author: Pieter Hintjens Date: Wed Apr 25 00:27:19 2012 -0700 Merge pull request #323 from hurtonm/xsub_fix_message_initialisation xsub: fix memory leak commit 873abdd24c9d6ce42be3028555f8102a47a8b04e Author: Martin Hurton Date: Wed Apr 25 01:03:38 2012 +0200 Rename XREP/XREQ to ROUTER/DEALER in tests tests/test_invalid_rep.cpp | 26 +++++++++++++------------- tests/test_last_endpoint.cpp | 2 +- tests/test_msg_flags.cpp | 4 ++-- tests/test_reqrep_device.cpp | 28 ++++++++++++++-------------- 4 files changed, 30 insertions(+), 30 deletions(-) commit df5344bba0a8fc21b7dd213a815964b4580fd117 Author: Martin Hurton Date: Tue Apr 24 14:01:26 2012 +0200 xsub: fix memory leak The implementation of the send call for XSUB socket failed to release and initialise empty message when duplicate subscription was detected. src/xsub.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 016df8e89c04338898790357a115aa55d250623d Merge: c120f02 135fdab Author: Ian Barber Date: Tue Apr 24 11:18:50 2012 -0700 Merge pull request #322 from tranthamp/master Atomic operations for armv7a commit 135fdab0eced035e6f2aaaa306dae438165b4303 Author: Patrick Trantham Date: Fri Apr 13 10:48:15 2012 -0500 Implement atomic operations for armv7a This commit implements atomic operations for the armv7a architecture using gcc inline assembly. This offers higher performance compared to pthread mutexes. Tested on an am3517 evm, clocked at 600MHz: ./inproc_thr 200 1000000 ------------------------ 53-60K messages / sec, pthread mutexes 73-90K messages / sec, assembly atomic ops ./inproc_lat 200 1000000 ------------------------ average latency: 42.234 [us], pthread mutexes average latency: 35.496 [us], assembly atomic ops src/atomic_counter.hpp | 32 ++++++++++++++++++++++++++++++++ src/atomic_ptr.hpp | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) commit c120f02dc93dd7d3b1ba4ea6910d8694c3934d91 Merge: b9fb919 f858321 Author: Pieter Hintjens Date: Sat Apr 21 16:06:06 2012 -0700 Merge pull request #321 from shripchenko/master add process_commands() to the beginning of zmq_connect() and zmq_bind() commit f858321c1c7d5a58367d52f39ff1bfc74242dab2 Author: Sergey KHripchenko Date: Sun Apr 22 01:39:48 2012 +0400 add process_commands() to the beginning of zmq_connect() and zmq_bind() I believe there was a conception that zmq_connect() and zmq_bind() will be called only at the socket creation time and therefore don't need it. Now it is not true anymore. src/socket_base.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit b9fb9198779a6db23aadb1cd803c76edd8dcde5a Merge: 952127d 057fab0 Author: Pieter Hintjens Date: Sat Apr 21 09:52:46 2012 -0700 Merge pull request #320 from shripchenko/master ZMQ BUG FOUND + fixes for zmq_unbind() / zmq_disconnect() usage corner cases commit 057fab09a80728db0445313e0ed0123be128e046 Author: Sergey KHripchenko Date: Sat Apr 21 18:56:10 2012 +0400 fixes for zmq_unbind() / zmq_disconnect() usage corner cases 1. when we call zmq_bind()/zmq_connect() to create endpoint we send ourselfs(through launch_child()) command to process_own(endpoint) (and add it to own_t::owned) in the application thread we could call zmq_unbind() / zmq_disconnect() _BEFORE_ we run process_own() in ZMQ thread and in this situation we will be unable to find it in own_t::owned. in other words own_t::owned.find(endpoint) will not be deleted but it will be deleted from socket_base_t::endpoints. 2. when you zmq_unbind() the lisnening TCP/IPC socket was terminated only in destructor... so the whole ZMQ_LINGER time listening TCP/IPC socket was able to accept() new connections but unable to handle them. this all geting even worse since unfortunately zmq has a bug and '*_listener_t' object not terminated untill the socket's zmq_close(). AT LEAST FOR PUSH SOCKETS. Everything is ok for SUB sockets. Easy to reproduce without my fix: zmq_socket(PUSH) zmq_bind(tcp); // connect to it from PULL socket zmq_unbind(tcp); sleep(forever) // netstat -anp | grep 'tcp listening socket' With my fix you could see that after zmq_unbind(tcp) all previously connected tcp sessions will not be finished untill the zmq_close(socket) regardless of ZMQ_LINGER value. (*_listener_t terminates all owned session_base_t(connect=false) and they call pipe_t::terminate() which in turn should call session_base_t::terminated() but this never happens) src/ipc_listener.cpp | 2 +- src/socket_base.cpp | 6 ++++++ src/tcp_listener.cpp | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) commit 4f668ad60a7fa6c6000a5f7d94731a42ea295513 Author: Sergey KHripchenko Date: Sat Apr 21 18:39:19 2012 +0400 added zmq_unbind() / zmq_disconnect() test script. it works but rises very serious questions. Please add license header by your choice. This file for 99% resemble crossroads-io/tests/shutdown.cpp tests/Makefile.am | 4 +- tests/test_term_endpoint.cpp | 97 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) commit 74ae19ac1f31d1264e425f8fd9caa4d277d65c49 Author: Sergey KHripchenko Date: Sat Apr 21 18:36:20 2012 +0400 spaces deleted src/pipe.cpp | 2 +- src/session_base.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 952127dfd6f2948b102d240d69c23dab13d8bb84 Merge: 653e585 06b2eae Author: Pieter Hintjens Date: Sat Apr 21 06:03:00 2012 -0700 Merge pull request #319 from shripchenko/master fix for: [zeromq-dev] head builds again but two failing tests commit 06b2eae87da83e7127c78533a3713f8a3951ebfa Author: Sergey KHripchenko Date: Sat Apr 21 08:12:59 2012 +0400 small wording change src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2faa4c487fbff3b92b3d22b4eb219e966be990ab Author: Sergey KHripchenko Date: Sat Apr 21 07:55:54 2012 +0400 stupid bug. I feel ashamed ^) src/address.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 653e5854edffefd26ff1fadf9389d8bc74e7d9c2 Merge: d56b752 2eb6b32 Author: Pieter Hintjens Date: Fri Apr 20 09:11:56 2012 -0700 Merge pull request #318 from shripchenko/master 2nd try wuth sock->unbind() and sock->disconnect(). now with const char*'s argument commit 2eb6b32ef75ab44fdb8e734b07d1986a5baebad1 Author: Sergey KHripchenko Date: Fri Apr 20 19:16:26 2012 +0400 fixes for make[2]: Entering directory `/home/laotse/src/abs/zeromq-git/src/libzmq-build/src' CXX libzmq_la-address.lo address.cpp: In destructor 'zmq::address_t::~address_t()': address.cpp:41:29: error: deleting object of polymorphic class type 'zmq::tcp_address_t' which has non-virtual destructor might cause undefined behaviour [-Werror=delete-non-virtual-dtor] cc1plus: all warnings being treated as errors src/tcp_address.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 489481857a51b995cf837c0adf0f22425cff03a5 Author: Sergey KHripchenko Date: Fri Apr 20 18:59:08 2012 +0400 2nd try wuth sock->unbind() and sock->disconnect(). now with blackjack and const char*'s include/zmq.h | 5 ++-- src/options.cpp | 9 ------- src/options.hpp | 4 +--- src/socket_base.cpp | 65 +++++++++++++++++++++++++++++++-------------------- src/socket_base.hpp | 9 ++++++- src/zmq.cpp | 8 +++---- 6 files changed, 55 insertions(+), 45 deletions(-) commit d56b75219fa60284299ca12f0b1d6e4605ca912a Merge: 8837852 318d55f Author: Ian Barber Date: Thu Apr 19 01:35:08 2012 -0700 Merge pull request #316 from pieterh/master Fixed issue #358 commit 8837852546bdd739871dd961f0b577f8db1dc2ba Merge: 36e9c4a 7b8e728 Author: Pieter Hintjens Date: Wed Apr 18 13:58:45 2012 -0700 Merge pull request #317 from shripchenko/master implement zmq_unbind(),zmq_disconnect(), zmq->sock->getsockopt(ZMQ_LAST_ENDPOINT_ID) commit 7b8e728e43e75c2b64c082077f5ed440a61caff4 Author: Sergey KHripchenko Date: Wed Apr 18 23:42:11 2012 +0400 implement zmq_unbind(),zmq_disconnect(), zmq->sock->getsockopt(ZMQ_LAST_ENDPOINT_ID) include/zmq.h | 3 ++ src/address.cpp | 28 +++++++++++++++++- src/address.hpp | 2 ++ src/ipc_address.cpp | 26 ++++++++++++++++- src/ipc_address.hpp | 6 ++++ src/ipc_listener.cpp | 15 +++------- src/ipc_listener.hpp | 2 +- src/options.cpp | 10 +++++++ src/options.hpp | 2 ++ src/own.cpp | 5 ++++ src/own.hpp | 3 ++ src/socket_base.cpp | 37 +++++++++++++++++++++--- src/socket_base.hpp | 1 + src/tcp_address.cpp | 77 ++++++++++++++++++++++++++++++++++++++++++++++++-- src/tcp_address.hpp | 7 +++++ src/tcp_listener.cpp | 34 +++++----------------- src/zmq.cpp | 20 +++++++++++++ 17 files changed, 230 insertions(+), 48 deletions(-) commit 318d55fd10c351454169aa00db352b785e53d294 Author: Pieter Hintjens Date: Wed Apr 18 13:14:07 2012 -0500 Fixed issue LIBZMQ-358 src/device.cpp | 74 ++++++++++++++++++-------------------------------------- 1 file changed, 24 insertions(+), 50 deletions(-) commit 36e9c4ac84c414db0977ab9e6361a44732fab642 Merge: 334f99f b89a53e Author: Ian Barber Date: Wed Apr 18 04:10:29 2012 -0700 Merge pull request #315 from shripchenko/master fix bug in zmq::tcp_address_t::resolve_interface() where resolved interface ip overwrited by 0.0.0.0 commit b89a53ee7a3902781d123ed65bd5010b52ec5bfe Author: Sergey KHripchenko Date: Wed Apr 18 14:06:39 2012 +0400 fix bug in zmq::tcp_address_t::resolve_interface() where all resolved interface ip's overwrited by 0.0.0.0 src/tcp_address.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 334f99fb01c84e51682e2c3f139d84f589d65cf0 Merge: f663ad9 5b30089 Author: Pieter Hintjens Date: Tue Apr 17 03:49:43 2012 -0700 Merge pull request #314 from ianbarber/master Small patch to instantiate clock_t once commit 5b3008957dcd5a68c70aef369ce89ae994eedbb6 Author: Ian Barber Date: Tue Apr 17 10:10:22 2012 +0100 port of patch by Martin Sustrik to libxs: This patch instantiate a clock_t instance for each XS socket. Thus, it is shared between subsequent calls to xs_recv (and xs_send). That in turn significantly limits the number of invocations of getimeofday (or similar) when timeouts are used and recv/send is called in a tight loop. src/socket_base.cpp | 3 --- src/socket_base.hpp | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) commit f663ad935beeedc05be44043afda0bee29afe30f Merge: 084c182 206d80b Author: Pieter Hintjens Date: Mon Apr 16 09:09:00 2012 -0700 Merge pull request #313 from ianbarber/master Update socket docs commit 206d80b5ffcb36993be02547289769978b05fb41 Author: Ian Barber Date: Mon Apr 16 14:08:15 2012 +0100 Make docs reflect socket mappings better doc/zmq_socket.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 084c1824c44471136a8badaf5fb80d929828f4bb Merge: 525be51 c77dc98 Author: Ian Barber Date: Fri Apr 13 03:44:07 2012 -0700 Merge pull request #312 from shripchenko/master some spaces cleanups + delete unused anymore zmq::max_sockets + some minor code chages commit c77dc98b5c83dcaa5ab4ecfff8f786a1cf7b2e5c Author: Sergey KHripchenko Date: Fri Apr 13 13:26:57 2012 +0400 some spaces cleanups + delete unused anymore zmq::max_sockets + some minor code chages src/config.hpp | 5 +---- src/ip.cpp | 11 +++++------ src/options.cpp | 4 ++-- src/options.hpp | 2 +- src/tcp_address.cpp | 28 +++++++++++++--------------- src/tcp_address.hpp | 2 +- src/tcp_listener.cpp | 2 -- src/tcp_listener.hpp | 2 +- 8 files changed, 24 insertions(+), 32 deletions(-) commit 525be5181278e4882423e785b4e004836c709140 Merge: e276df2 acba6bd Author: Pieter Hintjens Date: Thu Apr 12 09:34:53 2012 -0700 Merge pull request #311 from shripchenko/master Implement ZMQ_TCP_ACCEPT_FILTER setsockopt() for listening TCP sockets. commit acba6bdd6cd203f70702745a821945f4a83c7fab Author: Sergey KHripchenko Date: Thu Apr 12 18:37:14 2012 +0400 Implement ZMQ_TCP_ACCEPT_FILTER setsockopt() for listening TCP sockets. Assign arbitrary number of filters that will be applied for each new TCP transport connection on a listening socket. If no filters applied, then TCP transport allows connections from any ip. If at least one filter is applied then new connection source ip should be matched. To clear all filters call zmq_setsockopt(socket, ZMQ_TCP_ACCEPT_FILTER, NULL, 0). Filter is a null-terminated string with ipv6 or ipv4 CIDR. For example: localhost 127.0.0.1 mail.ru/24 ::1 ::1/128 3ffe:1:: 3ffe:1::/56 Returns -1 if the filter couldn't be assigned(format error or ipv6 filter with ZMQ_IPV4ONLY set) P.S. The only thing that worries me is that I had to re-enable 'default assign by reference constructor/operator' for 'tcp_address_t' (and for my inherited class tcp_address_mask_t) to store it in std::vector in 'options_t'... doc/zmq_setsockopt.txt | 16 ++++++++ include/zmq.h | 1 + src/options.cpp | 26 ++++++++++++ src/options.hpp | 6 +++ src/tcp_address.cpp | 102 ++++++++++++++++++++++++++++++++++++++++++++++++ src/tcp_address.hpp | 26 +++++++++--- src/tcp_listener.cpp | 28 ++++++++++++- src/tcp_listener.hpp | 3 +- 8 files changed, 201 insertions(+), 7 deletions(-) commit e276df2bdff2b9d59e894e59ae9a23381e5dbe8b Merge: 899778d cfa6f4b Author: Pieter Hintjens Date: Wed Apr 11 04:38:12 2012 -0700 Merge pull request #309 from hurtonm/fix_issue_335 Fix issue #335 commit cfa6f4bf514792fd85d188fc6ff0933dbedefc5c Author: Martin Hurton Date: Wed Apr 11 10:54:05 2012 +0200 Fix issue #335 The CreateEvent function requests EVENT_ALL_ACCESS access rights when the event object already exists. This causes problems when the event object is created from a service. The solution is to call OpenEvent function when the CreateEvent failed due to access control. The proper solution would be to use CreateEventEx function, but this one is not available on Windows XP. src/signaler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 899778dcb306f0207b24e63f6e049dcb9c60ce4d Merge: f6330f3 177264d Author: Pieter Hintjens Date: Tue Apr 10 06:07:08 2012 -0700 Merge pull request #308 from jdc8/master C++ style comments result in compile errors with non-c99 C compiler commit 177264d941316dcc93ac5414aa58d5d3911b15af Author: jdc8 Date: Tue Apr 10 06:33:15 2012 -0400 c++ style comments result in compile errors with non-c99 C compiler include/zmq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f6330f3d8d69c65a30729bf39d5fddf9c911077b Merge: 3cd0b1b 70cf2d4 Author: Pieter Hintjens Date: Mon Apr 9 18:20:02 2012 -0700 Merge pull request #307 from mkoppanen/master Handle ETIMEDOUT commit 70cf2d41ba005aa33e732717867320f718c0b456 Author: Mikko Koppanen Date: Tue Apr 10 09:55:10 2012 +0900 ETIMEDOUT is a valid error code here. Fixes intermittent assertion failure on laggy networks src/stream_engine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3cd0b1b647c4b3c08f2749c4e8d499d603a3fdb0 Merge: 4ab3c5a 4315467 Author: Pieter Hintjens Date: Mon Apr 9 10:14:35 2012 -0700 Merge pull request #306 from shripchenko/master Implement ZMQ_TCP_KEEPALIVE* family of options to adjust TCP keepalives commit 4315467d7cfa93d60d605d36adde12e36380ce12 Author: Sergey KHripchenko Date: Mon Apr 9 13:39:52 2012 +0400 documentation trimmed down to be just placeholders for who knows english better than me doc/zmq_getsockopt.txt | 58 +++++++++++++++++------------------------------- doc/zmq_setsockopt.txt | 58 +++++++++++++++++------------------------------- 2 files changed, 40 insertions(+), 76 deletions(-) commit 4b303402a76a5d2fe85ff8cdaf7a98d6dcfa94ee Author: Sergey KHripchenko Date: Fri Apr 6 20:04:35 2012 +0400 more flexible keepalive options detection + awful options documentation acinclude.m4 | 112 +++++++++++++++++++++++++++++++++++++++++------- configure.in | 27 +++++++++--- doc/zmq_getsockopt.txt | 63 +++++++++++++++++++++++++++ doc/zmq_setsockopt.txt | 66 ++++++++++++++++++++++++++++ src/ip.cpp | 37 ++++++++++++++-- src/options.cpp | 9 ++-- 6 files changed, 286 insertions(+), 28 deletions(-) commit 0c3d9179262ab431b8949b8646eed9a1a1e4a233 Author: Sergey KHripchenko Date: Thu Apr 5 19:39:53 2012 +0400 initial implementation of tuning TCP keep-alives for TCP socket currently not fully cross-platform work on linux possibly work in *bsd and could be enhanced to work on windows acinclude.m4 | 55 ++++++++++++++++++++++++ configure.in | 10 +++++ include/zmq.h | 5 +++ src/ip.cpp | 31 ++++++++++++++ src/ip.hpp | 3 ++ src/options.cpp | 111 ++++++++++++++++++++++++++++++++++++++++++++++++- src/options.hpp | 9 +++- src/tcp_connecter.cpp | 1 + src/tcp_listener.cpp | 1 + 9 files changed, 223 insertions(+), 3 deletions(-) commit 4ab3c5a285b858159c957139eb991ce6f727c05a Merge: 88db804 12c0c6a Author: Pieter Hintjens Date: Thu Apr 5 07:17:29 2012 -0700 Merge pull request #305 from hurtonm/fix_identity_exchange_for_inproc_transport Fix identity exchange for inproc transport commit 12c0c6aa74c064a1590bb08dc97f16a8a70c27d6 Author: Martin Hurton Date: Thu Apr 5 15:32:45 2012 +0200 Fix identity exchange for inproc transport The socket connecting using the inproc transport never received the identity of the remote peer. src/socket_base.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 88db804bb98cf0443864695c104bee3c5a1a284b Merge: 5bc9fd6 b41036a Author: Pieter Hintjens Date: Wed Apr 4 16:35:41 2012 -0700 Merge pull request #304 from hurtonm/flush_identity_message_for_inproc_transport Flush identity message for inproc transport commit b41036aa2ab881afe57bfecaf658919b02d504f7 Author: Martin Hurton Date: Thu Apr 5 01:01:50 2012 +0200 Flush identity message for inproc transport The scoket implementation for inproc transfer failed to flush identity message. The result was that the identity message was not delivered until after the user sent the first message. The identity message was never delivered if the user used the socket only to receive messages. src/socket_base.cpp | 1 + 1 file changed, 1 insertion(+) commit 5bc9fd62c536a97c25d171b893af243403148fa5 Merge: a969028 d8c5808 Author: Ian Barber Date: Wed Apr 4 06:45:26 2012 -0700 Merge pull request #303 from pieterh/master Fixed issue #351 commit d8c58080a7600bb838b0ee8c73aaa9a291815c97 Author: Pieter Hintjens Date: Wed Apr 4 14:39:11 2012 +0100 Fixed issue #351 include/zmq.h | 3 +++ 1 file changed, 3 insertions(+) commit a96902897722826d1b718b9b5468b48843e093f9 Merge: 2faedd9 9a60b3a Author: Pieter Hintjens Date: Tue Apr 3 00:34:21 2012 -0700 Merge pull request #302 from hurtonm/router_bugfix Fix error in router socket introduced in the previous commit commit 9a60b3a2a197f1f1f48cf0bf6fa3e5e61e7efb6a Author: Martin Hurton Date: Tue Apr 3 09:28:38 2012 +0200 Fix error in router socket introduced in the previous commit src/router.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2faedd9e085613d5facfad93fd572a877fc8dd35 Merge: 5c6e278 600488f Author: Ian Barber Date: Mon Apr 2 13:23:52 2012 -0700 Merge pull request #300 from hurtonm/router_send_fixes router: always respect message boundaries commit 5c6e278887fd9f383431968a39bf50a51b88f402 Merge: 476c9b9 f037290 Author: Ian Barber Date: Mon Apr 2 13:23:19 2012 -0700 Merge pull request #301 from hurtonm/router_rework_peer_identification router: reimplement peer identification commit 600488fa9c84523314e6084c7a8c3657467e0599 Author: Martin Hurton Date: Mon Apr 2 20:10:04 2012 +0200 router: always respect message boundaries The current implementaion of router socket does not handle the full pipe and unroutable messages properly. Namely, in those cases, the socket could route some message parts into a wrong connection. src/router.cpp | 2 -- 1 file changed, 2 deletions(-) commit f037290dc39eafd0676f7b79216531d05a205619 Author: Martin Hurton Date: Mon Apr 2 19:51:37 2012 +0200 router: reimplement peer identification The new implementation allows one to send messages through a router socket to a peer even before receiving messages from this peer. Fixes issue #304 src/router.cpp | 235 ++++++++++++++++++++++++++++---------------------------- src/router.hpp | 17 +++- 2 files changed, 132 insertions(+), 120 deletions(-) commit 476c9b97c967dfe8f8b973290e75bcca9304326a Merge: 3eaae8b 9728706 Author: Ian Barber Date: Thu Mar 29 05:50:52 2012 -0700 Merge pull request #299 from pieterh/master Added checking to zmq_ctx_set() commit 9728706b1036246952b538bac19ebe30afa9ac80 Author: Pieter Hintjens Date: Thu Mar 29 07:46:46 2012 -0500 Added optval checking in zmq_ctx_set src/ctx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3eaae8b21e7ee8d0e183732201942172d8791b4a Merge: cecc790 eb8217b Author: Ian Barber Date: Wed Mar 28 23:35:04 2012 -0700 Merge pull request #298 from pieterh/master Fixed issue (unknown) on zmq_init(-1) commit eb8217bb288811c2f874d58845379bd9f8f4c0a5 Author: Pieter Hintjens Date: Thu Mar 29 00:47:11 2012 -0500 Fixed zmq_init(-1) issue src/zmq.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit cecc790ca3f2b289a816e02a4e99bab518eecaa3 Merge: 8da7271 77d93d7 Author: Ian Barber Date: Wed Mar 28 03:51:13 2012 -0700 Merge pull request #297 from hurtonm/code_cleanup Code cleanup commit 8da7271042bdd0fcac8560843a7f02949e975f4d Merge: ed65271 1e2564a Author: Ian Barber Date: Wed Mar 28 03:50:02 2012 -0700 Merge pull request #296 from hurtonm/fix_router_send Fix return value of send for router socket commit 1e2564a55feb45f9260812a96f8b18c2cc17dbae Author: Martin Hurton Date: Wed Mar 28 07:39:18 2012 +0200 Fix return value of send for router socket src/router.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 77d93d70f07a9f41f82bc16e430a078f4f230a27 Author: Martin Hurton Date: Wed Mar 28 06:56:53 2012 +0200 Simplify use of posix_assert in mutex.hpp It is the job of the posix_assert macro to check the value. No need to do it twice. The patch also fixes some whitespace problems. src/mutex.hpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit e7674025e583044c7d6a52cd54033973df934bef Author: Martin Hurton Date: Wed Mar 28 06:49:25 2012 +0200 Remove the launch_sibling method The method is not used anymore. src/own.cpp | 18 ------------------ src/own.hpp | 4 ---- 2 files changed, 22 deletions(-) commit 6f47f1281bcd56a085097cecfeaa1064f90fb19e Author: Martin Hurton Date: Wed Mar 28 06:38:25 2012 +0200 Do not pass a message to the check_write method The check_write method does not use the passed message. The parameter was needed to implement the swap. As the swap is not supported anymore, it is safe to remove this parameter. src/lb.cpp | 12 ++---------- src/pair.cpp | 8 +------- src/pipe.cpp | 4 ++-- src/pipe.hpp | 2 +- src/router.cpp | 8 +------- 5 files changed, 7 insertions(+), 27 deletions(-) commit ed65271c52ef586607bcde066ccac65adfac0446 Merge: 19f364e 9c46e87 Author: Ian Barber Date: Tue Mar 27 01:55:20 2012 -0700 Merge pull request #295 from hurtonm/tcp_address_fixes_anc_cleanups Tcp address fixes anc cleanups commit 9c46e8758888546dbf15102b218b92cefb4693bf Author: Martin Hurton Date: Tue Mar 27 06:26:39 2012 +0200 tcp_address: minor cleanups src/tcp_address.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 700e08c3c278b5ac67985404ab3e97a608bbf2fd Author: Martin Hurton Date: Tue Mar 27 06:45:03 2012 +0200 tcp_address: make port number conversion more robust This still rejects 00 as port number. src/tcp_address.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c428f6aece6447b9a32bd6430f80a4b22e51663a Author: Martin Hurton Date: Tue Mar 27 06:16:33 2012 +0200 tcp_address: check address length before manipulating it src/tcp_address.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19f364e20268befc0d98d0703ceaaba15537a7ad Merge: 4c93fc2 2bcc300 Author: Ian Barber Date: Mon Mar 26 14:41:12 2012 -0700 Merge pull request #294 from pieterh/master Fixed issue LIBZMQ-348 - Valgrind support commit 2bcc300a0ff22d426e012085e8464fa73d6417dc Author: Pieter Hintjens Date: Mon Mar 26 16:31:10 2012 -0500 Fixed issue #348 builds/valgrind/valgrind.supp | 14 ++++++++++++ builds/valgrind/vg | 1 + src/object.cpp | 48 ----------------------------------------- 3 files changed, 15 insertions(+), 48 deletions(-) commit 4c93fc25879213824c4fb4c9545f895ed7f43b95 Merge: 64732ae 084e1c2 Author: Ian Barber Date: Mon Mar 26 08:12:53 2012 -0700 Merge pull request #291 from rcxdude/bugfix Fix for issue #307 commit 64732aeca31176e27f3b8d69220f5f66fb82503e Merge: dc4d61f c2e9997 Author: Ian Barber Date: Mon Mar 26 08:12:12 2012 -0700 Merge pull request #293 from hurtonm/fix_getaddrinfo_for_ipv6_on_freebsd Don't set the AI_V4MAPPED flag on FreeBSD commit c2e9997a3c16d19a80fe5ca51760fd5eb9d7ff46 Author: Martin Hurton Date: Sun Mar 25 23:51:51 2012 +0200 Don't set the AI_V4MAPPED flag on FreeBSD The problem is that even though the AI_V4MAPPED flag is defined on FreeBSD, the getaddrinfo function does not support it and returns EAI_BADFLAGS. The patch also sets the flag on Windows if it is defined there. This is true for Windows Vista and later. Fixes issue #331. src/tcp_address.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit dc4d61f38ba967ebcf456892bea3c7dcfb33d485 Merge: 6d776d0 00b4571 Author: Ian Barber Date: Sun Mar 25 12:18:31 2012 -0700 Merge pull request #292 from hurtonm/fix_issue_334 Fixed issue #334 commit 00b4571bf1990e7c918ce6736c77757733848f5b Author: Martin Hurton Date: Sun Mar 25 20:06:06 2012 +0200 Fixed issue #334 src/session_base.cpp | 1 + 1 file changed, 1 insertion(+) commit 084e1c2193d73fe8db29603679e61f89907272ff Author: Douglas Young Date: Sun Mar 25 17:50:55 2012 +0100 Fix for issue #307 dist was skipping over pipes when one failed because the non-working pipe got swapped with a working pipe but the write was never retried on that pipe src/dist.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6d776d08658d41fda2986f49103f6b1689663872 Merge: c861fb4 ba798ee Author: Ian Barber Date: Fri Mar 23 15:52:42 2012 -0700 Merge pull request #290 from pieterh/master Fixed issue #325 commit ba798ee8f34f8d118a4e8296ac8335d10511653a Author: Pieter Hintjens Date: Fri Mar 23 17:32:26 2012 -0500 Fixed issue #325 doc/zmq_setsockopt.txt | 3 +++ 1 file changed, 3 insertions(+) commit 82c06e4417795ebc3e7760af6b02a3d9fd895da6 Author: Pieter Hintjens Date: Fri Mar 23 17:29:04 2012 -0500 Fixed issue #325 src/router.cpp | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) commit c861fb4c831d2a7927e11a0256a688149ab80c0d Merge: 712e36d 3585ec8 Author: Ian Barber Date: Thu Mar 22 15:20:53 2012 -0700 Merge pull request #289 from pieterh/master Makefile.am wasn't fixed, so libzmq was not building commit 3585ec8aea9369580e4a5718b0e8ef7f37551ee8 Author: Pieter Hintjens Date: Thu Mar 22 16:47:17 2012 -0500 Fixed Makefile for ROUTER/DEALER rename src/Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 712e36d29cce7a09c9b703ff5063b1642e40d75b Merge: 6f720f0 27c28bd Author: Ian Barber Date: Thu Mar 22 14:44:43 2012 -0700 Merge pull request #288 from pieterh/master Mark sockets as invalid when closed, not reaped commit 27c28bdc2e2c1aa3d3dfeca055cc03165f6f98ca Author: Pieter Hintjens Date: Thu Mar 22 15:55:05 2012 -0500 Mark sockets as invalid when closed, not when destroyed Previously, sockets were still "valid" after being closed and only marked as invalid when destroyed. This meant programs could access closed sockets. Now the socket is marked "invalid" when closed. src/socket_base.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6f720f0026f9966e402a4f3d18df79614e19cfae Merge: 0480ce1 c12fedc Author: Ian Barber Date: Thu Mar 22 13:30:48 2012 -0700 Merge pull request #287 from pieterh/master Completed internal renaming of XREP/XREQ to ROUTER/DEALER commit c12fedc70a09e1701dbafaac4555245c9561603d Author: Pieter Hintjens Date: Thu Mar 22 11:36:19 2012 -0500 Completed internal renaming of XREP/XREQ to ROUTER/DEALER src/dealer.cpp | 128 +++++++++++++++++++ src/dealer.hpp | 92 ++++++++++++++ src/rep.cpp | 16 +-- src/rep.hpp | 6 +- src/req.cpp | 26 ++-- src/req.hpp | 6 +- src/router.cpp | 342 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/router.hpp | 128 +++++++++++++++++++ src/session_base.cpp | 12 +- src/socket_base.cpp | 12 +- src/xrep.cpp | 342 -------------------------------------------------- src/xrep.hpp | 128 ------------------- src/xreq.cpp | 128 ------------------- src/xreq.hpp | 92 -------------- 14 files changed, 729 insertions(+), 729 deletions(-) commit 0480ce18207120a2b44ed4ef264b2ecb73e691a2 Merge: 3b483a8 75809b2 Author: Ian Barber Date: Thu Mar 22 09:09:15 2012 -0700 Merge pull request #286 from pieterh/master Fixed issue LIBZMQ-345 - race condition in ctx.socket/term allows segfault commit 75809b27da53767df03c9cf5e065a19fba62533b Author: Pieter Hintjens Date: Thu Mar 22 11:03:32 2012 -0500 Fixed issue LIBZMQ-345 - race condition in ctx.socket/term allows segfault src/ctx.cpp | 9 +++------ src/ctx.hpp | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) commit 3b483a8dd7ed8b2009e0872f1b382ec56aef933f Merge: 84707d3 151d071 Author: Ian Barber Date: Thu Mar 22 03:32:43 2012 -0700 Merge pull request #285 from hurtonm/ctx_patches Ctx patches commit 84707d3feb5a71e4a279b3e6e58fcb19240b89aa Merge: 8a64d80 860e1d2 Author: Ian Barber Date: Thu Mar 22 03:31:02 2012 -0700 Merge pull request #284 from pieterh/master Fixed issue LIBZMQ-344 - Implementation of ZMQ_FAIL_UNROUTABLE is broken commit 151d0717bb214f318bfb6377e037f3702ca52f6e Author: Martin Hurton Date: Thu Mar 22 07:06:17 2012 +0100 Minor cleanups * corrects whitespace errors * fixes spelling errors in comments * prefers #ifdef to #if defined src/ctx.cpp | 8 ++++---- src/ctx.hpp | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) commit ae2b9383303c9d3dd2e402fb026a3f43c97d0fc7 Author: Martin Hurton Date: Thu Mar 22 06:51:41 2012 +0100 register_endpoint: simplify locking src/ctx.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e56f698023250831520b2566398b3fdc36181e15 Author: Martin Hurton Date: Thu Mar 22 06:55:12 2012 +0100 choose_io_thread: do not assert when no I/O thread was chosen src/ctx.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit f944336ee0110268e8b550c052e70d6244be852d Author: Martin Hurton Date: Thu Mar 22 06:46:04 2012 +0100 Fix race condition in find_endpoint src/ctx.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 860e1d24c08c82c0dea2b8cee5af44ec3837deac Author: Pieter Hintjens Date: Wed Mar 21 17:43:52 2012 -0500 Fixed issue #344 src/xrep.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 8a64d80fba9ff510000a17edbee5d291f66e895b Merge: 0afd8a8 f26e4ab Author: Ian Barber Date: Wed Mar 21 13:21:21 2012 -0700 Merge pull request #283 from pieterh/master Fixed issue LIBZMQ-343 - zmq_msg_get/set are too complex commit f26e4ab7840720e69c5015030f22a715779a2189 Author: Pieter Hintjens Date: Wed Mar 21 14:19:40 2012 -0500 Simplified zmq_msg_get/set functions * Return integer property * Fixed up man pages, which were inaccurate * Fixed test case .gitignore | 1 + doc/zmq_msg_get.txt | 42 ++++----- doc/zmq_msg_more.txt | 4 +- doc/zmq_msg_set.txt | 18 ++-- include/zmq.h | 7 +- src/zmq.cpp | 21 +---- tests/test_last_endpoint | 225 ---------------------------------------------- tests/test_msg_flags.cpp | 13 +-- 8 files changed, 36 insertions(+), 295 deletions(-) commit 0afd8a87d55e39342411a1998b6866f378c2b676 Merge: cd57c43 6dd102c Author: Ian Barber Date: Tue Mar 20 13:14:59 2012 -0700 Merge pull request #281 from pieterh/master Applied patch for issue #293 - zmq 2.1 doesn't follow the ZMTP/1.0 spec commit cd57c4388019c649d488c19531dca71a167ec902 Merge: 58378c6 35233f9 Author: Pieter Hintjens Date: Tue Mar 20 12:50:57 2012 -0700 Merge pull request #282 from hurtonm/remove_unused_variable remove unused variable commit 58378c6a2c8c7d4a22d1aab9c1991d4ff64db65b Merge: 60e45f3 0a6fc02 Author: Pieter Hintjens Date: Tue Mar 20 12:50:43 2012 -0700 Merge pull request #280 from hurtonm/fix_ipc_connecter fix connection establishment for AF_UNIX sockets commit 35233f9e2f93859f45a8c03d16f81d0faf20162c Author: Martin Hurton Date: Tue Mar 20 19:34:10 2012 +0100 remove unused variable src/tcp_listener.cpp | 1 - src/tcp_listener.hpp | 3 --- 2 files changed, 4 deletions(-) commit 0a6fc0270292889921c14b6e07964d9b1b63d6c6 Author: Martin Hurton Date: Tue Mar 20 18:54:17 2012 +0100 fix connection establishment for AF_UNIX sockets src/ipc_connecter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60e45f34b673039ee168d9192b648c26750e7d6e Merge: 7d6d2f9 1e4c5b2 Author: Chuck Remes Date: Tue Mar 20 09:42:18 2012 -0700 Merge pull request #279 from pieterh/master Wrote new ctx API, added ZMQ_MAX_SOCKETS and ZMQ_IO_THREADS commit 6dd102cdedc404d6461e36c06291aab8abd2fada Author: Pieter Hintjens Date: Tue Mar 20 10:53:51 2012 -0500 Fixed issue #293 src/encoder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1e4c5b293af996928a2048b973978860c7de04c9 Merge: 7d6d2f9 6e71a54 Author: Pieter Hintjens Date: Tue Mar 20 10:18:15 2012 -0500 Merge branch 'issue-337' commit 7d6d2f940815b066a80bd59e25f4e76c88ea2386 Merge: 5973da4 1075812 Author: Pieter Hintjens Date: Tue Mar 20 07:06:33 2012 -0700 Merge pull request #278 from taurel/master Disable reconnection option commit 107581213cd04e14d5b44efa1730a0134f958a92 Author: Emmanuel Taurel Date: Tue Mar 20 09:22:27 2012 +0100 Disable reconnection option Add value -1 to the ZMQ_RECONNECT_IVL to disable the reconnection algorithm doc/zmq_getsockopt.txt | 2 +- doc/zmq_setsockopt.txt | 2 +- src/options.cpp | 2 +- src/session_base.cpp | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) commit 5973da486696aca389dab0f558c5ef514470bcd2 Merge: 87fa8e7 9426bd5 Author: Ian Barber Date: Tue Mar 20 00:28:19 2012 -0700 Merge pull request #277 from pieterh/master Removed sys:// logging infrastructure commit 9426bd5baf5010b547368ad88f11263f2d6bfb66 Merge: 87fa8e7 bdefa18 Author: Pieter Hintjens Date: Mon Mar 19 23:15:15 2012 -0500 Merge branch 'issue-336' commit 87fa8e78bf9e0143f8a7c56a7efa943adee52556 Merge: 8665f9a 06dd31c Author: Mikko Koppanen Date: Mon Mar 19 18:51:05 2012 -0700 Merge pull request #276 from pieterh/master Removed last vestiges of thread-safe sockets commit 6e71a54b1efe1ddb1805c6cc49e3f91492622a81 Author: Pieter Hintjens Date: Mon Mar 19 19:41:20 2012 -0500 Fixed issues #337, #341, and #340 * Implemented new ctx API (_new, _destroy, _get, _set) * Removed 'typesafe' macros from zmq.h * Added support for MAX_SOCKETS (was tied into change for #337) * Created new man pages doc/Makefile.am | 6 +- doc/zmq.txt | 18 +++- doc/zmq_ctx_destroy.txt | 66 ++++++++++++++ doc/zmq_ctx_get.txt | 67 ++++++++++++++ doc/zmq_ctx_new.txt | 49 ++++++++++ doc/zmq_ctx_set.txt | 75 ++++++++++++++++ doc/zmq_init.txt | 1 + doc/zmq_term.txt | 1 + include/zmq.h | 89 ++++++++---------- src/ctx.cpp | 191 ++++++++++++++++++++++++++------------- src/ctx.hpp | 29 ++++-- src/options.cpp | 5 +- src/options.hpp | 3 + src/pair.cpp | 4 +- src/pair.hpp | 2 +- src/pub.cpp | 6 +- src/pub.hpp | 4 +- src/pull.cpp | 4 +- src/pull.hpp | 2 +- src/push.cpp | 4 +- src/push.hpp | 2 +- src/rep.cpp | 6 +- src/rep.hpp | 2 +- src/req.cpp | 4 +- src/req.hpp | 4 +- src/socket_base.cpp | 27 +++--- src/socket_base.hpp | 6 +- src/sub.cpp | 6 +- src/sub.hpp | 4 +- src/xpub.cpp | 4 +- src/xpub.hpp | 2 +- src/xrep.cpp | 4 +- src/xrep.hpp | 2 +- src/xreq.cpp | 4 +- src/xreq.hpp | 2 +- src/xsub.cpp | 4 +- src/xsub.hpp | 2 +- src/zmq.cpp | 58 ++++++++---- tests/test_last_endpoint | 225 ++++++++++++++++++++++++++++++++++++++++++++++ 39 files changed, 798 insertions(+), 196 deletions(-) commit bdefa181eddddf49306d4d618f169da5ee3dfc49 Author: Pieter Hintjens Date: Mon Mar 19 16:15:09 2012 -0500 Fixed issue 336 src/ctx.cpp | 37 ------------------------------------- src/ctx.hpp | 8 -------- src/object.cpp | 8 -------- src/socket_base.cpp | 6 +++--- 4 files changed, 3 insertions(+), 56 deletions(-) commit 06dd31c56aaa98da2063c710f78aed8718d0996c Author: Pieter Hintjens Date: Mon Mar 19 15:50:53 2012 -0500 Removed last vestiges of thread-safe sockets src/ctx.cpp | 10 ---------- src/ctx.hpp | 6 ------ src/socket_base.cpp | 19 +------------------ src/socket_base.hpp | 3 --- 4 files changed, 1 insertion(+), 37 deletions(-) commit 8665f9a0b61cd6de2b02282192c19b01660e887b Merge: 32c85e0 9ccfbf8 Author: Mikko Koppanen Date: Sat Mar 17 10:17:39 2012 -0700 Merge pull request #275 from pieterh/master Fixed issue LIBZMQ-333 (zmq_devices is missing) commit 9ccfbf8d3048cc3d006a0ce97c8d5d99527b2eb1 Author: Pieter Hintjens Date: Sat Mar 17 11:12:11 2012 -0500 Removed zmq.hpp, may add this back in separate commit include/zmq.hpp | 296 ------------------------------------------------------- 1 file changed, 296 deletions(-) commit 9ac40c47d7fc3f47859a914147a0a840505e868c Author: Pieter Hintjens Date: Fri Mar 16 16:39:11 2012 -0500 Fixed issue LIBZMQ-333 - reverted commit 941be8d2175332cb720f390f93d07a0870db8824. - fixed zmq_device implementation for latest socket_base class - added back zmq_device.3 man page builds/redhat/zeromq.spec.in | 7 + doc/Makefile.am | 2 +- doc/zmq.txt | 10 ++ doc/zmq_device.txt | 125 ++++++++++++++++++ doc/zmq_socket.txt | 3 - include/zmq.h | 10 ++ include/zmq.hpp | 296 ++++++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 2 + src/device.cpp | 120 +++++++++++++++++ src/device.hpp | 32 +++++ src/zmq.cpp | 47 +++++++ 11 files changed, 650 insertions(+), 4 deletions(-) commit 32c85e0ea39e46ee9b40f814d18b939a17ac40f0 Merge: 62d27b7 cb70c5e Author: Pieter Hintjens Date: Thu Mar 15 09:01:15 2012 -0700 Merge pull request #274 from Kobolog/master An options to choose the behavior for unroutable messages in ZMQ_ROUTER sockets commit cb70c5e75d3cdc23f0264830b5eabf72c4b5543b Author: Kobolog Date: Thu Mar 15 15:15:44 2012 +0300 fixed some typos include/zmq.h | 2 +- src/xrep.cpp | 8 ++++---- src/xrep.hpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 8095a129e8114341667d2d82d21cfcfc92456fbb Author: Kobolog Date: Thu Mar 15 15:06:44 2012 +0300 man entry for the new option doc/zmq_setsockopt.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit df584a3be04cac3fffb8b8b319d7351c8d9b6345 Author: Kobolog Date: Thu Mar 15 14:57:38 2012 +0300 an option to fail on unroutable messages in ROUTER sockets include/zmq.h | 1 + src/xrep.cpp | 31 ++++++++++++++++++++++++++++--- src/xrep.hpp | 4 ++++ 3 files changed, 33 insertions(+), 3 deletions(-) commit 62d27b7af3560b3cd5bc95ea216243dc268116eb Merge: f967430 318ba88 Author: Ian Barber Date: Wed Mar 14 08:27:04 2012 -0700 Merge pull request #273 from BoresExpress/wm5 Add WinCE support. commit 318ba8836f1e86f23a876788f37406de7c52774c Author: boris@boressoft.ru <Ñ÷¸òíàÿ êîìèññèÿ@DANCE-SERVER-2.(none)> Date: Wed Mar 14 19:12:28 2012 +0400 Add WinCE support. * Added two new files: errno.hpp and errno.cpp. They are required to use errno functionality on WM. * zmq.cpp, msg.h: removed inclusion of errno.h because it is included in zmq.h that is also included by .cpp. * windows.hpp: process.h is included only for desktop builds. * thread.cpp: on CE CreateThread is used instead of __beginthreadex * socket_base.cpp, clock.cpp: on CE include cmnintrin.h instead on intrin.h * signaler.cpp: on Windows should use special macro around event name (for unicode builds) * err.hpp: make it include errno.hpp (my file) instead on errno.h when building for CE * err.cpp: use FormatMessage when building for CE (because CE does not have ANSI API functions) * zmq.h: do not include errno.h whe building for CE * libzmq.vcproj: add tro new files builds/msvc/errno.cpp | 32 ++++++++++++++++++++++ builds/msvc/errno.hpp | 56 ++++++++++++++++++++++++++++++++++++++ builds/msvc/libzmq/libzmq.vcproj | 8 ++++++ include/zmq.h | 2 ++ src/clock.cpp | 4 +++ src/err.cpp | 6 ++++ src/err.hpp | 4 +++ src/msg.cpp | 1 - src/signaler.cpp | 2 +- src/socket_base.cpp | 4 +++ src/thread.cpp | 9 ++++++ src/windows.hpp | 2 ++ src/zmq.cpp | 1 - 13 files changed, 128 insertions(+), 3 deletions(-) commit f9674308e8f4ab3271adf07fa93b404ae0fc9ea4 Merge: 19d3096 020f777 Author: Pieter Hintjens Date: Mon Mar 12 15:22:00 2012 -0700 Merge pull request #272 from staticfloat/patch-1 Eliminate unnecessary line break commit 020f777e097d7e3a1eba534126cb479bf786519b Author: staticfloat Date: Mon Mar 12 15:18:32 2012 -0700 Eliminate unnecessary line break doc/zmq_term.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19d30969cff3ad07153ca4448f9603728263ec59 Merge: 4c59b1f ce24bf0 Author: Ian Barber Date: Tue Mar 6 07:22:34 2012 -0800 Merge pull request #271 from BoresExpress/bug1 Changed wrong file name in VC++ project. commit ce24bf04dde0fb6ee39a836dfebaf4f9bd87014d Author: boris@boressoft.ru <Ñ÷¸òíàÿ êîìèññèÿ@DANCE-SERVER-2.(none)> Date: Tue Mar 6 18:21:55 2012 +0400 Changed wrong file name in VC++ project. Name of the file in the project does not match actual file name: adress.cpp VS. address.cpp builds/msvc/libzmq/libzmq.vcproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c59b1fb2f68ac481556e22427ce243fff81edca Merge: 0fed3a3 3aabbba Author: Pieter Hintjens Date: Thu Mar 1 14:25:11 2012 -0800 Merge pull request #270 from rgagnon24/master Fix IPC transport domain socket stream file not being removed when connection is closed commit 3aabbbaefa11217426f134f3d65efa1206ff8c96 Author: Rob Gagnon Date: Thu Mar 1 21:49:46 2012 +0000 Fix IPC transport domain socket stream file not being removed when connection is closed src/ipc_listener.cpp | 1 + 1 file changed, 1 insertion(+) commit 0fed3a3fca2ea7a5e6cfe8566aa1b5a28d56ee0b Merge: 3f8322b 5820438 Author: Pieter Hintjens Date: Mon Feb 27 08:10:21 2012 -0800 Merge pull request #269 from datasift/master patch for LIBZMQ-328 commit 5820438b64b0f22bbf50a28fa6d905fd6e085182 Author: Ben Gray Date: Mon Feb 27 16:06:56 2012 +0000 update lower bound flag when removing topics src/trie.cpp | 1 + 1 file changed, 1 insertion(+) commit 3f8322beff81fb5ed951bf43dc90d1623e52a565 Merge: 7689d20 3485b3e Author: Ian Barber Date: Mon Feb 27 03:00:49 2012 -0800 Merge pull request #268 from gimaker/compact-trie-table Fixed a bug in the mtrie table compaction logic. commit 3485b3ef40c435a4ac03fcc5f7341fad7aa2d5b5 Author: Staffan GimÃ¥ker Date: Mon Feb 27 11:51:30 2012 +0100 Fixed a bug in the mtrie table compaction logic. Signed-off-by: Staffan GimÃ¥ker src/mtrie.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 7689d205e9928e2370261833637ec6ae142d6aa4 Merge: 58f8d4a b05fb46 Author: Ian Barber Date: Tue Feb 21 00:01:09 2012 -0800 Merge pull request #267 from mkoppanen/windows-project-files Add missing files to Windows project files commit b05fb4696657e6353584cdf9078392941218154d Author: Mikko Koppanen Date: Mon Feb 20 21:51:37 2012 -0600 Add missing files to Windows project files builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ builds/msvc/libzmq/libzmq.vcxproj | 2 ++ 2 files changed, 10 insertions(+) commit 58f8d4a417531a18be18a6e9577525c59efc3bf1 Merge: 879ab39 5d7450d Author: Ian Barber Date: Mon Feb 20 08:40:43 2012 -0800 Merge pull request #266 from mkoppanen/improve-tests Improve the test for last_endpoint, use the same ports as other tests commit 879ab39e9275da7b10c88e6b4e558c08b44fef8d Merge: 78d24d3 1824574 Author: Pieter Hintjens Date: Mon Feb 20 08:39:59 2012 -0800 Merge pull request #265 from mkoppanen/freebsd-solaris-fixes tcp_listener::get_address improvements commit 5d7450d65e2fa8e7d0de91d9890363d21741b3c3 Author: Mikko Koppanen Date: Sun Feb 19 23:19:17 2012 -0600 Improve the test for last_endpoint, use the same ports as other tests tests/test_last_endpoint.cpp | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) commit 1824574f9b5a8ce786853320e3ea09fe1f822bc4 Author: Mikko Koppanen Date: Mon Feb 20 04:26:25 2012 +0000 Minor fixes to get_address code to fix build on solaris and freebsd. Also service doesnt need to be discovered here src/tcp_listener.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 78d24d3d01a6cf14e1df6015cd65c0043b4065a7 Merge: 2533909 5e1efc9 Author: Chuck Remes Date: Sun Feb 19 12:30:37 2012 -0800 Merge pull request #264 from ianbarber/master Update docs for last endpoint and add test for IPC last endpoint retrieval commit 5e1efc9ec37f08038e9a6561c5329871a20c267e Author: Ian Barber Date: Sun Feb 19 18:46:46 2012 +0000 Update documentation for last endpoint to mention inaddr_any and add a test for IPC last endpoint checking doc/zmq_getsockopt.txt | 3 ++- tests/test_last_endpoint.cpp | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 2533909f60ce6e8400c8862b5719b5c263951eea Merge: b19c5fc 33a18f0 Author: Ian Barber Date: Sat Feb 18 15:11:58 2012 -0800 Merge pull request #263 from mkoppanen/tcp-get-address More fixes based on CentOS 6.2 results commit 33a18f0f9047ab2ffa7acb844e98c7dba3dfdb04 Author: Mikko Koppanen Date: Sat Feb 18 23:07:27 2012 +0000 More fixes based on CentOS 6.2 results src/tcp_listener.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b19c5fced5387b0c539c6e11b9797205ef24af9c Merge: 06140da d00d484 Author: Ian Barber Date: Sat Feb 18 14:44:29 2012 -0800 Merge pull request #262 from mkoppanen/tcp-get-address Tcp get address commit d00d4843beac26dfbf8954e93aa3886d5e39f297 Author: Mikko Koppanen Date: Sat Feb 18 20:44:41 2012 +0000 More fixes for ZMQ_LAST_ENDPOINT. Added a test src/ipc_listener.cpp | 22 ++++++++++-------- src/ipc_listener.hpp | 2 +- src/socket_base.cpp | 10 ++++---- src/tcp_listener.cpp | 14 ++++++++---- src/tcp_listener.hpp | 2 +- tests/Makefile.am | 4 +++- tests/test_last_endpoint.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 84 insertions(+), 22 deletions(-) commit b0573486c7abf89b79d30aa4d29b0dac3d789619 Author: Mikko Koppanen Date: Sat Feb 18 19:48:09 2012 +0000 Fixes for tcp_listener::get_address src/tcp_listener.cpp | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) commit 06140daf2948695926d9b76d73064f4996e6a63b Merge: e248549 1bf4067 Author: Ian Barber Date: Fri Feb 17 14:38:02 2012 -0800 Merge pull request #261 from mkoppanen/windows-build Windows build commit 1bf4067cd8aecc65ab246d247f05ff1332831927 Author: Mikko Koppanen Date: Fri Feb 17 22:07:52 2012 +0000 More fixes for win build src/socket_base.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e24854925296b15343a41efbfe83d0885dee562c Merge: dd35385 9a4fd8a Author: Ian Barber Date: Fri Feb 17 14:07:04 2012 -0800 Merge pull request #260 from mkoppanen/solaris-build Needs explicit cast on solaris commit 51b59b40ddbcbde58dd45a32a449996041cb4aef Author: Mikko Koppanen Date: Fri Feb 17 22:06:10 2012 +0000 Fix build on windows src/address.cpp | 2 ++ src/address.hpp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 9a4fd8a3053cef8ac283da837d740273ba1554ef Author: Mikko Koppanen Date: Fri Feb 17 21:55:06 2012 +0000 Needs explicit cast on solaris src/zmq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd35385da323be4a275b78dbdaf7a7b33ef164c7 Merge: cfe2a82 56aa49f Author: Pieter Hintjens Date: Fri Feb 17 13:50:27 2012 -0800 Merge pull request #259 from mkoppanen/solaris-build Fix build on solaris commit 56aa49ff3d67fd7d643adfc88cc9625b3ca06b07 Author: Mikko Koppanen Date: Fri Feb 17 21:45:17 2012 +0000 Fix build on solaris src/ipc_listener.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cfe2a821f3a01affc3044fcd91caf2292abe6508 Merge: 9e622d5 916f1a5 Author: Pieter Hintjens Date: Fri Feb 17 09:12:26 2012 -0800 Merge pull request #258 from skaller/master Remove thread safe socket code from C API and tests. commit 916f1a524ddf1820b7857a42c8f35d477f73ebba Author: skaller Date: Sat Feb 18 02:41:17 2012 +1100 Remove build script references to test_ts_context. tests/Makefile.am | 2 -- 1 file changed, 2 deletions(-) commit e7da123b280f42d058686001d89899058b7ee75e Author: skaller Date: Sat Feb 18 02:34:59 2012 +1100 Remove thread safe test. tests/test_ts_context.cpp | 129 --------------------------------------------- 1 file changed, 129 deletions(-) commit 38e74c9e84b3fbe3fc65024a91f5b2b783d33a84 Author: skaller Date: Sat Feb 18 02:34:18 2012 +1100 Remove thread safe socket stuff from C binding. src/zmq.cpp | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) commit 0fa6b8e79345daa7803ec301d5d78a510c501c9b Author: skaller Date: Sat Feb 18 02:32:15 2012 +1100 Remove thread safe context init. include/zmq.h | 1 - 1 file changed, 1 deletion(-) commit 9e622d542ad0c01c3389fe8a26e7325dee301c05 Merge: 9910439 82bd543 Author: Pieter Hintjens Date: Fri Feb 17 07:03:39 2012 -0800 Merge pull request #256 from ianbarber/master Removing old ECANTROUTE documentation commit 991043927794a8500668b0f8eac6a2d2fe6fadfc Merge: c9898d2 da1920d Author: Ian Barber Date: Fri Feb 17 02:29:29 2012 -0800 Merge pull request #257 from mkoppanen/master Revert null checks in the API commit da1920d94457ca614b50b060a64fe849ec3f0ec8 Author: Mikko Koppanen Date: Fri Feb 17 09:48:04 2012 +0000 Revert NULL checks in the API doc/zmq_msg_size.txt | 12 ++--------- include/zmq.h | 2 +- perf/inproc_lat.cpp | 2 +- perf/inproc_thr.cpp | 2 +- perf/local_lat.cpp | 2 +- perf/local_thr.cpp | 2 +- perf/remote_lat.cpp | 2 +- src/msg.cpp | 2 +- src/msg.hpp | 4 ++-- src/zmq.cpp | 54 ++++---------------------------------------------- 10 files changed, 15 insertions(+), 69 deletions(-) commit 82bd5431ce2be7aac0e9d8a88103d5a29353f0cf Author: Ian Barber Date: Fri Feb 17 08:01:36 2012 +0000 Updating documentation to remove ECANTROUTE error code doc/zmq_msg_send.txt | 3 --- doc/zmq_send.txt | 3 --- doc/zmq_sendmsg.txt | 3 --- 3 files changed, 9 deletions(-) commit c9898d2419c52ebf51970fa11ce3a70c06fe2780 Merge: 244f3a3 132112a Author: Pieter Hintjens Date: Thu Feb 16 20:27:49 2012 -0800 Merge pull request #255 from jtzl/master Adding more specific installation instructions commit 132112afeb4e6f2d49e854711353a6ec81bb3387 Author: Jtzl Forshizl Date: Thu Feb 16 19:50:28 2012 -0500 added more specific installation documentation INSTALL | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 244f3a3c113f7bd028e3058de0363159ad56318f Merge: a457be3 ccdb7a6 Author: Ian Barber Date: Thu Feb 16 13:59:53 2012 -0800 Merge pull request #254 from pieterh/minor-cleanups Minor cleanups commit ccdb7a63052c1faa947b0b27ad280303b048d9cf Author: Pieter Hintjens Date: Thu Feb 16 15:55:18 2012 -0600 Minor cleanups * Fixed use of ssize_t in zmq_msg_t class * Corrected error after merge, old reference to inner_fctname (broke build) .gitignore | 1 + src/msg.cpp | 4 ++-- src/msg.hpp | 5 +++-- src/zmq.cpp | 16 ++++++++++------ 4 files changed, 16 insertions(+), 10 deletions(-) commit a457be315bec89ab013715586a28be83de5dd736 Merge: 9321dfb 8a497e2 Author: Chuck Remes Date: Thu Feb 16 13:20:33 2012 -0800 Merge pull request #246 from pieterh/arguments Return EFAULT if required arguments are null commit 9321dfb84588e2a2dbc15e2657f710e0899a0b90 Merge: 5d9432b 4697634 Author: Chuck Remes Date: Thu Feb 16 13:19:11 2012 -0800 Merge pull request #248 from pieterh/scattered Renamed scatter/gather methods, cleaned up source commit 5d9432b28217246b5de23fd850ac13481e99c4e7 Merge: 4b62344 2da76a3 Author: Pieter Hintjens Date: Thu Feb 16 13:13:11 2012 -0800 Merge pull request #253 from ianbarber/master Remove inet_ntop commit 2da76a3003cf1855e7e989ef347e6d178e518ac3 Author: Ian Barber Date: Thu Feb 16 21:05:02 2012 +0000 Updating to use getnameinfo rather than inet_ntop src/tcp_listener.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4b62344023eb0f9be2b3b6a09239869198c667a9 Merge: c9d124b 2cd04c5 Author: Pieter Hintjens Date: Thu Feb 16 10:49:23 2012 -0800 Merge pull request #252 from gimaker/compact-trie-table Compact the trie/mtrie node tables where possible, to reduce memory usag... commit c9d124b27eb5dacadb626c57638f3593707c2306 Merge: bfbe556 e18f9da Author: Pieter Hintjens Date: Thu Feb 16 10:45:13 2012 -0800 Merge pull request #251 from gimaker/sub-sndhwn-assert Drop subscription messages when reaching the SNDHWM rather than assertin... commit bfbe556e006169e3a81d2946f98b0d8d6154de02 Merge: 2f44faa b9fb48f Author: Pieter Hintjens Date: Thu Feb 16 10:35:48 2012 -0800 Merge pull request #250 from gimaker/connect-assert Resolve addresses in the calling thread on connect. commit 4697634c0b6e18673f8c5a16007f26e515128b03 Merge: 3ee99ae b3d7b29 Author: Pieter Hintjens Date: Thu Feb 16 12:31:57 2012 -0600 Resolved conflicts after merge commit 3ee99ae81f86da979a6ca4f065d09f4be4c43296 Author: Pieter Hintjens Date: Wed Feb 15 16:47:24 2012 -0600 Renamed scatter/gather methods, cleaned up source include/zmq.h | 4 +-- src/zmq.cpp | 101 ++++++++++++++++++++++++++++++++------------------------- 2 files changed, 59 insertions(+), 46 deletions(-) commit 8a497e2ffc16cbd6c2642ac2238dd186d917f684 Merge: 0efb49f 07b49ff Author: Pieter Hintjens Date: Thu Feb 16 12:27:39 2012 -0600 Resolved conflicts after merge commit 0efb49f12fdec061b267a7526cbaa8d149d8c254 Author: Pieter Hintjens Date: Thu Feb 16 12:04:25 2012 -0600 Fixed up all references to zmq_msg_size doc/zmq_msg_size.txt | 16 ++++++++++++---- include/zmq.h | 1 + perf/inproc_lat.cpp | 4 ++-- perf/inproc_thr.cpp | 4 ++-- perf/local_lat.cpp | 4 ++-- perf/local_thr.cpp | 4 ++-- perf/remote_lat.cpp | 4 ++-- 7 files changed, 23 insertions(+), 14 deletions(-) commit 02b81d42ce2c3b6fabcfe1bcdc6fa8bceed9762a Author: Pieter Hintjens Date: Wed Feb 15 15:17:01 2012 -0600 Changed return type of zmq_msg_size to ssize_t to allow error return include/zmq.h | 4 ++-- src/zmq.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit dc09da456936e84e68e220a8c950e1abc2ebbd0b Author: Pieter Hintjens Date: Wed Feb 15 13:03:40 2012 -0600 Return EFAULT if required arguments are null src/zmq.cpp | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) commit 07b49ffb9c30af3c8a4e486dc4225784f4a1dda8 Author: Pieter Hintjens Date: Thu Feb 16 12:04:25 2012 -0600 Fixed up all references to zmq_msg_size doc/zmq_msg_size.txt | 16 ++++++++++++---- include/zmq.h | 1 + perf/inproc_lat.cpp | 4 ++-- perf/inproc_thr.cpp | 4 ++-- perf/local_lat.cpp | 4 ++-- perf/local_thr.cpp | 4 ++-- perf/remote_lat.cpp | 4 ++-- 7 files changed, 23 insertions(+), 14 deletions(-) commit 2f44faa7ce13645fe3b49475ced40675d0638709 Merge: 2b646cb fb4748f Author: Mikko Koppanen Date: Thu Feb 16 08:58:03 2012 -0800 Merge pull request #247 from pieterh/sendrecv Added zmq_msg_send/recv functions commit 2b646cbf6309ee648bf72e4609ef040d1cfe3ca3 Merge: b2e2fa6 d092f26 Author: Mikko Koppanen Date: Thu Feb 16 08:56:29 2012 -0800 Merge pull request #249 from pieterh/msgpeekpoke Renamed zmq_getmsgopt to zmq_msg_get commit 2cd04c54dfabd48f528636d15ccc4e1959b14432 Author: Staffan GimÃ¥ker Date: Thu Feb 16 15:56:19 2012 +0100 Compact the trie/mtrie node tables where possible, to reduce memory usage. Signed-off-by: Staffan GimÃ¥ker src/mtrie.cpp | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- src/trie.cpp | 87 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 211 insertions(+), 4 deletions(-) commit e18f9da012b2ee164539e089254dbbe33af204a9 Author: Staffan GimÃ¥ker Date: Thu Feb 16 14:49:47 2012 +0100 Drop subscription messages when reaching the SNDHWM rather than asserting. This matches the behaviour of zmq_setsockopt(ZMQ_SUBSCRIBE, ...), which also silently drops subscription messages if the SNDHWM is reached. Signed-off-by: Staffan GimÃ¥ker src/xsub.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b9fb48f47b8b6f211625e0897c5f52ba5cfe6593 Author: Staffan GimÃ¥ker Date: Thu Feb 2 14:56:51 2012 +0100 Resolve addresses in the calling thread on connect. This allows us to actually report an error to the caller on resolve failure, rather than asserting later on in the io thread. Signed-off-by: Staffan GimÃ¥ker src/Makefile.am | 2 ++ src/address.cpp | 50 +++++++++++++++++++++++++++++++++++++ src/address.hpp | 48 +++++++++++++++++++++++++++++++++++ src/ipc_address.cpp | 4 +-- src/ipc_address.hpp | 4 +-- src/ipc_connecter.cpp | 20 +++++++-------- src/ipc_connecter.hpp | 11 +++----- src/ipc_listener.cpp | 2 +- src/pair.cpp | 5 ++-- src/pair.hpp | 2 +- src/pub.cpp | 5 ++-- src/pub.hpp | 2 +- src/pull.cpp | 5 ++-- src/pull.hpp | 2 +- src/push.cpp | 5 ++-- src/push.hpp | 2 +- src/rep.cpp | 5 ++-- src/rep.hpp | 2 +- src/req.cpp | 5 ++-- src/req.hpp | 2 +- src/session_base.cpp | 53 ++++++++++++++++++++------------------- src/session_base.hpp | 11 ++++---- src/socket_base.cpp | 29 ++++++++++++++++++++- src/sub.cpp | 5 ++-- src/sub.hpp | 2 +- src/tcp_address.cpp | 8 +++--- src/tcp_address.hpp | 8 +++--- src/tcp_connecter.cpp | 24 ++++++++---------- src/tcp_connecter.hpp | 11 +++----- src/tcp_listener.cpp | 2 +- src/xpub.cpp | 5 ++-- src/xpub.hpp | 2 +- src/xrep.cpp | 5 ++-- src/xrep.hpp | 2 +- src/xreq.cpp | 5 ++-- src/xreq.hpp | 2 +- src/xsub.cpp | 5 ++-- src/xsub.hpp | 2 +- tests/Makefile.am | 4 ++- tests/test_connect_resolve.cpp | 54 ++++++++++++++++++++++++++++++++++++++++ 40 files changed, 292 insertions(+), 130 deletions(-) commit d092f2615c2133338097cb4f37d9809d2422a991 Author: Pieter Hintjens Date: Wed Feb 15 19:28:29 2012 -0600 Renamed peek/poke to get/set doc/Makefile.am | 2 +- doc/zmq.txt | 4 +-- doc/zmq_msg_get.txt | 83 ++++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_msg_peek.txt | 83 ---------------------------------------------- doc/zmq_msg_poke.txt | 47 -------------------------- doc/zmq_msg_set.txt | 47 ++++++++++++++++++++++++++ include/zmq.h | 8 ++--- src/zmq.cpp | 6 ++-- tests/test_msg_flags.cpp | 6 ++-- 9 files changed, 143 insertions(+), 143 deletions(-) commit dcc1725a90f324e3877e67f1455ef9f53f1c241d Author: Pieter Hintjens Date: Wed Feb 15 18:41:09 2012 -0600 Renamed zmq_getmsgopt to zmq_msg_peek * Added zmq_msg_poke for orthogonality * Added zmq_msg_more for simplicity * Fixed up man pages and test program doc/Makefile.am | 2 +- doc/zmq.txt | 12 ++++--- doc/zmq_getmsgopt.txt | 85 ---------------------------------------------- doc/zmq_msg_more.txt | 63 ++++++++++++++++++++++++++++++++++ doc/zmq_msg_peek.txt | 83 ++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_msg_poke.txt | 47 +++++++++++++++++++++++++ include/zmq.h | 10 ++++-- src/zmq.cpp | 47 +++++++++++++++++++------ tests/test_msg_flags.cpp | 8 +++-- 9 files changed, 249 insertions(+), 108 deletions(-) commit b3d7b29280fd062e681b24b946c00bbd6667889c Author: Pieter Hintjens Date: Wed Feb 15 16:47:24 2012 -0600 Renamed scatter/gather methods, cleaned up source include/zmq.h | 4 +- src/zmq.cpp | 119 ++++++++++++++++++++++++++++++++------------------------- 2 files changed, 70 insertions(+), 53 deletions(-) commit fb4748f257b19d19d9702a6632919d3915da0413 Author: Pieter Hintjens Date: Wed Feb 15 15:37:35 2012 -0600 Added zmq_msg_send/recv functions doc/Makefile.am | 1 + doc/zmq.txt | 4 ++ doc/zmq_msg_recv.txt | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_msg_send.txt | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/zmq.h | 4 ++ src/zmq.cpp | 48 +++++++++++-------- 6 files changed, 289 insertions(+), 18 deletions(-) commit 6b2ec366b1b96da14260000939946b12a7b085c6 Author: Pieter Hintjens Date: Wed Feb 15 15:17:01 2012 -0600 Changed return type of zmq_msg_size to ssize_t to allow error return include/zmq.h | 2 +- src/zmq.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d38951db8738d1cd7bf511decbee590e29a78fa8 Author: Pieter Hintjens Date: Wed Feb 15 13:03:40 2012 -0600 Return EFAULT if required arguments are null src/zmq.cpp | 65 ++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 18 deletions(-) commit b2e2fa622dc4b647442a6c41073783fa3340a780 Merge: 9bc0e10 0c4a19c Author: Chuck Remes Date: Wed Feb 15 08:54:27 2012 -0800 Merge pull request #244 from pieterh/master Cleanups to man pages commit 0c4a19c408964484a4bfcf389c07701ad040996a Author: Pieter Hintjens Date: Wed Feb 15 10:48:31 2012 -0600 Deprecated XREQ/XREP include/zmq.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5f6b95f4a22737c8dee415ec51ca0cca2d72170a Author: Pieter Hintjens Date: Wed Feb 15 10:06:53 2012 -0600 Fixed footers to refer to man page, not all docs doc/zmq_bind.txt | 4 ++-- doc/zmq_close.txt | 4 ++-- doc/zmq_connect.txt | 4 ++-- doc/zmq_errno.txt | 4 ++-- doc/zmq_getmsgopt.txt | 2 +- doc/zmq_getsockopt.txt | 4 ++-- doc/zmq_init.txt | 4 ++-- doc/zmq_inproc.txt | 4 ++-- doc/zmq_ipc.txt | 4 ++-- doc/zmq_msg_close.txt | 4 ++-- doc/zmq_msg_copy.txt | 4 ++-- doc/zmq_msg_data.txt | 4 ++-- doc/zmq_msg_init.txt | 4 ++-- doc/zmq_msg_init_data.txt | 4 ++-- doc/zmq_msg_init_size.txt | 4 ++-- doc/zmq_msg_move.txt | 4 ++-- doc/zmq_msg_size.txt | 4 ++-- doc/zmq_pgm.txt | 4 ++-- doc/zmq_poll.txt | 4 ++-- doc/zmq_setsockopt.txt | 4 ++-- doc/zmq_strerror.txt | 4 ++-- doc/zmq_tcp.txt | 4 ++-- doc/zmq_term.txt | 4 ++-- doc/zmq_version.txt | 4 ++-- 24 files changed, 47 insertions(+), 47 deletions(-) commit c85ecfc0662c2781cea1d763195b5194a29b244c Author: Pieter Hintjens Date: Wed Feb 15 10:06:04 2012 -0600 Cleaned up description of multi-part messages doc/zmq_recv.txt | 11 +++++------ doc/zmq_recvmsg.txt | 4 ++-- doc/zmq_send.txt | 16 +++++++--------- doc/zmq_sendmsg.txt | 10 +++++----- 4 files changed, 19 insertions(+), 22 deletions(-) commit 636de46fe129ba3e883026f402c545c5c62679e9 Author: Pieter Hintjens Date: Wed Feb 15 10:05:22 2012 -0600 Removed section on devices, added new methods doc/zmq.txt | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) commit 086c0594300589a19a55586259ef307bb97ebdbf Author: Pieter Hintjens Date: Wed Feb 15 09:49:40 2012 -0600 Ported numerous fixes from 2.1 man page doc/zmq_socket.txt | 109 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 42 deletions(-) commit 9bc0e1081831e58e9a40f41e1e04fbe94dd94ea7 Merge: a50a8aa bd4f703 Author: Chuck Remes Date: Wed Feb 15 07:33:03 2012 -0800 Merge pull request #243 from pieterh/master Fixed error in documentation build commit bd4f703264ed71f9ad2b0043c4e4c055adbeced1 Author: Pieter Hintjens Date: Wed Feb 15 09:27:42 2012 -0600 Ignored generated files .gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 2000d44109e1adfb3c6a2f9f947b061ba3267431 Author: Pieter Hintjens Date: Wed Feb 15 09:26:39 2012 -0600 Fixed syntax error in zmq_getsockopt man page doc/zmq_getsockopt.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a50a8aa364d9b99a1dc4950aea8ef1fe41d868ce Author: Pieter Hintjens Date: Tue Feb 14 17:14:46 2012 -0600 Revert "more checks for parameters of API functions" This reverts commit e646ce43c155f9710aa4486abd2daf6d4a30ca5b. src/zmq.cpp | 96 +++++------------------------------------------------------ 1 file changed, 8 insertions(+), 88 deletions(-) commit afe8cd503fa069b25c731cdeb507abf246ec7896 Author: Pieter Hintjens Date: Tue Feb 14 17:09:47 2012 -0600 Revert "fix warn unused" - anonymous contributor This reverts commit 7b7d404269cc9bb28e1954ed38dbeb8f63079fd1. src/blob.hpp | 5 ++--- src/ctx.cpp | 1 - src/dist.cpp | 1 - src/err.cpp | 1 - src/fq.cpp | 1 - src/io_object.cpp | 2 -- src/io_thread.cpp | 1 - src/lb.cpp | 1 - src/object.cpp | 8 -------- src/pair.cpp | 4 ---- src/pipe.cpp | 1 - src/pub.cpp | 2 -- src/pull.cpp | 1 - src/push.cpp | 1 - src/reaper.cpp | 1 - src/session_base.cpp | 1 - src/socket_base.cpp | 11 ----------- src/sub.cpp | 2 -- src/xpub.cpp | 1 - src/xrep.cpp | 2 -- src/xreq.cpp | 1 - src/xsub.cpp | 1 - 22 files changed, 2 insertions(+), 48 deletions(-) commit b2e93473723ce74f247d1a63eb61312a5c07f6d8 Merge: a908ccb cc10c00 Author: Pieter Hintjens Date: Tue Feb 14 16:39:32 2012 -0800 Merge pull request #238 from ianbarber/master Wildcard support in TCP and IPC addresses commit cc10c00193525cd1d253a50ac3055f1af1684e82 Author: Ian Barber Date: Tue Feb 14 23:14:33 2012 +0000 Updating docs with new sockopt doc/zmq_getsockopt.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b6c97230ed560a3b4140b0542be9f3482eab7066 Merge: b5d3373 a908ccb Author: Ian Barber Date: Tue Feb 14 23:10:15 2012 +0000 Merge branch 'master' of https://github.com/zeromq/libzmq commit b5d3373905587aecc53e032e5619c1550952030f Author: Ian Barber Date: Tue Feb 14 23:10:06 2012 +0000 Moving to std::string in options include/zmq.h | 3 --- src/ipc_listener.cpp | 5 +++-- src/ipc_listener.hpp | 2 +- src/options.cpp | 8 ++++---- src/options.hpp | 5 +++-- src/socket_base.cpp | 5 +++-- src/tcp_listener.cpp | 10 +++++++--- src/tcp_listener.hpp | 2 +- 8 files changed, 22 insertions(+), 18 deletions(-) commit a908ccbf357ae5afe61aef24db2724d93b7747ce Merge: 48423c9 4807935 Author: Pieter Hintjens Date: Mon Feb 13 08:55:58 2012 -0800 Merge pull request #241 from skaller/master provide type safe sockets and contexts commit 48423c9e40e5f777ab4335cbeccf012371ce3f95 Merge: 256fa5d e646ce4 Author: Pieter Hintjens Date: Mon Feb 13 08:35:59 2012 -0800 Merge pull request #242 from niXman/master more checks for parameters of API functions commit e646ce43c155f9710aa4486abd2daf6d4a30ca5b Author: niXman Date: Sun Feb 12 20:10:52 2012 +0400 more checks for parameters of API functions src/zmq.cpp | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 88 insertions(+), 8 deletions(-) commit 4807935605ab1f1e1c440d29423c84d4f13f73d7 Author: skaller Date: Sun Feb 12 10:15:51 2012 +1100 Implement type safe sockets and contexts. include/zmq.h | 59 +++++++++++++++++++++++++++++++++++++++++---------------- src/zmq.cpp | 2 ++ 2 files changed, 45 insertions(+), 16 deletions(-) commit 770f84331f7a1ce03e87786f976a526af07c965f Author: Ian Barber Date: Sat Feb 11 15:09:03 2012 +0000 Allowing value 0, and moving code to get_address functions based on feedback AUTHORS | 1 + src/ipc_listener.cpp | 21 ++++++++++++--------- src/ipc_listener.hpp | 4 ---- src/tcp_address.cpp | 3 ++- src/tcp_listener.cpp | 50 +++++++++++++++++++++++++------------------------- src/tcp_listener.hpp | 6 +----- 6 files changed, 41 insertions(+), 44 deletions(-) commit 91bf4944daa7446e21aea2cf9bc261ce29d35212 Merge: 7fa14f3 256fa5d Author: Ian Barber Date: Sat Feb 11 15:08:23 2012 +0000 Merge branch 'master' of https://github.com/zeromq/libzmq commit 256fa5d2b8a2d9ff46d67d02d9a2f7dffbbb2221 Merge: 40052c1 7b7d404 Author: Chuck Remes Date: Sat Feb 11 06:10:50 2012 -0800 Merge pull request #240 from niXman/master fix warn unused variables commit 7b7d404269cc9bb28e1954ed38dbeb8f63079fd1 Author: niXman Date: Fri Feb 10 13:39:34 2012 +0400 fix warn unused src/blob.hpp | 5 +++-- src/ctx.cpp | 1 + src/dist.cpp | 1 + src/err.cpp | 1 + src/fq.cpp | 1 + src/io_object.cpp | 2 ++ src/io_thread.cpp | 1 + src/lb.cpp | 1 + src/object.cpp | 8 ++++++++ src/pair.cpp | 4 ++++ src/pipe.cpp | 1 + src/pub.cpp | 2 ++ src/pull.cpp | 1 + src/push.cpp | 1 + src/reaper.cpp | 1 + src/session_base.cpp | 1 + src/socket_base.cpp | 11 +++++++++++ src/sub.cpp | 2 ++ src/xpub.cpp | 1 + src/xrep.cpp | 2 ++ src/xreq.cpp | 1 + src/xsub.cpp | 1 + 22 files changed, 48 insertions(+), 2 deletions(-) commit 40052c1251053e28a7b2b4f517db4d74a393d3ba Merge: 21571cf c3f7543 Author: Pieter Hintjens Date: Fri Feb 10 00:20:56 2012 -0800 Merge pull request #239 from skaller/master Provide scatter/gather array I/O commit 7fa14f3823e572c335565a168127326f12d3250a Merge: 7b32c9c 21571cf Author: Ian Barber Date: Wed Feb 8 22:06:50 2012 +0000 Merge branch 'master' of https://github.com/zeromq/libzmq commit 7b32c9cb51dc97e3c467801843fa9ed1736ba8bd Author: Ian Barber Date: Wed Feb 8 22:06:46 2012 +0000 Adding ZMQ_LAST_ENDPOINT for wildcard support on TCP and IPC sockets include/zmq.h | 4 ++++ src/ipc_listener.cpp | 20 ++++++++++++++++++++ src/ipc_listener.hpp | 7 +++++++ src/options.cpp | 12 ++++++++++-- src/options.hpp | 4 ++++ src/socket_base.cpp | 4 ++++ src/tcp_address.cpp | 16 +++++++++++----- src/tcp_listener.cpp | 32 ++++++++++++++++++++++++++++++++ src/tcp_listener.hpp | 7 +++++++ 9 files changed, 99 insertions(+), 7 deletions(-) commit c3f7543ebe08cfdadf218fa558f03a5d382d322c Author: skaller Date: Wed Feb 8 13:15:47 2012 +1100 Fix uio support. We have to use an incomplete type in the interface. The definition of iovec is only in the implementation. This appears to following existing practice in 0MQ. It seems a bit flakey that zmq.h is not included in zmq.cpp, which is normal practice to ensure the implementation matches the specified interface. YMMV. I follow 0MQ style. include/zmq.h | 11 ----------- src/zmq.cpp | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) commit 970a00539930f1c047ed8cc684fe64885fbf7020 Author: skaller Date: Wed Feb 8 12:58:35 2012 +1100 Provide interface. Also move iovec definition from implementation to interface. Not clear to me at present if an incomplete type should be used to avoid gratuitously including in the interface. The interface can't be used with this include. include/zmq.h | 14 ++++++++++++++ src/zmq.cpp | 10 ---------- 2 files changed, 14 insertions(+), 10 deletions(-) commit 383a49dadf4e9c2c7fea84d521eeb42c0f5bf6de Author: skaller Date: Wed Feb 8 11:45:36 2012 +1100 Implement zmq_recvmmsg. src/zmq.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) commit 531835bba887722110d87e1dc912592cf9e49a50 Author: skaller Date: Wed Feb 8 03:20:25 2012 +1100 Implement zmq_sendv. Posix style send multiple messages using scatter/gather array. src/zmq.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit f59fff7bf26da65c2e1c5f259326f7daf8e4d3a0 Author: skaller Date: Wed Feb 8 02:47:51 2012 +1100 Add check for sys/uio.h to configure script. sys/uio.h contains the XSI vector I/O data structure. configure.in | 3 +++ 1 file changed, 3 insertions(+) commit 21571cf0855d5ef8c52aee5a854b79d7fc66a603 Merge: 9dab56c 81662d7 Author: Pieter Hintjens Date: Sat Feb 4 02:47:10 2012 -0800 Merge pull request #237 from skaller/master Fix comments to conform to style guide. commit 81662d70be2014b947f1c63308d819c3f85f6a2a Author: skaller Date: Sat Feb 4 15:13:36 2012 +1100 Add a test for thread safe sockets. tests/Makefile.am | 2 + tests/test_ts_context.cpp | 129 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) commit 759b2e01fd03b171f63d37b908a4a530ab44420b Author: skaller Date: Sat Feb 4 12:34:06 2012 +1100 Fix comments to conform to style guide. src/zmq.cpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 9dab56c1df5e41acb1a59f21261dd61594fb7a07 Merge: cbf6126 520ad3c Author: Pieter Hintjens Date: Fri Feb 3 12:40:05 2012 -0800 Merge pull request #235 from skaller/master Thread Safe Sockets. commit cbf6126b086123d122355068a5d5d5dded770af9 Merge: 935f174 43b71ae Author: Pieter Hintjens Date: Fri Feb 3 12:39:47 2012 -0800 Merge pull request #234 from ianbarber/master Semicolon missing commit 935f17488a460e9fa497384f18bc34ecc9e6635a Merge: dc50bf5 67fd4c9 Author: Pieter Hintjens Date: Fri Feb 3 12:39:11 2012 -0800 Merge pull request #236 from danielnorberg/master add missing semicolon commit 67fd4c9a2c9494e14c12ebb53c1b70042931bc9c Author: Daniel Norberg Date: Fri Feb 3 17:28:45 2012 +0100 add missing semicolon src/xpub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 520ad3c2d7966ad868354c0ad66b76a3e408f568 Author: skaller Date: Sat Feb 4 02:17:35 2012 +1100 Set and arrange propagation of thread safe sockets flag. We use a distinct context initialisation function to specify all sockets derived therefrom will be thread safe. However the inheritance is done exclusively in the C interface. This is not really correct, but it is chosen to minimise interference with the existing C++ code, including any construct or other calls within the C++ code base. Semantically the C++ code should be unchanged, physically some data structures and extra methods are provided by they're only used from the C binding. include/zmq.h | 1 + src/ctx.cpp | 10 ++++++++++ src/ctx.hpp | 6 ++++++ src/socket_base.cpp | 5 +++++ src/socket_base.hpp | 1 + src/zmq.cpp | 21 ++++++++++++++++++--- 6 files changed, 41 insertions(+), 3 deletions(-) commit 988efbc73a2f4f0d8f8b380da61b73b5affaeccd Author: skaller Date: Sat Feb 4 01:41:09 2012 +1100 Thread Safe Sockets. 1. Reorganise C API socket functions to eliminate bad practice of public functions calling other public functions. This should be done for msg's too but hasn't been in this patch. 2. Reorganise code in C API socket functions so that the socket is cast on one line, the C++ function called on the next with the result retained, then the result is returned. This makes the code much simpler to read and also allows pre- and post- call hooks to be inserted easily. 3. Insert pre- and post- call hooks which set and release a mutex iff the thread_safe flag is on. 4. Add the thread_safe_flag to base_socket_t initialised to false to preserve existing semantics. Add an accessor for the flag, add a mutex, and add lock and unlock functions. Note: as yet no code to actually set the flag. src/socket_base.cpp | 13 +++++- src/socket_base.hpp | 6 ++- src/zmq.cpp | 112 ++++++++++++++++++++++++++++++++++++--------------- 3 files changed, 96 insertions(+), 35 deletions(-) commit 4dd6ce0639da832927ab68cfb7226c21808f0034 Author: skaller Date: Sat Feb 4 00:10:01 2012 +1100 Add mission ; character src/xpub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43b71ae4bf5b4b1a046c6549483f59ef03883d5a Author: Ian Barber Date: Fri Feb 3 12:44:19 2012 +0000 Fixing missing semicolon in xpub.cpp as reported on the list by Emmanuel TAUREL src/xpub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc50bf5dca6b4c1c9b0c5e4d62f6f3854ffbdaef Merge: 4f4d72a 79f753b Author: Pieter Hintjens Date: Fri Feb 3 02:12:09 2012 -0800 Merge pull request #233 from danielnorberg/master LIBZMQ-300: free received subscription messages commit 79f753bf56222e65ca497f5253434f11489c51da Author: Daniel Norberg Date: Mon Dec 19 15:45:44 2011 +0100 xpub: free received subscription messages src/xpub.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4f4d72afc62d35638eed0ce1a4deebe9ac587e3b Merge: adee827 93db782 Author: Chuck Remes Date: Thu Feb 2 12:22:46 2012 -0800 Merge pull request #232 from chuckremes/master mato: merge patch to close libzmq-268 commit 93db782a1d22451a53b94b514946eea391a69d63 Merge: 762bcff 0319cb2 Author: Chuck Remes Date: Thu Feb 2 14:17:30 2012 -0600 Merge branch 'libzmq-268' of git://git.lucina.net/libzmq commit adee8270ddd5af7eb2ba3fe5f251873b30eb00b4 Merge: e89a5f1 762bcff Author: Chuck Remes Date: Thu Feb 2 12:16:32 2012 -0800 Merge pull request #231 from chuckremes/master mato: merge patch to close libzmq-303 commit 762bcff73f29269b92eee18ffd5455a8e77ce3bb Merge: c54ad48 029e288 Author: Chuck Remes Date: Thu Feb 2 14:14:56 2012 -0600 Merge branch 'libzmq-303' of git://git.lucina.net/libzmq commit e89a5f1e1aae0b820d8cd74d3de3cdc509a1a198 Merge: edf7db7 c54ad48 Author: Chuck Remes Date: Thu Feb 2 12:14:27 2012 -0800 Merge pull request #230 from chuckremes/master mato: merge patch to close libzmq-205 commit c54ad48c9b70fd8a28fa2300b79aadbcd39b65db Merge: edf7db7 c34a144 Author: Chuck Remes Date: Thu Feb 2 14:09:37 2012 -0600 Merge branch 'libzmq-205' of git://git.lucina.net/libzmq commit 0319cb2cd16aa40911855a1765312886bf081db2 Author: Martin Lucina Date: Thu Feb 2 13:07:48 2012 +0100 Fix data loss for PUB/SUB and unidirectional transports (LIBZMQ-268) With the introduction of subscription forwarding, the first message sent on a PUB socket using a unidirectional transport (e.g. PGM) is always lost due to the "subscribe to all" being done asynchronously. This patch fixes the problem and also refactors the code to have a single point where the "subscribe to all" is performed. Signed-off-by: Martin Lucina src/pair.cpp | 2 +- src/pair.hpp | 2 +- src/pgm_sender.cpp | 10 ---------- src/pull.cpp | 2 +- src/pull.hpp | 2 +- src/push.cpp | 2 +- src/push.hpp | 2 +- src/socket_base.cpp | 12 +++++++++--- src/socket_base.hpp | 5 +++-- src/xpub.cpp | 7 ++++++- src/xpub.hpp | 2 +- src/xrep.cpp | 2 +- src/xrep.hpp | 2 +- src/xreq.cpp | 2 +- src/xreq.hpp | 2 +- src/xsub.cpp | 2 +- src/xsub.hpp | 2 +- 17 files changed, 31 insertions(+), 29 deletions(-) commit edf7db74d933f753d14dd4c8e5de0e8081624118 Merge: 7e8a839 e6c97c5 Author: Pieter Hintjens Date: Mon Jan 30 01:28:47 2012 -0800 Merge pull request #227 from gimaker/smaller-mtrie Reduce memory usage of mtrie. commit e6c97c5ecc3f2b9e84258cb405eb92f6b6f6ca7d Author: Staffan GimÃ¥ker Date: Tue Jan 3 16:34:45 2012 +0100 Reduce memory usage of mtrie. Signed-off-by: Staffan GimÃ¥ker src/mtrie.cpp | 39 +++++++++++++++++++++++++++++---------- src/mtrie.hpp | 2 +- 2 files changed, 30 insertions(+), 11 deletions(-) commit 1925c92fe9c50c40b083749f8ff9521abcce72b5 Merge: c34a144 029e288 Author: Martin Lucina Date: Mon Jan 30 01:57:18 2012 +0100 Merge branches 'libzmq-205' and 'libzmq-303' commit 7e8a839a22f5d94b89a47ff187fa933a6bbc4395 Merge: 281dcd2 1e5a48f Author: Pieter Hintjens Date: Fri Jan 27 16:01:20 2012 -0800 Merge pull request #226 from gitfoxi/master Support Epoll on cross-compile without runtime test. commit 1e5a48f5217edf874d5771b29ceb7680a930d4b3 Author: m <415fox@gmail.com> Date: Fri Jan 27 15:24:47 2012 -0800 Epoll is default for cross-compile. For regular-compile, test kernel (run) support. acinclude.m4 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 281dcd25448dc524bb1f001ad7c57d70a4fa79ab Merge: 676d4f4 1d8b132 Author: Pieter Hintjens Date: Fri Jan 27 14:48:43 2012 -0800 Merge pull request #221 from fidlej/master Updated connector open() doc strings. commit 676d4f4e18da8cd1299d9161d78b7a15c6cd50fd Merge: 0c94cd0 bc4d1b6 Author: Pieter Hintjens Date: Fri Jan 27 14:48:17 2012 -0800 Merge pull request #222 from gimaker/trie-pruning Fix for LIBZMQ-305 commit 0c94cd036a843acce4252bf2583e1ddb472bb778 Merge: 95f6a07 3621565 Author: Pieter Hintjens Date: Fri Jan 27 14:47:36 2012 -0800 Merge pull request #223 from gimaker/libzmq-310 Throw away unexpected data received by XPUB sockets, rather than asserting commit 95f6a074036bab70872798c25e033564aaf6836d Merge: 57f64c5 2e0c433 Author: Pieter Hintjens Date: Fri Jan 27 14:47:14 2012 -0800 Merge pull request #224 from vortechs2000/master Patch from Mikko Koppanen for #LIBZMQ-301 commit 57f64c50795a43d1c22a6b7bb41dd280c0e3f436 Merge: 6f32361 c71375e Author: Pieter Hintjens Date: Fri Jan 27 14:44:42 2012 -0800 Merge pull request #225 from gitfoxi/master Fix build on old-ass Linux commit c71375ea72da9ba480bda49a7e3ba07d196f745d Author: m <415fox@gmail.com> Date: Fri Jan 27 13:27:21 2012 -0800 Fix: Case where system library has epoll but kernel does not support it. acinclude.m4 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c4f22408518347ba47b878090de3f94a4b554267 Author: m <415fox@gmail.com> Date: Fri Jan 27 12:40:56 2012 -0800 Fix: runtime patch for when system has clock_gettime but does not support CLOCK_MONOTONIC. src/clock.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit b5dbff8ed4ff6bdc6bdc68987f71983e3b6c32d3 Author: m <415fox@gmail.com> Date: Fri Jan 27 12:24:14 2012 -0800 Fix basic_string not implemented in stdc++ 3 src/blob.hpp | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit 99df984be1660eb52e985b55beb0bca87ccec83d Author: m <415fox@gmail.com> Date: Fri Jan 27 12:23:32 2012 -0800 Fix bad combination of gcc3, -Werror and private destructor. src/ctx.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc4d1b6002775375ccc11f63ec703a29437105ac Author: Staffan GimÃ¥ker Date: Thu Jan 26 13:26:09 2012 +0100 Fixed segfault bug sometimes happening when pruning the trie/mtrie. The cause behind the segfault was next.node being deleted but count still being non-zero. Signed-off-by: Staffan GimÃ¥ker src/mtrie.cpp | 23 +++++++++++++++-------- src/trie.cpp | 11 ++++++++--- 2 files changed, 23 insertions(+), 11 deletions(-) commit 2e0c4330fa3d1044ca3d89a0f1798a88b7cc3215 Author: AJ Lewis Date: Thu Jan 19 12:27:19 2012 -0600 Patch from Mikko Koppanen for #LIBZMQ-301 Add the '-Ae' flag and check for gethrtime() on HPUX Check if CLOCK_MONOTONIC defined before using it - if not, use gethrtime() if it's available, otherwise fall back to the old behavior. Signed-off-by: AJ Lewis configure.in | 2 ++ src/clock.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 36215656eb586a505d051dd60500e92d0f710f07 Author: Staffan GimÃ¥ker Date: Mon Jan 9 12:19:59 2012 +0100 Throw away unexpected data received by XPUB sockets, rather than asserting. Fixes LIBZMQ-310. Signed-off-by: Staffan GimÃ¥ker src/xpub.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit c34a1443651ce5a6d8f7a88d0677ec85c81e1570 Author: Martin Lucina Date: Wed Jan 4 11:48:41 2012 +0100 Fix pgm_receiver.cpp: zmq_assert (pending_bytes == 0) (LIBZMQ-205) This patch fixes the problem described in LIBZMQ-205. The assertion itself is probably caused by previously queued POLLIN events arriving after POLLIN has been disabled on the socket. The following additional bugs have been fixed as part of debugging this problem: - pgm_receiver_t does not flush messages written to the session in all cases which can lead to a stalled reader. Add calls to session->flush () in the appropriate places. - ensure to restart polling when a pending message is flushed in activate_in (). Signed-off-by: Martin Lucina src/pgm_receiver.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 19129edc60b09576699120a6c0637ae8c73c9bd4 Author: Staffan GimÃ¥ker Date: Tue Jan 3 16:24:44 2012 +0100 Prune redundant nodes in the trie. Signed-off-by: Staffan GimÃ¥ker src/trie.cpp | 25 ++++++++++++++++++++++--- src/trie.hpp | 3 +++ 2 files changed, 25 insertions(+), 3 deletions(-) commit 6fa9ffebe5d4cf0bba051f464b8c8054cffc2b72 Author: Staffan GimÃ¥ker Date: Tue Jan 3 16:24:16 2012 +0100 Prune redundant nodes in the mtrie. Signed-off-by: Staffan GimÃ¥ker src/mtrie.cpp | 35 ++++++++++++++++++++++++++++++++--- src/mtrie.hpp | 3 +++ 2 files changed, 35 insertions(+), 3 deletions(-) commit 029e28865dd47895e6919ce1c3e12c95ea56ad32 Author: Martin Lucina Date: Sun Dec 25 02:57:04 2011 +0100 Fix assertion in pgm_sender_t::plug() (LIBZMQ-303) Opening any PGM socket gives this assertion. The problem is in pgm_sender_t::plug() which is incorrectly testing the return value from session::write(). Signed-off-by: Martin Lucina src/pgm_sender.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d8b132d368119cd0cb8219e8cd90d8d35f0d647 Author: Ivo Danihelka Date: Wed Dec 21 16:21:55 2011 +0100 Updated connector open() doc strings. Signed-off-by: Ivo Danihelka src/ipc_connecter.cpp | 2 +- src/ipc_connecter.hpp | 6 +++--- src/tcp_connecter.cpp | 2 +- src/tcp_connecter.hpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 6f32361fea61619fec94348de693a9e3ff8981e0 Author: Martin Sustrik Date: Mon Dec 19 15:43:38 2011 +0100 Version bumped to 3.1.1 Signed-off-by: Martin Sustrik include/zmq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3fbe0113d8b39cd2d23837882fba1ea40d22811 Merge: adc0712 dcb1d55 Author: Martin Lucina Date: Sun Dec 18 12:46:03 2011 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit dcb1d558a50c58dc9f3149ffa6bba65199c0200f Author: Martin Sustrik Date: Sun Dec 18 12:30:31 2011 +0100 Fix MSVC10 build distfiles Signed-off-by: Martin Sustrik builds/msvc/Makefile.am | 33 ++++- builds/msvc/zmq_forwarder/zmq_forwarder.vcproj | 176 ------------------------ builds/msvc/zmq_queue/zmq_queue.vcproj | 176 ------------------------ builds/msvc/zmq_streamer/zmq_streamer.vcproj | 176 ------------------------ 4 files changed, 26 insertions(+), 535 deletions(-) commit 3bf7860fb783c38503c013dbad05ad2ff54f5a16 Author: Martin Sustrik Date: Sun Dec 18 11:41:45 2011 +0100 NEWS updated for 3.1.0 release Signed-off-by: Martin Sustrik NEWS | 637 ++++++++++-------------------------------------------------------- 1 file changed, 90 insertions(+), 547 deletions(-) commit 22ef966d4aab3448d4debf524afbdaa19f37dff0 Author: Martin Lucina Date: Sun Dec 18 11:19:55 2011 +0100 Update email address in man pages Signed-off-by: Martin Lucina doc/zmq.txt | 2 +- doc/zmq_bind.txt | 2 +- doc/zmq_close.txt | 2 +- doc/zmq_connect.txt | 2 +- doc/zmq_errno.txt | 2 +- doc/zmq_getsockopt.txt | 2 +- doc/zmq_init.txt | 2 +- doc/zmq_inproc.txt | 2 +- doc/zmq_ipc.txt | 2 +- doc/zmq_msg_close.txt | 2 +- doc/zmq_msg_copy.txt | 2 +- doc/zmq_msg_data.txt | 2 +- doc/zmq_msg_init.txt | 2 +- doc/zmq_msg_init_data.txt | 2 +- doc/zmq_msg_init_size.txt | 2 +- doc/zmq_msg_move.txt | 2 +- doc/zmq_msg_size.txt | 2 +- doc/zmq_pgm.txt | 2 +- doc/zmq_poll.txt | 2 +- doc/zmq_recv.txt | 2 +- doc/zmq_recvmsg.txt | 2 +- doc/zmq_send.txt | 2 +- doc/zmq_sendmsg.txt | 2 +- doc/zmq_setsockopt.txt | 2 +- doc/zmq_socket.txt | 2 +- doc/zmq_strerror.txt | 2 +- doc/zmq_tcp.txt | 2 +- doc/zmq_term.txt | 2 +- doc/zmq_version.txt | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) commit 183e126364762eb7b6fcc96c87d060c8e09044b5 Author: Martin Lucina Date: Sun Dec 18 11:12:44 2011 +0100 Fix typo in zmq_sendmsg(3) manual page Signed-off-by: Martin Lucina doc/zmq_sendmsg.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adc07128e6d493dc29a76f88db3870aaea0fc795 Merge: bfbd16d 3fbe8ac Author: Martin Lucina Date: Sun Dec 18 11:06:19 2011 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit 3fbe8ac3c3aaec777c305de8fbdc0d748c3b14aa Author: Martin Sustrik Date: Sat Dec 17 23:42:45 2011 +0100 Dont wait for pending subscription commands on shutdown When (X)SUB socket is being shut down there may be pending outbound subscription commands in the pipes. In such case we want to close the socket immediately instead of waiting for the commands to be sent. Signed-off-by: Martin Sustrik src/xsub.cpp | 5 +++++ 1 file changed, 5 insertions(+) commit bfbd16d099cc045d4a4745e9a6f28221a0e3bd95 Merge: 82d9353 91fdedf Author: Martin Lucina Date: Sat Dec 17 11:59:29 2011 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit 91fdedf25c4d76b0ec0aeb5d1d9f1c9a1a769447 Author: Martin Sustrik Date: Sat Dec 17 10:14:32 2011 +0100 Fix polling on XREP socket When polling on XREP socket in incoming message part was prefetched, but not the identity of sender. The problem is fixed by this patch. Signed-off-by: Martin Sustrik src/xrep.cpp | 45 ++++++++++++++++++++++++++++++++++++--------- src/xrep.hpp | 8 ++++++-- 2 files changed, 42 insertions(+), 11 deletions(-) commit f9eb763293014f812dac5558be5c5f03bb896efb Author: Martin Sustrik Date: Fri Dec 16 07:04:38 2011 +0100 zmq_sendmsg and zmq_recvmsg checks for NULL message object Signed-off-by: Martin Sustrik src/socket_base.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3fb5c11b03119a157db8dc024809943f88f87320 Author: Stuart Webster Date: Thu Dec 15 14:03:43 2011 +0100 Added MSVC10 solution and project files for Windows These include configurations for both Win32 and x64 platforms. All project settings have been normalised in property sheets (the ".props" files under builds/msvc/properties) to simplify maintenance. Build artefacts are all generated in platform-specific subfolders of bin, lib and obj directories. Also enables the use of precompiled headers with MSVC10. This significantly reduces the time required to compile libzmq with Visual Studio on Windows. It should have no impact on other platforms. Signed-off-by: Stuart Webster .gitignore | 1 + builds/msvc/c_local_lat/c_local_lat.vcxproj | 87 +++++++++ builds/msvc/c_local_thr/c_local_thr.vcxproj | 87 +++++++++ builds/msvc/c_remote_lat/c_remote_lat.vcxproj | 87 +++++++++ builds/msvc/c_remote_thr/c_remote_thr.vcxproj | 87 +++++++++ builds/msvc/inproc_lat/inproc_lat.vcxproj | 86 +++++++++ builds/msvc/inproc_thr/inproc_thr.vcxproj | 86 +++++++++ builds/msvc/libzmq/libzmq.vcxproj | 241 +++++++++++++++++++++++++ builds/msvc/libzmq/libzmq.vcxproj.filters | 13 ++ builds/msvc/msvc10.sln | 116 ++++++++++++ builds/msvc/properties/Common.props | 21 +++ builds/msvc/properties/Debug.props | 19 ++ builds/msvc/properties/Dynamic.props | 20 ++ builds/msvc/properties/Executable.props | 19 ++ builds/msvc/properties/Precompiled.props | 14 ++ builds/msvc/properties/Release.props | 22 +++ builds/msvc/properties/Win32.props | 12 ++ builds/msvc/properties/Win32_Release.props | 17 ++ builds/msvc/properties/WithOpenPGM.props | 12 ++ builds/msvc/properties/ZeroMQ.props | 23 +++ builds/msvc/properties/x64.props | 12 ++ src/precompiled.cpp | 21 +++ src/precompiled.hpp | 47 +++++ src/windows.hpp | 3 + 24 files changed, 1153 insertions(+) commit a9e03336b020d2e6a83338b111092e65aa812f95 Author: Martin Lucina Date: Thu Dec 15 13:23:40 2011 +0100 A synchronous connect() failure in ipc_connecter can result in Assertion failed: s == retired_fd (ipc_connecter.cpp:174), as reported in LIBZMQ-294. This patch fixes the bug, and also an identical problem in tcp_connecter which has not hit people since TCP connect() usually completes via the asynchronous code path (poll, out_event). Signed-off-by: Martin Lucina src/ipc_connecter.cpp | 1 + src/tcp_connecter.cpp | 1 + 2 files changed, 2 insertions(+) commit 82d935309eede60777b59af9df7a50576916d01f Author: Martin Lucina Date: Wed Dec 14 00:00:32 2011 +0100 Fix synchronous connect failure for ipc://, tcp:// (LIBZMQ-294) A synchronous connect() failure in ipc_connecter can result in Assertion failed: s == retired_fd (ipc_connecter.cpp:174), as reported in LIBZMQ-294. This patch fixes the bug, and also an identical problem in tcp_connecter which has not hit people since TCP connect() usually completes via the asynchronous code path (poll, out_event). Signed-off-by: Martin Lucina src/ipc_connecter.cpp | 1 + src/tcp_connecter.cpp | 1 + 2 files changed, 2 insertions(+) commit c90f54e6a66ead6c6dc949eaab58d1bfb23b0da1 Merge: b4f5ee5 e7d748e Author: Martin Lucina Date: Sun Dec 11 23:09:48 2011 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit e7d748e812a7259bd4030517fde79be202d2a16d Author: Martin Sustrik Date: Sat Dec 3 13:27:20 2011 +0100 Mika Fischer added to AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 0df86c41b5f2e428b6237bcc1e28304ea0149097 Author: Martin Sustrik Date: Sat Dec 3 13:25:44 2011 +0100 rt library required on all platforms Signed-off-by: Martin Sustrik configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaac96d94a81fb5debe24200e20c353217baec9c Author: Mika Fischer Date: Sat Dec 3 13:07:30 2011 +0100 This makes clock_t insensitive to the system clock being reset by NTP or the sysadmin, which could previously cause long hangs for instance in zmq_poll. Signed-off-by: Mika Fischer configure.in | 5 +++-- src/clock.cpp | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) commit b4f5ee58a9e0ad4ad9f872b8fcc6797e1b6f4e04 Merge: 90d0435 fc17bd4 Author: Martin Lucina Date: Wed Nov 30 19:34:11 2011 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit fc17bd4117c19b027790951ac1df1a141bce9d82 Author: Martin Sustrik Date: Tue Nov 22 14:48:35 2011 +0100 ENOTCONN on recv() on TCP socket is treated decently (issue 254) Signed-off-by: Martin Sustrik src/stream_engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit daac9ac5b2f864f61615a4e93caf49e6ea187cda Author: Martin Sustrik Date: Mon Nov 21 08:11:33 2011 +0100 Phillip Kovacs added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit bf9062902c776c0c6029ef42c6ba0c7179bf0425 Author: Philip Kovacs Date: Mon Nov 21 08:10:03 2011 +0100 Fix broken VPATH/parallel builds Signed-off-by: Philip Kovacs doc/Makefile.am | 8 ++++---- perf/Makefile.am | 3 ++- tests/Makefile.am | 4 +++- 3 files changed, 9 insertions(+), 6 deletions(-) commit 5c1a91e33e552b136a0a72027ef27f41de95dcb8 Author: Martin Sustrik Date: Sat Nov 19 10:06:06 2011 +0100 Stuart Webster added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit a610b3d1b4d975bbffc74604aa43f793dfd3f301 Author: Stuart Webster Date: Sat Nov 19 10:02:23 2011 +0100 Line-ending conversion rules for hg-git users and enabled use of .gitignore by hg-git users Mercurial does not have built-in support for converting line-endings. This is a settings file for hg eol (http://mercurial.selenic.com/wiki/EolExtension), an extension that replicates the behaviour of git with core.autocrlf=true. Mercurial uses Python regex syntax by default in its .hgignore files. Adding this line to .gitignore overrides that setting, so hg-git users can just create a hardlink to it (e.g "mklink /H .hgignore .gitignore" on Windows) to use it. Signed-off-by: Stuart Webster .gitignore | 1 + .hgeol | 2 ++ 2 files changed, 3 insertions(+) commit f8bd3967bfe305c22b6e08f3e6555b2162609328 Author: Martin Sustrik Date: Wed Nov 16 19:49:31 2011 +0100 Documentation for IPv4ONLY option clarified Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 2 +- doc/zmq_setsockopt.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5a6503e5c275c544e1447401e17a4746985614ea Author: Martin Sustrik Date: Tue Nov 15 13:56:59 2011 +0100 Bug in XREP and XREQ fixed (issue 280) Signed-off-by: Martin Sustrik src/xrep.cpp | 2 +- src/xreq.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 83975c1b21722bb689c7b84cde5a6958145fcbd4 Author: Martin Sustrik Date: Tue Nov 15 08:40:46 2011 +0100 Missing "defined" tokens added The missing tokens broke the build if you used -Werror -Wundef Signed-off-by: Martin Sustrik src/tcp_address.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21bca4dbe48cffdaa1e1108600973559a3b880d2 Author: Martin Sustrik Date: Mon Nov 14 11:15:20 2011 +0100 Bug concerining identity in XREQ socket fixed (issue 280) Signed-off-by: Martin Sustrik src/xreq.cpp | 26 ++++++++++++++++++++++++-- src/xreq.hpp | 6 ++++++ 2 files changed, 30 insertions(+), 2 deletions(-) commit 1c239708ab174c1de9f99e256d23158f74a24dbc Author: Martin Sustrik Date: Sun Nov 13 10:33:49 2011 +0100 Couple of bugs in XREP handling of identities fixed. wq: Signed-off-by: Martin Sustrik src/xrep.cpp | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit f8b005502699aa069406923701af685cc156d3c2 Author: Martin Sustrik Date: Thu Nov 10 23:38:08 2011 +0100 Hangup in signaler creation on Windows fixed Signed-off-by: Martin Sustrik src/signaler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90d0435b564e3c44b63980778ed1815a4451174e Merge: 991f7e2 a7b0b0d Author: Martin Lucina Date: Wed Nov 9 17:46:00 2011 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit a7b0b0d3dc1003fdd6f9538afda8fb4a5bbc5d41 Author: Martin Sustrik Date: Wed Nov 9 15:41:51 2011 +0100 AUTHORS file changed - AJ Lewis added - Martin Lucina's email address changed Signed-off-by: Martin Sustrik AUTHORS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 27524908c17b7db965f8aaa2bde513643378e372 Author: Martin Lucina Date: Wed Nov 9 15:39:33 2011 +0100 Set libzmq ABI version to 3 libzmq master (3.1) is not ABI compatible with libzmq 2.1.x or 3.0 (removed functionality), hence the ABI version needs to be set to 3. Signed-off-by: Martin Lucina configure.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c79abee6bcaa996f50be71bd1d3075e3affb469d Author: AJ Lewis Date: Wed Nov 9 15:22:20 2011 +0100 Get AIX 6.1 compiling again by making msg_t class explicit Older versions of gcc have problems with in-line forward declarations when there's a naming conflict with a global symbol. Signed-off-by: AJ Lewis Expand the original patch to all such forward declarations. Signed-off-by: Martin Sustrik src/command.hpp | 16 ++++++++---- src/ctx.hpp | 22 ++++++++++------ src/decoder.hpp | 6 +++-- src/devpoll.hpp | 6 +++-- src/dist.hpp | 21 ++++++++------- src/encoder.hpp | 6 +++-- src/epoll.hpp | 6 +++-- src/i_engine.hpp | 4 ++- src/io_object.hpp | 6 +++-- src/io_thread.hpp | 4 ++- src/ipc_connecter.hpp | 9 ++++--- src/ipc_listener.hpp | 9 ++++--- src/kqueue.hpp | 6 +++-- src/lb.hpp | 2 +- src/mtrie.hpp | 18 +++++++------ src/object.hpp | 69 ++++++++++++++++++++++++++++--------------------- src/own.hpp | 7 +++-- src/pair.hpp | 25 +++++++++++------- src/pgm_receiver.hpp | 11 +++++--- src/pgm_sender.hpp | 9 ++++--- src/pipe.hpp | 17 +++++++----- src/poll.hpp | 6 +++-- src/poller_base.hpp | 8 +++--- src/pub.hpp | 13 +++++++--- src/pull.hpp | 19 +++++++++----- src/push.hpp | 19 +++++++++----- src/reaper.hpp | 7 +++-- src/rep.hpp | 15 +++++++---- src/req.hpp | 15 +++++++---- src/select.hpp | 6 +++-- src/session_base.hpp | 34 +++++++++++++----------- src/socket_base.hpp | 22 +++++++++------- src/stream_engine.hpp | 11 +++++--- src/sub.hpp | 13 +++++++--- src/tcp_connecter.hpp | 9 ++++--- src/tcp_listener.hpp | 9 ++++--- src/xpub.hpp | 25 +++++++++++------- src/xrep.hpp | 25 ++++++++++-------- src/xreq.hpp | 24 ++++++++++------- src/xsub.hpp | 23 ++++++++++------- 40 files changed, 361 insertions(+), 221 deletions(-) commit 991f7e2c85919daef43c62175da046e0a085f8e3 Author: Martin Lucina Date: Wed Nov 9 13:12:46 2011 +0100 Set libzmq ABI version to 3 libzmq master (3.1) is not ABI compatible with libzmq 2.1.x or 3.0 (removed functionality), hence the ABI version needs to be set to 3. Signed-off-by: Martin Lucina configure.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 89962a825697dd9eca057c032ec61de71b075539 Author: Martin Sustrik Date: Tue Nov 8 14:49:15 2011 +0100 Uninitialised FSM state in REQ session fixed (issue 278) Signed-off-by: Martin Sustrik src/req.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 11e31988e14b46ccfafeb9f58706ba1fe18a274f Author: Martin Sustrik Date: Sun Nov 6 14:09:20 2011 +0100 Chuck Remeas added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 93529d8c5db599a45171942c4510f1b84ed09e6a Author: Chuck Remes Date: Sun Nov 6 14:03:51 2011 +0100 Add zmq_getmsgopt to the API The new function allows to retrieve options (flags) from zmq_msg_t. Signed-off-by: Chuck Remes Renamed from zmq_msg_flags to zmq_getmsgopt Signed-off-by: Martin Sustrik .gitignore | 1 + doc/Makefile.am | 2 +- doc/zmq_getmsgopt.txt | 85 ++++++++++++++++++++++++++++++++++++++++++++++ include/zmq.h | 5 +++ src/socket_base.cpp | 10 +++--- src/zmq.cpp | 19 +++++++++++ tests/Makefile.am | 4 ++- tests/test_msg_flags.cpp | 82 ++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 200 insertions(+), 8 deletions(-) commit bb66f3cc3bc2a76d10f16e1206f35480eb250a07 Author: Martin Sustrik Date: Sat Nov 5 16:05:18 2011 +0100 Bug in trie fixed (issue 277) When there were both '0' and '255' subnodes in (mtrie) the removal of the node resulted in an infinite loop. Fixed. Signed-off-by: Martin Sustrik src/mtrie.cpp | 2 +- src/trie.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6503716203552966e2fa6a6b4839bc0e001f9478 Author: Martin Sustrik Date: Sat Nov 5 11:38:50 2011 +0100 Minor typo corrected Signed-off-by: Martin Sustrik tests/test_timeo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe81827bd093aa6df5e5bf1bfbca479cad4ab53a Author: Martin Sustrik Date: Sat Nov 5 10:18:38 2011 +0100 Version changed to 3.1.0 This version downgrade is done because of the previous refatoring. It removed all the new features and reintroduced some of the old ones (identities). Thus, it made trunk much closer to existing 3.0 branch than it used to be. Signed-off-by: Martin Sustrik include/zmq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21a0b49834734919a48301fbbb354f8c75c6d1ad Author: Martin Sustrik Date: Sat Nov 5 10:10:44 2011 +0100 Obsolete ECANTROUTE errror code removed This error code was used only by new-style ROUTER socket which is not a part of the codebase. Signed-off-by: Martin Sustrik include/zmq.h | 1 - 1 file changed, 1 deletion(-) commit a756956781973d207413d675b998ae47de47b7c7 Author: Martin Sustrik Date: Sat Nov 5 09:57:17 2011 +0100 Use identities in inproc transport Previous patches have missed the case when the identity should be sent from an inproc endpoint. Fixed. Signed-off-by: Martin Sustrik src/socket_base.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) commit de1d32daaedce51f655fe73e60988733b2db6557 Author: Brett Cameron Date: Fri Nov 4 14:15:06 2011 +0100 Fix getaddrinfo calls to work on OpenVMS Signed-off by: Brett Cameron src/tcp_address.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) commit 50a9ee6e7335b645487a83487285bce6886ba082 Author: Martin Sustrik Date: Fri Nov 4 10:02:49 2011 +0100 MSVC build fixed Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 30 +++--------------------------- src/windows.hpp | 3 --- 2 files changed, 3 insertions(+), 30 deletions(-) commit 05ce301f3571e3e690792a189cb927328163f0bc Merge: a8362ab 6cdd720 Author: Martin Sustrik Date: Fri Nov 4 09:48:25 2011 +0100 Merge branch 'master' of github.com:zeromq/libzmq commit 6cdd720400ea456ccbfdf09cdc5054ab07dbdc6f Merge: 541b83b e9c3a22 Author: sustrik Date: Fri Nov 4 02:15:37 2011 -0700 Merge pull request #220 from 250bpm/HEAD Refactoring commit e9c3a227a7175b4eda5193b1c8ce6985f5ed89f3 Author: Martin Sustrik Date: Fri Nov 4 08:05:39 2011 +0100 Linking exception corrected Correctly states 'copyright holders' instead of 'iMatix'. Signed-off-by: Martin Sustrik COPYING.LESSER | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit a4843b65d24f9caa188bb2454b28080f0cee8484 Author: Martin Sustrik Date: Fri Nov 4 08:00:47 2011 +0100 Identities re-introduced However, the "durable socket" behaviour wasn't re-added. Identities are used solely for routing in REQ/REP pattern. Signed-off-by: Martin Sustrik src/msg.hpp | 1 + src/options.cpp | 4 +- src/options.hpp | 6 +++ src/pipe.cpp | 11 +++-- src/pipe.hpp | 10 +++-- src/req.cpp | 15 +++++-- src/req.hpp | 1 + src/session_base.cpp | 20 ++++++++- src/session_base.hpp | 5 +++ src/socket_base.cpp | 9 ++++ src/xrep.cpp | 102 +++++++++++++++++++++++++++----------------- src/xrep.hpp | 4 +- src/xreq.cpp | 14 +++++- tests/test_invalid_rep.cpp | 17 ++++---- 14 files changed, 155 insertions(+), 64 deletions(-) commit d20ea25b8c63e148fe48cc2b85bac9c896f1073b Author: Martin Sustrik Date: Wed Nov 2 14:33:58 2011 +0100 ZMQ_IDENTITY option re-introduced Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 16 ++++++++++++++++ doc/zmq_setsockopt.txt | 17 +++++++++++++++++ include/zmq.h | 1 + src/Makefile.am | 1 + src/blob.hpp | 35 +++++++++++++++++++++++++++++++++++ src/options.cpp | 25 +++++++++++++++++++++++++ src/options.hpp | 5 +++++ 7 files changed, 100 insertions(+) commit 8e21d64c974344b5b2b83cac85d12c51392fe74b Author: Martin Sustrik Date: Tue Nov 1 18:06:11 2011 +0100 Copyright dates adjusted to reflect reality Signed-off-by: Martin Sustrik autogen.sh | 2 +- include/zmq.h | 2 +- include/zmq_utils.h | 1 - perf/inproc_lat.cpp | 2 +- perf/inproc_thr.cpp | 2 +- perf/local_lat.cpp | 2 +- perf/local_thr.cpp | 2 +- perf/remote_lat.cpp | 2 +- perf/remote_thr.cpp | 2 +- src/array.hpp | 2 +- src/atomic_counter.hpp | 2 +- src/atomic_ptr.hpp | 2 +- src/clock.cpp | 5 ++--- src/clock.hpp | 5 ++--- src/command.hpp | 2 +- src/config.hpp | 2 +- src/ctx.hpp | 2 +- src/decoder.cpp | 2 +- src/decoder.hpp | 2 +- src/devpoll.cpp | 2 +- src/devpoll.hpp | 2 +- src/dist.cpp | 5 ++--- src/dist.hpp | 5 ++--- src/encoder.cpp | 2 +- src/encoder.hpp | 2 +- src/epoll.cpp | 2 +- src/epoll.hpp | 2 +- src/err.cpp | 2 +- src/err.hpp | 2 +- src/fd.hpp | 3 +-- src/fq.cpp | 2 +- src/fq.hpp | 2 +- src/i_engine.hpp | 2 +- src/i_poll_events.hpp | 4 ++-- src/io_object.cpp | 2 +- src/io_object.hpp | 2 +- src/io_thread.cpp | 2 +- src/io_thread.hpp | 2 +- src/ip.cpp | 4 ++-- src/ip.hpp | 4 ++-- src/ipc_address.cpp | 5 ++--- src/ipc_address.hpp | 5 ++--- src/ipc_connecter.cpp | 5 ++--- src/ipc_connecter.hpp | 5 ++--- src/ipc_listener.cpp | 5 ++--- src/ipc_listener.hpp | 5 ++--- src/kqueue.cpp | 2 +- src/kqueue.hpp | 2 +- src/lb.cpp | 4 ++-- src/lb.hpp | 4 ++-- src/likely.hpp | 3 +-- src/mailbox.cpp | 2 +- src/mailbox.hpp | 2 +- src/msg.cpp | 2 +- src/msg.hpp | 2 +- src/mtrie.cpp | 5 ++--- src/mtrie.hpp | 5 ++--- src/mutex.hpp | 4 ++-- src/object.cpp | 2 +- src/object.hpp | 2 +- src/options.cpp | 2 +- src/options.hpp | 2 +- src/own.cpp | 5 ++--- src/own.hpp | 5 ++--- src/pair.cpp | 2 +- src/pair.hpp | 2 +- src/pgm_receiver.cpp | 4 ++-- src/pgm_receiver.hpp | 4 ++-- src/pgm_sender.cpp | 4 ++-- src/pgm_sender.hpp | 4 ++-- src/pgm_socket.cpp | 4 ++-- src/pgm_socket.hpp | 4 ++-- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/poll.cpp | 2 +- src/poll.hpp | 2 +- src/poller.hpp | 4 ++-- src/poller_base.cpp | 5 ++--- src/poller_base.hpp | 5 ++--- src/pub.cpp | 2 +- src/pub.hpp | 2 +- src/pull.cpp | 2 +- src/pull.hpp | 2 +- src/push.cpp | 2 +- src/push.hpp | 2 +- src/random.cpp | 5 ++--- src/random.hpp | 5 ++--- src/reaper.cpp | 5 ++--- src/reaper.hpp | 5 ++--- src/req.cpp | 2 +- src/req.hpp | 2 +- src/select.cpp | 2 +- src/select.hpp | 2 +- src/session_base.cpp | 2 +- src/session_base.hpp | 2 +- src/signaler.cpp | 5 ++--- src/signaler.hpp | 5 ++--- src/socket_base.cpp | 2 +- src/socket_base.hpp | 2 +- src/stdint.hpp | 3 +-- src/stream_engine.cpp | 2 +- src/stream_engine.hpp | 2 +- src/sub.cpp | 2 +- src/sub.hpp | 2 +- src/tcp_address.cpp | 2 +- src/tcp_address.hpp | 2 +- src/tcp_connecter.cpp | 2 +- src/tcp_connecter.hpp | 2 +- src/tcp_listener.cpp | 2 +- src/tcp_listener.hpp | 2 +- src/thread.cpp | 2 +- src/thread.hpp | 2 +- src/trie.cpp | 2 +- src/trie.hpp | 2 +- src/windows.hpp | 4 ++-- src/wire.hpp | 3 +-- src/xpub.cpp | 5 ++--- src/xpub.hpp | 5 ++--- src/xrep.cpp | 2 +- src/xrep.hpp | 2 +- src/xreq.cpp | 1 - src/xreq.hpp | 2 -- src/xsub.cpp | 5 ++--- src/xsub.hpp | 5 ++--- src/ypipe.hpp | 2 +- src/yqueue.hpp | 2 +- src/zmq_utils.cpp | 2 +- tests/test_hwm.cpp | 5 ++--- tests/test_invalid_rep.cpp | 5 ++--- tests/test_pair_inproc.cpp | 5 ++--- tests/test_pair_ipc.cpp | 5 ++--- tests/test_pair_tcp.cpp | 6 +++--- tests/test_reqrep_device.cpp | 5 ++--- tests/test_reqrep_inproc.cpp | 5 ++--- tests/test_reqrep_ipc.cpp | 5 ++--- tests/test_reqrep_tcp.cpp | 6 +++--- tests/test_shutdown_stress.cpp | 6 +++--- tests/test_sub_forward.cpp | 6 +++--- tests/test_timeo.cpp | 5 ++--- 139 files changed, 192 insertions(+), 234 deletions(-) commit 8a0f5f7650e556bde6c95d7f20c975aa530d3e10 Author: Martin Sustrik Date: Tue Nov 1 14:46:18 2011 +0100 Miru copyrights added Signed-off-by: Martin Sustrik src/pgm_receiver.cpp | 1 + src/pgm_receiver.hpp | 1 + src/pgm_sender.cpp | 1 + src/pgm_sender.hpp | 1 + src/pgm_socket.cpp | 1 + src/pgm_socket.hpp | 1 + 6 files changed, 6 insertions(+) commit 1c071f54a6c4444aaa73ace26d7b3a654c26ea5c Author: Martin Sustrik Date: Tue Nov 1 14:09:54 2011 +0100 LABELs removed from the documentation Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 13 ------------- doc/zmq_recv.txt | 7 ++----- doc/zmq_recvmsg.txt | 7 ++----- doc/zmq_send.txt | 11 ++--------- doc/zmq_sendmsg.txt | 11 ++--------- doc/zmq_socket.txt | 33 --------------------------------- 6 files changed, 8 insertions(+), 74 deletions(-) commit 7563518929573fc9e729c1dc8bb4aea512fada5a Author: Martin Sustrik Date: Tue Nov 1 13:54:28 2011 +0100 Tests print their name before running This makes finding out which test have hung-up easier. Signed-off-by: Martin Sustrik tests/test_hwm.cpp | 3 +++ tests/test_invalid_rep.cpp | 3 +++ tests/test_pair_inproc.cpp | 3 +++ tests/test_pair_ipc.cpp | 3 +++ tests/test_pair_tcp.cpp | 3 +++ tests/test_reqrep_device.cpp | 3 +++ tests/test_reqrep_inproc.cpp | 3 +++ tests/test_reqrep_ipc.cpp | 3 +++ tests/test_reqrep_tcp.cpp | 3 +++ tests/test_shutdown_stress.cpp | 3 +++ tests/test_sub_forward.cpp | 3 +++ tests/test_timeo.cpp | 3 +++ 12 files changed, 36 insertions(+) commit 7842c7107358324e8c5b9af7272e6dcab8c97931 Author: Martin Sustrik Date: Tue Nov 1 13:39:54 2011 +0100 LABELS and COMMANDs removed Signed-off-by: Martin Sustrik include/zmq.h | 5 +- src/dist.cpp | 6 +- src/encoder.cpp | 5 +- src/fq.cpp | 3 +- src/lb.cpp | 6 +- src/msg.hpp | 7 +- src/pipe.cpp | 7 +- src/rep.cpp | 19 +++--- src/req.cpp | 46 +++++--------- src/req.hpp | 7 +- src/session_base.cpp | 4 +- src/socket_base.cpp | 33 +--------- src/socket_base.hpp | 7 +- src/xpub.cpp | 4 +- src/xrep.cpp | 11 ++-- src/xsub.cpp | 10 +-- tests/Makefile.am | 2 - tests/test_invalid_rep.cpp | 13 ++-- tests/test_reqrep_device.cpp | 31 ++------- tests/test_reqrep_drop.cpp | 144 ------------------------------------------ 20 files changed, 75 insertions(+), 295 deletions(-) commit 626099aa2a292178872843c55cc5226e6850f2ed Author: Martin Sustrik Date: Mon Oct 31 16:37:20 2011 +0100 VTCP transport removed Signed-off-by: Martin Sustrik configure.in | 13 --- src/Makefile.am | 4 - src/session_base.cpp | 13 --- src/socket_base.cpp | 27 +----- src/vtcp_connecter.cpp | 252 ------------------------------------------------ src/vtcp_connecter.hpp | 121 ----------------------- src/vtcp_listener.cpp | 125 ------------------------ src/vtcp_listener.hpp | 72 -------------- 8 files changed, 1 insertion(+), 626 deletions(-) commit ac7717b7b35f441fc3aeeb1528e63f147c00913a Author: Martin Sustrik Date: Mon Oct 31 16:20:30 2011 +0100 250bpm copyrights added Signed-off-by: Martin Sustrik include/zmq.h | 1 + include/zmq_utils.h | 1 + perf/inproc_lat.cpp | 1 + perf/inproc_thr.cpp | 1 + perf/local_lat.cpp | 1 + perf/local_thr.cpp | 1 + perf/remote_lat.cpp | 1 + perf/remote_thr.cpp | 1 + src/array.hpp | 1 + src/atomic_counter.hpp | 1 + src/atomic_ptr.hpp | 1 + src/clock.cpp | 1 + src/clock.hpp | 1 + src/command.hpp | 1 + src/config.hpp | 1 + src/ctx.cpp | 1 + src/ctx.hpp | 1 + src/decoder.cpp | 1 + src/decoder.hpp | 1 + src/devpoll.cpp | 1 + src/devpoll.hpp | 1 + src/dist.cpp | 1 + src/dist.hpp | 1 + src/encoder.cpp | 1 + src/encoder.hpp | 1 + src/epoll.cpp | 1 + src/epoll.hpp | 1 + src/err.cpp | 1 + src/err.hpp | 1 + src/fd.hpp | 1 + src/fq.cpp | 1 + src/fq.hpp | 1 + src/i_engine.hpp | 1 + src/i_poll_events.hpp | 1 + src/io_object.cpp | 1 + src/io_object.hpp | 1 + src/io_thread.cpp | 1 + src/io_thread.hpp | 1 + src/ip.cpp | 1 + src/ip.hpp | 1 + src/ipc_address.cpp | 1 + src/ipc_address.hpp | 1 + src/ipc_connecter.cpp | 1 + src/ipc_connecter.hpp | 1 + src/ipc_listener.cpp | 1 + src/ipc_listener.hpp | 1 + src/kqueue.cpp | 1 + src/kqueue.hpp | 1 + src/lb.cpp | 1 + src/lb.hpp | 1 + src/likely.hpp | 1 + src/mailbox.cpp | 1 + src/mailbox.hpp | 1 + src/msg.cpp | 1 + src/msg.hpp | 1 + src/mtrie.cpp | 1 + src/mtrie.hpp | 1 + src/mutex.hpp | 1 + src/object.cpp | 1 + src/object.hpp | 1 + src/options.cpp | 1 + src/options.hpp | 1 + src/own.cpp | 1 + src/own.hpp | 1 + src/pair.cpp | 1 + src/pair.hpp | 1 + src/pgm_receiver.cpp | 1 + src/pgm_receiver.hpp | 1 + src/pgm_sender.cpp | 1 + src/pgm_sender.hpp | 1 + src/pgm_socket.cpp | 1 + src/pgm_socket.hpp | 1 + src/pipe.cpp | 1 + src/pipe.hpp | 1 + src/poll.cpp | 1 + src/poll.hpp | 1 + src/poller.hpp | 1 + src/poller_base.cpp | 1 + src/poller_base.hpp | 1 + src/pub.cpp | 1 + src/pub.hpp | 1 + src/pull.cpp | 1 + src/pull.hpp | 1 + src/push.cpp | 1 + src/push.hpp | 1 + src/random.cpp | 1 + src/random.hpp | 1 + src/reaper.cpp | 1 + src/reaper.hpp | 1 + src/rep.cpp | 1 + src/rep.hpp | 1 + src/req.cpp | 1 + src/req.hpp | 1 + src/select.cpp | 1 + src/select.hpp | 1 + src/session_base.cpp | 1 + src/session_base.hpp | 1 + src/signaler.cpp | 1 + src/signaler.hpp | 1 + src/socket_base.cpp | 1 + src/socket_base.hpp | 1 + src/stdint.hpp | 1 + src/stream_engine.cpp | 1 + src/stream_engine.hpp | 1 + src/sub.cpp | 1 + src/sub.hpp | 1 + src/tcp_address.cpp | 1 + src/tcp_address.hpp | 1 + src/tcp_connecter.cpp | 1 + src/tcp_connecter.hpp | 1 + src/tcp_listener.cpp | 1 + src/tcp_listener.hpp | 1 + src/thread.cpp | 1 + src/thread.hpp | 1 + src/trie.cpp | 1 + src/trie.hpp | 1 + src/vtcp_connecter.cpp | 1 + src/vtcp_connecter.hpp | 1 + src/vtcp_listener.cpp | 1 + src/vtcp_listener.hpp | 1 + src/windows.hpp | 1 + src/wire.hpp | 1 + src/xpub.cpp | 1 + src/xpub.hpp | 1 + src/xrep.cpp | 1 + src/xrep.hpp | 1 + src/xreq.cpp | 1 + src/xreq.hpp | 1 + src/xsub.cpp | 1 + src/xsub.hpp | 1 + src/ypipe.hpp | 1 + src/yqueue.hpp | 1 + src/zmq.cpp | 1 + src/zmq_utils.cpp | 1 + tests/test_hwm.cpp | 1 + tests/test_invalid_rep.cpp | 1 + tests/test_pair_inproc.cpp | 1 + tests/test_pair_ipc.cpp | 1 + tests/test_pair_tcp.cpp | 1 + tests/test_reqrep_device.cpp | 1 + tests/test_reqrep_drop.cpp | 1 + tests/test_reqrep_inproc.cpp | 1 + tests/test_reqrep_ipc.cpp | 1 + tests/test_reqrep_tcp.cpp | 1 + tests/test_shutdown_stress.cpp | 1 + tests/test_sub_forward.cpp | 1 + tests/test_timeo.cpp | 1 + tests/testutil.hpp | 1 + 148 files changed, 148 insertions(+) commit 4b832ea37410035bba7b85e5e9988af8eda648c2 Author: Martin Sustrik Date: Mon Oct 31 15:56:39 2011 +0100 Revert the early dropping of request and replies for disconnected clients Signed-off-by: Martin Sustrik src/xrep.cpp | 4 +++- src/xreq.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 9227c389331c26d24e515bdd46867013f0cbd641 Author: Martin Sustrik Date: Mon Oct 31 15:51:11 2011 +0100 ROUTER and DEALER are aliases for XREP and XREQ Signed-off-by: Martin Sustrik include/zmq.h | 3 +++ 1 file changed, 3 insertions(+) commit dee8b2360ac0084165401dd61fc485226402124d Author: Martin Sustrik Date: Mon Oct 31 15:44:42 2011 +0100 New style ROUTER socket removed. Signed-off-by: Martin Sustrik include/zmq.h | 1 - src/Makefile.am | 2 - src/router.cpp | 285 -------------------------------------------------- src/router.hpp | 123 ---------------------- src/session_base.cpp | 5 - src/socket_base.cpp | 4 - 6 files changed, 420 deletions(-) commit 541b83bc02784c721efa3d9dde8f8a191c3c3b7b Author: Martin Sustrik Date: Sat Oct 29 14:49:08 2011 +0200 Perry Kundert added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 09574a6104ce824c43fe8261d31451ccb337d11b Author: Perry Kundert Date: Sat Oct 29 14:47:53 2011 +0200 Corrected discarding of remainder of message when request ID invalid When zmq::req_t::xrecv detects that a response has no request ID label, or the ID is the wrong size, it would return an EAGAIN, but would not discard the remainder of the message. This could allow the remainder of the message to incorrectly "leak" into a future response, if it is crafted to look like a reply with a valid response ID. Discard all remaining message blocks, if the ID is invalid in any way. src/req.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 52bab42212c263a51b219ae8714c481bc948cb4e Author: Bernd Prager Date: Thu Oct 27 17:11:28 2011 +0200 Missing bracket added Signed-off: Martin Sustrik src/zmq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b3e61a178af5c5e373c701a11697051c4c9a50a Author: Martin Sustrik Date: Thu Oct 27 14:02:57 2011 +0200 Ben Gray added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 9e000c8f26c99656dd967a8d15997b879af5817b Author: Ben Gray Date: Thu Oct 27 13:59:54 2011 +0200 Patch for issue LIBZMQ-275. Dealing with VSM in distribution when pipes fail to write. Signed-off-by: Ben Gray src/dist.cpp | 10 ++++++++++ src/msg.cpp | 6 ++++++ src/msg.hpp | 1 + 3 files changed, 17 insertions(+) commit 68ab5f87edd2436757ab92b22238a5a4114d7b0d Author: Martin Sustrik Date: Thu Oct 27 11:51:23 2011 +0200 Paul Betts added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 1b706ac02858aee4c960331dc7100f8c14312848 Author: Paul Betts Date: Thu Oct 27 11:48:58 2011 +0200 Enable exceptions raising on assert on Win32 This patch changes the Win32 version to call RaiseException instead of abort (which eventually calls TerminateProcess). This allows crash dumps to be sent correctly instead of the process disappearing. Signed-off-by: Paul Betts src/err.cpp | 13 +++++++++++++ src/err.hpp | 26 ++++++++++++++------------ 2 files changed, 27 insertions(+), 12 deletions(-) commit a8362abf11b51dd553766fb07a9e60f28e788126 Author: Martin Sustrik Date: Thu Oct 27 11:21:01 2011 +0200 Enable exceptions raising on assert on Win32 Signed-off-by: Martin Sustrik src/err.cpp | 13 +++++++++++++ src/err.hpp | 26 ++++++++++++++------------ 2 files changed, 27 insertions(+), 12 deletions(-) commit a70bea01cc9c81a59d0b7067e8854fc9777f5757 Merge: 81da391 b3cda2a Author: Martin Sustrik Date: Thu Oct 27 10:37:31 2011 +0200 Merge branch 'master' of github.com:zeromq/libzmq commit b3cda2ad6091096264f777a95907050edfdd3ffe Author: Martin Sustrik Date: Thu Oct 27 09:41:48 2011 +0200 Bug in kqueue poller fixed (issue 261) Signed-off-by: Martin Sustrik src/kqueue.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 6c1b50cfab1529e866e40c037ce1be7027423af0 Author: Mikko Koppanen Date: Wed Oct 26 11:26:00 2011 +0200 Added compile-time test for SOCK_CLOEXEC Signed-off-by: Mikko Koppanen acinclude.m4 | 22 ++++++++++++++++++++++ configure.in | 5 +++++ src/ip.cpp | 4 ++-- 3 files changed, 29 insertions(+), 2 deletions(-) commit d31792e652cc9fd3bc84e2abd89f232d273b7ede Author: Martin Sustrik Date: Thu Oct 6 13:12:49 2011 +0200 Default HWMs are set to 1000 This patch is meant to prevent users from running out of memory when using 0MQ in the default configuration. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 8 ++------ doc/zmq_setsockopt.txt | 8 ++------ src/options.cpp | 4 ++-- 3 files changed, 6 insertions(+), 14 deletions(-) commit f5f1a8b1841f04fc9db5df3eb669d76513687065 Author: Steven McCoy Date: Tue Oct 4 09:39:55 2011 +0200 New upstream OpenPGM maintenance release 5.1.118. Signed-off-by: Steven McCoy configure.in | 2 +- foreign/openpgm/libpgm-5.1.115~dfsg.tar.gz | Bin 1054630 -> 0 bytes foreign/openpgm/libpgm-5.1.118~dfsg.tar.gz | Bin 0 -> 1046589 bytes 3 files changed, 1 insertion(+), 1 deletion(-) commit cc5d31605fddc9888f3b30933fbd4ec3272299ab Author: Steven McCoy Date: Tue Oct 4 09:32:02 2011 +0200 Re-add PGM rate limiting It was accidently lost in commit fcfad5682e, equivalent to commits 2ddb106 & b62dd40 in version 2.1. Changes semantics from TXW_MAX_RATE to ODATA_MAX_RATE. Signed-off-by: Steven McCoy src/pgm_socket.cpp | 3 +++ 1 file changed, 3 insertions(+) commit 81da391e7e6ee12a2607289a1aae16c400e7025e Author: Martin Sustrik Date: Thu Sep 29 14:47:41 2011 +0200 Use single port for creating signalers on Windows Signed-off-by: Martin Sustrik src/config.hpp | 6 +++++- src/signaler.cpp | 23 +++++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) commit 7a10bbe77a31158da0573031f8d6a50812262858 Author: Martin Sustrik Date: Thu Sep 29 11:35:31 2011 +0200 Bug in subscription matching fixed (issue 263) Signed-off-by: Martin Sustrik src/mtrie.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 34b114d15d8e4bd784014189eb7204e88b06da61 Author: Jon Dyte Date: Thu Sep 29 09:07:03 2011 +0200 Make sure new ROUTER socket honours POLLIN for cmd messages Signed-off-by: Jon Dyte src/router.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8485a5e5a4cdcb5cec800279f874c8579d246940 Author: Martin Sustrik Date: Wed Sep 28 08:03:14 2011 +0200 Assert fixed in XREP & ROUTER when sending to terminating pipe (issue 258) Signed-off-by: Martin Sustrik src/router.cpp | 5 +++-- src/xrep.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) commit d726120e60e3db332ed26c2106c65271f4d8fba4 Author: Martin Sustrik Date: Mon Sep 26 14:02:31 2011 +0200 Bug in matching algorithm fixed Signed-off-by: Martin Sustrik src/mtrie.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 25cc25e9ad51f38fa8e1a78a798b2d54e270dad2 Author: Martin Sustrik Date: Sun Sep 18 10:19:08 2011 +0200 MSVC build fixed Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e170136a2e00eec2e786441cdc090c3b00a8fbd4 Author: Martin Sustrik Date: Fri Sep 16 16:34:28 2011 +0200 More bugs in mtrie fixed Aside of fixing couple of corner cases this patch turns the 'match' function in mtrie from recursive to iterative. Signed-off-by: Martin Sustrik src/mtrie.cpp | 57 ++++++++++++++++++++++++++++++--------------------------- src/mtrie.hpp | 2 -- 2 files changed, 30 insertions(+), 29 deletions(-) commit 5936379b292dec79efd3a1eaa7cafae4fc6d675a Author: Martin Sustrik Date: Fri Sep 16 15:02:52 2011 +0200 Bug in mtrie fixed Signed-off-by: Martin Sustrik src/mtrie.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 06bdf2c4f96a6324b3fe667cebb03d44cd100a73 Author: Martin Sustrik Date: Fri Sep 16 09:29:43 2011 +0200 Check message syntax in REQ asynchronously This patch adds support for checking messages as they arrive (as opposed to when they are recv'd by the user) and drop the connection if they are malformed. It also uses this new feature to check for validity of inbound messages in REQ socket. Signed-off-by: Martin Sustrik src/decoder.cpp | 9 ++++++++- src/decoder.hpp | 8 ++++++++ src/encoder.cpp | 10 +++++++++- src/encoder.hpp | 9 +++++++++ src/req.cpp | 20 ++++++++++++++++++++ src/req.hpp | 8 ++++++++ src/session_base.cpp | 20 ++++++++++---------- src/session_base.hpp | 4 ++-- 8 files changed, 74 insertions(+), 14 deletions(-) commit f78d9b6bfca13e298c29fadabbbc870b37a0a573 Author: Martin Sustrik Date: Thu Sep 15 10:00:23 2011 +0200 Session class separated into socket-type-specific sessions This is a preliminary patch allowing for socket-type-specific functionality in the I/O thread. For example, message format can be checked asynchronously and misbehaved connections dropped straight away. Signed-off-by: Martin Sustrik src/Makefile.am | 4 +- src/decoder.cpp | 4 +- src/decoder.hpp | 4 +- src/encoder.cpp | 4 +- src/encoder.hpp | 4 +- src/i_engine.hpp | 2 +- src/ipc_connecter.cpp | 2 +- src/ipc_connecter.hpp | 4 +- src/ipc_listener.cpp | 8 +- src/object.cpp | 6 +- src/object.hpp | 2 +- src/pair.cpp | 12 ++ src/pair.hpp | 16 ++ src/pgm_receiver.cpp | 5 +- src/pgm_receiver.hpp | 5 +- src/pgm_sender.cpp | 4 +- src/pgm_sender.hpp | 3 +- src/pub.cpp | 12 ++ src/pub.hpp | 15 ++ src/pull.cpp | 12 ++ src/pull.hpp | 16 ++ src/push.cpp | 12 ++ src/push.hpp | 16 ++ src/rep.cpp | 12 ++ src/rep.hpp | 15 ++ src/req.cpp | 11 ++ src/req.hpp | 15 ++ src/router.cpp | 10 ++ src/router.hpp | 16 ++ src/session.cpp | 383 ---------------------------------------- src/session.hpp | 124 ------------- src/session_base.cpp | 457 ++++++++++++++++++++++++++++++++++++++++++++++++ src/session_base.hpp | 131 ++++++++++++++ src/socket_base.cpp | 8 +- src/stream_engine.cpp | 5 +- src/stream_engine.hpp | 7 +- src/sub.cpp | 12 ++ src/sub.hpp | 15 ++ src/tcp_connecter.cpp | 2 +- src/tcp_connecter.hpp | 4 +- src/tcp_listener.cpp | 8 +- src/vtcp_connecter.cpp | 2 +- src/vtcp_connecter.hpp | 4 +- src/vtcp_listener.cpp | 6 +- src/xpub.cpp | 12 ++ src/xpub.hpp | 16 ++ src/xrep.cpp | 10 ++ src/xrep.hpp | 16 ++ src/xreq.cpp | 12 ++ src/xreq.hpp | 16 ++ src/xsub.cpp | 11 ++ src/xsub.hpp | 16 ++ 52 files changed, 970 insertions(+), 558 deletions(-) commit 78b02d142e82015a2146b7d40f7e0a729ad0e89b Author: Martin Sustrik Date: Wed Sep 14 15:16:48 2011 +0200 Minor optimisation in message distribution algorithm If several of the outbound pipes become passive while sending a single message, the refcount on the message is adjusted once only, not multiple times. It's an atomic operation so the cost is not negligible. Signed-off-by: Martin Sustrik src/dist.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit cf499ee016340a8534e24084a481a02498b44e70 Author: Martin Sustrik Date: Wed Sep 14 14:31:09 2011 +0200 Bug in message distribution algorithm fixed (issue 251) Signed-off-by: Martin Sustrik src/dist.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 42737f09180b8ebc2827743568e6170b6ddd5938 Author: Martin Sustrik Date: Wed Sep 14 14:24:59 2011 +0200 test_invlid_rep added to .gitignore Signed-off-by: Martin Sustrik .gitignore | 1 + 1 file changed, 1 insertion(+) commit 8f8bfcaba0f0e827a2d034c76c5b498bbdf4e7e1 Author: Mikko Koppanen Date: Tue Sep 13 16:27:07 2011 +0200 Fixed issue with req assertions (issue 252) Signed-off-by: Mikko Koppanen Signed-off-by: Martin Sustrik src/req.cpp | 9 +++-- tests/Makefile.am | 4 ++- tests/test_invalid_rep.cpp | 85 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 3 deletions(-) commit e191e806ead4e8954e03612a4b385aff40871272 Author: Mikko Koppanen Date: Tue Sep 6 08:51:23 2011 +0200 Fix polling system detection on mingw32 build Signed-off-by: Mikko Koppanen acinclude.m4 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 9d0e122bfad431d7b84ad43c0c62c8ebc9540a36 Author: Mikko Koppanen Date: Sun Sep 4 10:28:15 2011 +0200 Added option to choose internal polling system Signed-off-by: Mikko Koppanen acinclude.m4 | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 4 ++ 2 files changed, 169 insertions(+) commit 193fa1c079fd886623e55810556a9461561ca139 Author: Martin Sustrik Date: Sat Sep 3 10:19:08 2011 +0200 Accept square brackets around IPv6 address Signed-off-by: Martin Sustrik src/tcp_address.cpp | 5 +++++ 1 file changed, 5 insertions(+) commit 4138aca54bd57d42acdbe7c7af0f7045ecc36e1e Author: Pieter Hintjens Date: Sat Sep 3 09:02:56 2011 +0200 Fixed doc to clarify how label parts work Signed-off-by: Pieter Hintjens Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 27 ++++++++--------- doc/zmq_recv.txt | 28 +++++++++--------- doc/zmq_recvmsg.txt | 42 +++++++++++++------------- doc/zmq_send.txt | 37 +++++++++++------------ doc/zmq_sendmsg.txt | 38 +++++++++++------------- doc/zmq_socket.txt | 77 +++++++++++++++++++++++++++++++----------------- 6 files changed, 134 insertions(+), 115 deletions(-) commit 9fb9fea63351cff0e664b28636acb3c3e1f84721 Author: Martin Sustrik Date: Sat Sep 3 07:40:49 2011 +0200 Improve error reporting in a minor way Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 2 +- src/xrep.cpp | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) commit 8b7ac4c2a9c3ede95d6f5f9717a1939a23788964 Author: Martin Sustrik Date: Fri Sep 2 15:34:12 2011 +0200 Close file descriptors on exec (issue 218) When exec is executed to start a different process image old 0MQ file descriptors could stay open, thus blocking TCP ports and alike. This patch should solve the problem. Signed-off-by: Martin Sustrik src/ip.cpp | 23 +++++++++++++++++++++++ src/ip.hpp | 3 +++ src/ipc_connecter.cpp | 2 +- src/ipc_listener.cpp | 3 ++- src/signaler.cpp | 6 +++--- src/tcp_address.cpp | 5 +++-- src/tcp_connecter.cpp | 2 +- src/tcp_listener.cpp | 2 +- 8 files changed, 37 insertions(+), 9 deletions(-) commit 2910a728dc777068e6ae7f67041da185b0865171 Author: Martin Sustrik Date: Fri Sep 2 13:44:22 2011 +0200 msg_t::rm_refs closes the message when number of refs drops to 0 (issue 245) Signed-off-by: Martin Sustrik src/msg.cpp | 18 +++++++++++++----- src/msg.hpp | 5 +++-- 2 files changed, 16 insertions(+), 7 deletions(-) commit 82ab08d871628410e8b0b1fe63d25f1b27766b8d Author: Martin Sustrik Date: Thu Sep 1 13:02:22 2011 +0200 Premature deallocation bug in XSUB fixed (issue 244) Signed-off-by: Martin Sustrik src/xsub.cpp | 1 - 1 file changed, 1 deletion(-) commit 65bb75863dde3ecd9a19d7fafc1ad1b0166a4770 Author: Martin Sustrik Date: Thu Sep 1 07:26:17 2011 +0200 Fixed warnings on Win64 Signed-off-by: Martin Sustrik src/dist.cpp | 2 +- src/socket_base.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 940c5b346b35f2d42360b3371757eb98ef8ba78f Author: Martin Sustrik Date: Wed Aug 31 15:23:00 2011 +0200 zmq_msg_t changed to structure zmq_msg_t being defined as unsigned char[32] could not be stored in STL containers. Fixed by this commit. Signed-off-by: Martin Sustrik include/zmq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd7c629a27e6dffad9c659a233216ce56fbd4ef8 Author: Martin Sustrik Date: Fri Aug 19 14:42:31 2011 +0200 Typo fixed in zmq_socket(3) Signed-off-by: Martin Sustrik doc/zmq_socket.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80a5f60e3397c9376026da48e6415c7011e2a647 Author: Martin Sustrik Date: Fri Aug 19 12:34:31 2011 +0200 NIC name resolution moved to tcp_address_t Signed-off-by: Martin Sustrik src/tcp_address.cpp | 32 ++++++++++++++------------------ src/tcp_address.hpp | 4 ++-- 2 files changed, 16 insertions(+), 20 deletions(-) commit f0c7edbc9c39ec3a6d06a9605a376212c2228fc7 Author: Martin Sustrik Date: Thu Aug 18 21:16:22 2011 +0200 Missing include added to ip.cpp Signed-off-by: Martin Sustrik src/ip.cpp | 1 + 1 file changed, 1 insertion(+) commit 898ee99dc16bbd494cabd7e09efac120d79990d7 Author: Martin Sustrik Date: Thu Aug 18 17:58:46 2011 +0200 Windows build fixed Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ src/tcp_address.cpp | 7 +++++-- src/tcp_address.hpp | 8 ++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) commit b6ecb00d23af3611da98d98f28e1c2583d428e00 Author: Martin Sustrik Date: Thu Aug 18 17:40:42 2011 +0200 TCP address related functionality moved to tcp_address_t Signed-off-by: Martin Sustrik src/Makefile.am | 2 + src/ip.cpp | 369 +----------------------------------------- src/ip.hpp | 32 ---- src/tcp_address.cpp | 422 ++++++++++++++++++++++++++++++++++++++++++++++++ src/tcp_address.hpp | 68 ++++++++ src/tcp_connecter.cpp | 12 +- src/tcp_connecter.hpp | 7 +- src/tcp_listener.cpp | 19 +-- src/tcp_listener.hpp | 7 +- src/vtcp_connecter.cpp | 10 +- src/vtcp_connecter.hpp | 7 +- 11 files changed, 522 insertions(+), 433 deletions(-) commit 4a8dd1e404c78fb403763d830190755d2ac83228 Author: Martin Sustrik Date: Thu Aug 18 11:24:14 2011 +0200 MSVC build fixed Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ src/ipc_address.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) commit b01a8e17511b57191c4aec4d741bdf3b3a80efc6 Author: Martin Sustrik Date: Thu Aug 18 11:08:22 2011 +0200 IPC address related functionality refactored into ipc_address_t class Signed-off-by: Martin Sustrik src/Makefile.am | 2 ++ src/ip.cpp | 24 ------------------- src/ip.hpp | 4 ---- src/ipc_address.cpp | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ src/ipc_address.hpp | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ src/ipc_connecter.cpp | 9 ++------ src/ipc_connecter.hpp | 7 +++--- src/ipc_listener.cpp | 16 ++++++------- src/ipc_listener.hpp | 12 +++++----- 9 files changed, 142 insertions(+), 53 deletions(-) commit 3488af048f336867594330d4abd0ad6dab110ea0 Author: Martin Sustrik Date: Wed Aug 17 18:41:02 2011 +0200 Fix the PGM support on win64 On win64 the size of file descriptor is not the same as size of int. The bug in PGM transport caused a runtime error because of this. The problem is fixed now. Signed-off-by: Martin Sustrik src/pgm_receiver.cpp | 4 ++-- src/pgm_sender.cpp | 8 ++++---- src/pgm_socket.cpp | 8 ++++---- src/pgm_socket.hpp | 7 ++++--- 4 files changed, 14 insertions(+), 13 deletions(-) commit ed373450a28cff34757a70e2c7a102ecc40e3836 Author: Martin Sustrik Date: Tue Aug 16 12:59:49 2011 +0200 MSVC build fixed Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b3bac1760735703a11297df3d0e2a2e5252aa45e Author: Martin Sustrik Date: Tue Aug 16 12:44:34 2011 +0200 tcp_engine renamed to stream engine The engine was not used exclusively for TCP connections. Rather it was used to handle any socket with SOCK_STREAM semantics. The class was renamed to reflect its true function. Signed-off-by: Martin Sustrik src/Makefile.am | 4 +- src/ipc_connecter.cpp | 4 +- src/ipc_listener.cpp | 4 +- src/stream_engine.cpp | 374 ++++++++++++++++++++++++++++++++++++++++++++++++ src/stream_engine.hpp | 102 +++++++++++++ src/tcp_connecter.cpp | 4 +- src/tcp_engine.cpp | 374 ------------------------------------------------ src/tcp_engine.hpp | 99 ------------- src/tcp_listener.cpp | 4 +- src/vtcp_connecter.cpp | 4 +- src/vtcp_listener.cpp | 4 +- 11 files changed, 490 insertions(+), 487 deletions(-) commit 41457e1ff12dffb62e2dc98cec0be2c5deb79207 Author: Martin Sustrik Date: Mon Aug 15 22:02:15 2011 +0200 Semaphores are not used anymore, build system is adjusted accordingly Signed-off-by: Martin Sustrik configure.in | 3 --- 1 file changed, 3 deletions(-) commit 714d3b288f3c92f1736a9e35d4f177bbef84c003 Author: Martin Sustrik Date: Mon Aug 15 20:39:48 2011 +0200 EAFNOSUPPORT defined on Windows platform Windows headers don't defined this error. This patch defines it if not already defined. Signed-off-by: Martin Sustrik include/zmq.h | 3 +++ src/err.cpp | 3 +++ 2 files changed, 6 insertions(+) commit 85851d312771f043263257bcf972bd11cadec50a Author: Ghislain Putois Date: Mon Aug 15 19:39:21 2011 +0200 Preliminary Android support Some small changes to prepare a cross-compilation for the Android platform Signed-off-by: Ghislain Putois Signed-off-by: Martin Sustrik AUTHORS | 1 + src/ip.cpp | 7 ++++--- src/thread.cpp | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) commit 0354d4d37fe814b9dbb94415da2c5314c4b68ae6 Author: Mikko Koppanen Date: Mon Aug 15 19:09:04 2011 +0200 Added Android support Signed-off-by: Mikko Koppanen configure.in | 6 ++++++ src/zmq.cpp | 3 +++ 2 files changed, 9 insertions(+) commit 57440b86e2c62c78f3904abb17f11500ba0a1a6f Author: Steven McCoy Date: Mon Aug 15 08:56:00 2011 +0200 Add IPv6 support to tcp_listener Signed-off-by: Steven McCoy Signed-off-by: Martin Sustrik src/ip.cpp | 17 +++++++++++++++++ src/ip.hpp | 3 +++ src/tcp_connecter.cpp | 21 ++++----------------- src/tcp_listener.cpp | 19 +++++++++++++++++++ 4 files changed, 43 insertions(+), 17 deletions(-) commit 3c3c0bfd1f5b987ee42786de25259c46393fe343 Author: Martin Sustrik Date: Mon Aug 15 08:02:36 2011 +0200 Minor problems in MSVC build fixed Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 3 ++- src/tcp_listener.cpp | 3 ++- src/zmq.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) commit 9196c482564e74e310b48e1add9f5425efb07ec0 Author: Martin Sustrik Date: Sun Aug 14 14:23:16 2011 +0200 select version zmq_poll reports invalid FDs Till now, passing invalid file descriptor to zmq_poll() caused asseration. Now it returns error. Signed-off-by: Martin Sustrik src/zmq.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 938009853461267af43908614266b9ef33f825ff Author: Martin Sustrik Date: Sun Aug 14 14:06:42 2011 +0200 Compilation error on HP-UX and AIX fixed Signed-off-by: Martin Sustrik src/ip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6dc3b2a657d4d1c98f549395643d68b834a776a4 Author: Martin Sustrik Date: Sun Aug 14 13:48:28 2011 +0200 Compilation error on FreeBSD fixed Signed-off-by: Martin Sustrik src/ip.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a3f27400ded11fa14df98943cc412635d7d175ee Author: Martin Sustrik Date: Mon Aug 8 18:49:30 2011 +0200 Minor compile-time bug on Windows fixed Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c54ce37b343bda66d25faaa970a5414546cdd92 Author: Steven McCoy Date: Mon Aug 8 16:07:54 2011 +0200 tcp_connecter disables IPV6_IPV6ONLY if needed. Signed-off-by: Steven McCoy Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c27b9ac7defd3cf7d21d93b2a3d2a9142a12e82f Author: Steven McCoy Date: Mon Aug 8 15:23:46 2011 +0200 Update resolve_ip_interface and resolve_ip_hostname with ipv4only parameter. Signed-off-by: Steven McCoy Signed-off-by: Martin Sustrik src/ip.cpp | 64 ++++++++++++++++++++++++++++++++++-------------- src/ip.hpp | 4 +-- src/tcp_connecter.cpp | 2 +- src/tcp_listener.cpp | 2 +- src/vtcp_connecter.cpp | 6 +++-- 5 files changed, 54 insertions(+), 24 deletions(-) commit 9184a54f6497fb075a9ac7a8b1b7f3e284c9bcd3 Author: Steven McCoy Date: Mon Aug 8 12:39:13 2011 +0200 Update resolve_nic_name to take more generic sockaddr parameter. Signed-off-by: Steven McCoy src/ip.cpp | 73 +++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 21 deletions(-) commit 784041f5b99ba28252c9bb67a5bfb4a5da41ef93 Author: Steven McCoy Date: Mon Aug 8 12:10:31 2011 +0200 ZMQ_IPV4ONLY option added At this point option exists, is documented and can be set, however, it has no effect. Signed-off-by: Steven McCoy Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 15 +++++++++++++++ doc/zmq_setsockopt.txt | 14 ++++++++++++++ doc/zmq_tcp.txt | 6 +++--- include/zmq.h | 3 ++- src/options.cpp | 25 +++++++++++++++++++++++++ src/options.hpp | 5 +++++ 6 files changed, 64 insertions(+), 4 deletions(-) commit 8378180cbb69c44fdd84f9ee05620bf8744cce48 Author: Martin Sustrik Date: Sun Aug 7 16:09:52 2011 +0200 Minor bug in vtcp_listener fixed Signed-off-by: Martin Sustrik src/vtcp_listener.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 24230515f5b1652186af7748268f1cfb27f5215f Author: Martin Sustrik Date: Thu Aug 4 13:11:15 2011 +0200 vtcp connection string simplified Till now, vtcp connection contained both port and subport. Now the port, if not specified, defaults to 9220. Signed-off-by: Martin Sustrik src/vtcp_connecter.cpp | 28 ++++++++++++++++++++-------- src/vtcp_listener.cpp | 16 ++++++++++------ 2 files changed, 30 insertions(+), 14 deletions(-) commit be48970977305a53de3ffa54cc51c0beabcf1a31 Author: Martin Sustrik Date: Thu Aug 4 07:44:35 2011 +0200 MSVC build brought up-to-date Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 80 +++++++++++++++----------------------- src/tcp_listener.cpp | 2 +- 2 files changed, 33 insertions(+), 49 deletions(-) commit d5f3628ad08849a0c978f7d23dc678133ed33c42 Author: Martin Sustrik Date: Fri Jul 29 09:37:43 2011 +0200 Different connecters simplified Signed-off-by: Martin Sustrik src/ip.cpp | 31 +++++++++ src/ip.hpp | 8 +-- src/ipc_connecter.cpp | 174 +++++------------------------------------------ src/ipc_connecter.hpp | 7 ++ src/signaler.cpp | 20 +----- src/tcp_connecter.cpp | 179 +++++++++++-------------------------------------- src/tcp_connecter.hpp | 2 +- src/tcp_engine.cpp | 27 ++------ 8 files changed, 108 insertions(+), 340 deletions(-) commit f63db009a1e1baf9f1fe7dae39901c7449c66131 Author: Martin Sustrik Date: Thu Jul 28 16:32:08 2011 +0200 Different listener implementations simplified Signed-off-by: Martin Sustrik src/ipc_listener.cpp | 63 +++--------------- src/tcp_listener.cpp | 171 ++++++++++++------------------------------------- src/tcp_listener.hpp | 2 +- src/vtcp_listener.cpp | 2 +- 4 files changed, 51 insertions(+), 187 deletions(-) commit b45fec337aff8e04bebaf6e898a499f05ee6b0d6 Author: Martin Sustrik Date: Thu Jul 28 15:13:04 2011 +0200 Tuning of TCP sockets is done at a single place Instead of being spread throughout the codebase, the tuning is done in tune_tcp_socket() function. Signed-off-by: Martin Sustrik src/ip.cpp | 24 ++++++++++++++++++++++++ src/ip.hpp | 7 ++++++- src/tcp_connecter.cpp | 22 ++-------------------- src/tcp_listener.cpp | 21 ++------------------- src/vtcp_connecter.cpp | 4 +++- src/vtcp_listener.cpp | 3 +++ 6 files changed, 40 insertions(+), 41 deletions(-) commit 46b053b8d67ba4826302d53268edccf919e6d785 Author: Martin Sustrik Date: Thu Jul 28 13:46:16 2011 +0200 Dead code removed from TCP and IPC transports Signed-off-by: Martin Sustrik src/ipc_listener.cpp | 208 ++++++++------------------------------------------ src/ipc_listener.hpp | 9 ++- src/session.cpp | 2 + src/socket_base.cpp | 6 +- src/tcp_listener.cpp | 130 +++++++++---------------------- src/tcp_listener.hpp | 2 +- 6 files changed, 82 insertions(+), 275 deletions(-) commit 5ac63140b01fed145fa41f613308e134420920ab Author: Martin Sustrik Date: Thu Jul 28 13:19:55 2011 +0200 Implementations of TCP and IPC transports separated Signed-off-by: Martin Sustrik src/Makefile.am | 4 + src/ipc_connecter.cpp | 381 +++++++++++++++++++++++++++++++++++++++++++++++++ src/ipc_connecter.hpp | 112 +++++++++++++++ src/ipc_listener.cpp | 351 +++++++++++++++++++++++++++++++++++++++++++++ src/ipc_listener.hpp | 83 +++++++++++ src/session.cpp | 16 ++- src/socket_base.cpp | 16 ++- src/tcp_connecter.cpp | 46 +++--- src/tcp_connecter.hpp | 4 +- src/tcp_engine.cpp | 20 --- src/tcp_listener.cpp | 20 +++ 11 files changed, 1008 insertions(+), 45 deletions(-) commit 6e987428d49558a8a7b08795bcc429f720bb3874 Author: Martin Sustrik Date: Thu Jul 28 09:02:54 2011 +0200 Precise reconnect interval randomised Till now the random fraction of the reconnect interval was computed based on process ID. This patch uses pseudo-random generated (seeded by exact time of when the process was started) to compute the interval. Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 9 ++------- src/vtcp_connecter.cpp | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) commit ce7a9a58e3a0d13db53f7e0b4c17b3185a8c0e1a Author: Martin Sustrik Date: Thu Jul 28 08:06:21 2011 +0200 Setting TCP socket options moved to tcp_engine_t Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 20 ----- src/tcp_engine.cpp | 198 +++++++++++++++++++++++++----------------------- src/tcp_engine.hpp | 6 -- src/tcp_listener.cpp | 42 ---------- src/vtcp_connecter.cpp | 27 ------- 5 files changed, 103 insertions(+), 190 deletions(-) commit 588c728702fb847a0433649c9a07bcf0fabe84ab Author: Martin Sustrik Date: Wed Jul 27 09:29:48 2011 +0200 vtcp_connecter fixed Signed-off-by: Martin Sustrik src/vtcp_connecter.cpp | 56 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 17 deletions(-) commit d7319de3d089b7c340408cd8228825ec0f7b8df0 Author: Martin Sustrik Date: Tue Jul 26 22:57:19 2011 +0200 First version of vtcp_connecter added Signed-off-by: Martin Sustrik src/Makefile.am | 2 + src/session.cpp | 13 +++ src/tcp_connecter.hpp | 3 - src/vtcp_connecter.cpp | 249 ++++++++++++++++++++++++++++++++++++++++++++++++ src/vtcp_connecter.hpp | 121 +++++++++++++++++++++++ src/vtcp_listener.cpp | 13 ++- 6 files changed, 394 insertions(+), 7 deletions(-) commit 258e7e6794928544ca7e1557840b2f5a89fe5399 Author: Martin Sustrik Date: Tue Jul 26 20:13:54 2011 +0200 Code cleanup Signed-off-by: Martin Sustrik .gitignore | 2 ++ src/Makefile.am | 2 -- src/tcp_connecter.cpp | 46 ---------------------------------------------- 3 files changed, 2 insertions(+), 48 deletions(-) commit 279302c5f54ddf8a23b1eaacee63c3158850d9ff Author: Martin Sustrik Date: Tue Jul 26 18:35:40 2011 +0200 Experimental VTCP listener added Signed-off-by: Martin Sustrik configure.in | 13 ++++++ src/Makefile.am | 4 ++ src/socket_base.cpp | 53 ++++++++++++++++------- src/tcp_connecter.cpp | 46 ++++++++++++++++++++ src/tcp_connecter.hpp | 12 +++--- src/tcp_listener.cpp | 1 + src/vtcp_listener.cpp | 111 +++++++++++++++++++++++++++++++++++++++++++++++++ src/vtcp_listener.hpp | 71 +++++++++++++++++++++++++++++++ 8 files changed, 291 insertions(+), 20 deletions(-) commit 9906c652ca01698dcc429c9045eb040c24c4bb8d Author: Martin Sustrik Date: Tue Jul 26 12:21:49 2011 +0200 Outdated entries removed from .gitignore Signed-off-by: Martin Sustrik .gitignore | 4 ---- 1 file changed, 4 deletions(-) commit 9119b4fd7b292b1a14db916040f8e7cc4731d4b6 Author: Martin Sustrik Date: Tue Jul 26 00:43:57 2011 +0200 TCP transport classes simplified zmq_engine and tcp_socket merged into tcp_engine zmq_connecter and tcp_connecter merged into tcp_connecter zmq_listener and tcp_listener merged into tcp_listener Signed-off-by: Martin Sustrik src/Makefile.am | 10 +- src/session.cpp | 4 +- src/socket_base.cpp | 6 +- src/tcp_connecter.cpp | 182 +++++++++++++++++----- src/tcp_connecter.hpp | 68 ++++++--- src/tcp_engine.cpp | 401 +++++++++++++++++++++++++++++++++++++++++++++++++ src/tcp_engine.hpp | 105 +++++++++++++ src/tcp_listener.cpp | 127 +++++++++------- src/tcp_listener.hpp | 36 +++-- src/tcp_socket.cpp | 230 ---------------------------- src/tcp_socket.hpp | 74 --------- src/zmq_connecter.cpp | 161 -------------------- src/zmq_connecter.hpp | 92 ------------ src/zmq_engine.cpp | 224 --------------------------- src/zmq_engine.hpp | 88 ----------- src/zmq_listener.cpp | 84 ----------- src/zmq_listener.hpp | 67 --------- 17 files changed, 804 insertions(+), 1155 deletions(-) commit 43b5b3444c5ea54fa17eab2e03b7e00c022f33b4 Author: Martin Sustrik Date: Sun Jul 24 18:30:48 2011 +0200 PGM subscription forwarding fixed PGM when using in XPUB socket has to subscribe for all the messages as it has no idea what the subscribers are interesred in. This generic subscribe message was malformed. Fixed. Signed-off-by: Martin Sustrik src/pgm_sender.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7c1dca546d9e49e7af372e4fff9e6a87058a7f12 Author: Martin Sustrik Date: Sun Jul 24 18:25:30 2011 +0200 Session classes merged into a single class Removal of ZMQ_IDENTITY resulted in various session classes doing almost the same thing. This patch merges the classes into a single class. Signed-off-by: Martin Sustrik src/Makefile.am | 4 -- src/connect_session.cpp | 124 --------------------------------------------- src/connect_session.hpp | 65 ------------------------ src/decoder.cpp | 10 ++-- src/decoder.hpp | 4 +- src/encoder.cpp | 10 ++-- src/encoder.hpp | 4 +- src/i_engine.hpp | 21 +------- src/pgm_receiver.cpp | 17 ++++--- src/pgm_receiver.hpp | 4 +- src/pgm_sender.cpp | 11 ++-- src/pgm_sender.hpp | 2 +- src/session.cpp | 99 ++++++++++++++++++++++++++++++------ src/session.hpp | 32 ++++++------ src/socket_base.cpp | 6 +-- src/transient_session.cpp | 43 ---------------- src/transient_session.hpp | 52 ------------------- src/zmq_engine.cpp | 51 +++++++++---------- src/zmq_engine.hpp | 9 ++-- src/zmq_listener.cpp | 6 +-- 20 files changed, 168 insertions(+), 406 deletions(-) commit f716b571baf59c1b622c7666bb8bf2905126a3d4 Author: Martin Sustrik Date: Sun Jul 24 18:13:29 2011 +0200 Only one polling mechanism is compiled Till now wrappers for all the polling mechanisms available on the given platform were compiled, although only one of them was used. This patch compiles just the used one. This can make libzmq binary more concise. Signed-off-by: Martin Sustrik src/devpoll.cpp | 5 ++--- src/devpoll.hpp | 8 ++++--- src/epoll.cpp | 5 ++--- src/epoll.hpp | 8 ++++--- src/kqueue.cpp | 8 ++----- src/kqueue.hpp | 9 ++++---- src/poll.cpp | 9 ++------ src/poll.hpp | 12 +++++------ src/poller.hpp | 62 +++++++++++++++++++++++++++++++------------------------ src/select.cpp | 5 ++++- src/select.hpp | 7 +++++++ 11 files changed, 74 insertions(+), 64 deletions(-) commit 0e71b111f4c413e235978698e8a281acab3bb06e Author: Martin Sustrik Date: Sun Jul 24 18:09:50 2011 +0200 Obsolete include in ctx.hpp removed Signed-off-by: Martin Sustrik src/ctx.hpp | 1 - 1 file changed, 1 deletion(-) commit 11e21d027d5143c089e39349d1f419f76aaa4723 Author: Martin Sustrik Date: Sun Jul 24 18:06:04 2011 +0200 semaphore_t class removed The class was not used anywhere anymore. Removed. Signed-off-by: Martin Sustrik src/Makefile.am | 1 - src/ctx.hpp | 2 - src/semaphore.hpp | 189 ----------------------------------------------------- 3 files changed, 192 deletions(-) commit 837451eddc4386e19f52db89be7ae38aae471df0 Author: Martin Sustrik Date: Sun Jul 24 17:50:05 2011 +0200 Remove blob_t class The class was used in a single place. Replaced by a local typedef. Signed-off-by: Martin Sustrik src/Makefile.am | 1 - src/blob.hpp | 34 ---------------------------------- src/connect_session.hpp | 1 - src/xpub.hpp | 3 ++- 4 files changed, 2 insertions(+), 37 deletions(-) commit 5650743d9edc8b8e85739ab023e8156b451003f1 Author: Martin Sustrik Date: Fri Jul 22 08:35:01 2011 +0200 MSVC build brought up to date Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 36 ------------------------------------ src/zmq.cpp | 2 +- 2 files changed, 1 insertion(+), 37 deletions(-) commit 75c4e0e62be6bd34fb934b9f13de68ffd655c500 Author: Martin Sustrik Date: Thu Jul 21 23:35:26 2011 +0200 mailbox::recv correctly passes EINTR to the caller This bug caused signal during blocking call to assert. Signed-off-by: Martin Sustrik src/mailbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bd335932ce8c6457dddb7aa2a5e631974eb9b61 Author: Martin Sustrik Date: Thu Jul 21 19:14:39 2011 +0200 ECANTROUTE error documented in zmq_sendmsg(3) Signed-off-by: Martin Sustrik doc/zmq_sendmsg.txt | 3 +++ 1 file changed, 3 insertions(+) commit 6b873d4ffdd13263f184ca046565168f0ad66a6b Author: Martin Sustrik Date: Thu Jul 21 19:12:51 2011 +0200 ROUTER socket blocks on SNDHWM Till now the message was droppen in such case. Signed-off-by: Martin Sustrik src/router.cpp | 64 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 30 deletions(-) commit a1e09facb2438f6487b32cdcfff21f0ece735460 Author: Martin Sustrik Date: Thu Jul 21 18:54:27 2011 +0200 ROUTER socket reports error when message cannot be routed Till now, message was silently dropped if it was sent to a non-existent peer. Now, ECANTROUTE error is returned. Signed-off-by: Martin Sustrik doc/zmq_send.txt | 3 +++ include/zmq.h | 1 + src/router.cpp | 33 +++++++++++++++++++-------------- 3 files changed, 23 insertions(+), 14 deletions(-) commit 72a793f78ae6c7b544d4c19530c01e8dfd23ccf5 Author: Martin Sustrik Date: Thu Jul 21 18:43:50 2011 +0200 ZMQ_GENERIC renamed to ZMQ_ROUTER Signed-off-by: Martin Sustrik include/zmq.h | 2 +- src/Makefile.am | 4 +- src/generic.cpp | 265 --------------------------------------------------- src/generic.hpp | 108 --------------------- src/router.cpp | 265 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/router.hpp | 107 +++++++++++++++++++++ src/socket_base.cpp | 6 +- 7 files changed, 378 insertions(+), 379 deletions(-) commit cb2d7156055492839021e84dcc00cc409a3fd2d1 Author: Martin Sustrik Date: Thu Jul 21 11:51:41 2011 +0200 endmsg(3) and zmq_recvmsg(3) added to RPM spec file Signed-off-by: Martin Sustrik builds/redhat/zeromq.spec.in | 2 ++ 1 file changed, 2 insertions(+) commit a808431d1df359302af7bdd2df085f5a41f14210 Author: Martin Sustrik Date: Mon Jul 18 14:29:20 2011 +0200 Fixed email addresses in the MAITAINERS file Signed-off-by: Martin Sustrik MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a33a275e3b0b1942280cae2317801fbd2185821c Author: Pieter Hintjens Date: Mon Jul 18 12:53:55 2011 +0200 Fixed issue 230 Signed-off-by: Pieter Hintjens src/tcp_socket.cpp | 6 ++++++ 1 file changed, 6 insertions(+) commit 7298b5742f749a2947c9e6460c4a083be84506ed Author: Martin Sustrik Date: Mon Jul 18 11:39:38 2011 +0200 Includes in zmq.cpp cleaned-up Signed-off-by: Martin Sustrik src/zmq.cpp | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) commit 18d8be5e9259e72a5a0622a5594842c31dd7bfdb Author: Steven McCoy Date: Mon Jul 18 10:54:53 2011 +0200 Fix pollin on Cygwin. Signed-off-by: Steven McCoy Signed-off-by: Martin Sustrik src/signaler.cpp | 3 ++- src/zmq.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit ac20e17cbd1471b9eb3eef79c32cb43420cbc516 Author: Martin Sustrik Date: Mon Jul 18 10:04:05 2011 +0200 Reference to C++ binding removed from zmq(7) Signed-off-by: Martin Sustrik doc/zmq.txt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 66ff99c4574827b59e6d7ddfaa44d975dc7e880e Author: Martin Sustrik Date: Mon Jul 18 10:00:09 2011 +0200 Martin Lucina remove from MAINTAINERS file Signed-off-by: Martin Sustrik MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f97f50c252adc814145a0a482bc2a25229882459 Author: Martin Sustrik Date: Mon Jul 18 09:41:26 2011 +0200 Signaler timeout bug on Windows fixed Signed-off-by: Martin Sustrik src/signaler.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 1a408805521f839e3e36183d9f2dec1d08e24caf Author: Martin Sustrik Date: Mon Jul 18 09:30:37 2011 +0200 ZMQ_IDENTITY option removed from the documentation Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 23 ----------------------- doc/zmq_setsockopt.txt | 23 ----------------------- 2 files changed, 46 deletions(-) commit 89daa57faab728204447c3bb708e753a2aeffa55 Author: Martin Sustrik Date: Mon Jul 18 09:28:59 2011 +0200 Missing files for GENERIC socket implementation added Signed-off-by: Martin Sustrik src/generic.cpp | 265 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/generic.hpp | 108 +++++++++++++++++++++++ 2 files changed, 373 insertions(+) commit bf78e230ad4736da9fce6e0b4d1655affb8f466b Author: Martin Sustrik Date: Sun Jul 17 23:31:29 2011 +0200 GENERIC socket type and COMMAND flag added GENERIC allows to use 0MQ as a dumb networking framework. It provides user with connect/disconnect notifications. Also, each inbound message is labeled by ID of the connection it originated from. Outbound messages should be labeled by the ID of the connection to send them to. To distinguish connect/disconnect notifications from common messages, COMMAND flag was introduced. Signed-off-by: Martin Sustrik include/zmq.h | 3 +++ src/Makefile.am | 2 ++ src/msg.hpp | 1 + src/socket_base.cpp | 53 ++++++++++++++++++++++++++++++++------------------- src/socket_base.hpp | 7 +++++++ 5 files changed, 46 insertions(+), 20 deletions(-) commit c8e8f2a24cd339c548e06f75a3cef96454671a85 Author: Martin Sustrik Date: Fri Jul 15 11:24:33 2011 +0200 ZMQ_IDENTITY socket option removed This patch simplifies the whole codebase significantly, including dropping depedency on libuuid. Signed-off-by: Martin Sustrik configure.in | 13 --- include/zmq.h | 1 - src/Makefile.am | 7 -- src/command.cpp | 39 -------- src/command.hpp | 7 -- src/connect_session.cpp | 48 +--------- src/connect_session.hpp | 9 +- src/named_session.cpp | 67 ------------- src/named_session.hpp | 56 ----------- src/object.cpp | 50 ++-------- src/object.hpp | 12 +-- src/options.cpp | 22 ----- src/options.hpp | 3 +- src/pair.cpp | 2 +- src/pair.hpp | 2 +- src/pgm_socket.cpp | 21 ++-- src/pull.cpp | 2 +- src/pull.hpp | 2 +- src/push.cpp | 2 +- src/push.hpp | 2 +- src/random.cpp | 42 +++++--- src/random.hpp | 9 +- src/req.cpp | 6 +- src/session.cpp | 26 +---- src/session.hpp | 15 +-- src/socket_base.cpp | 70 ++------------ src/socket_base.hpp | 26 +---- src/transient_session.cpp | 2 +- src/transient_session.hpp | 2 +- src/uuid.cpp | 90 ----------------- src/uuid.hpp | 33 ------- src/xpub.cpp | 2 +- src/xpub.hpp | 2 +- src/xrep.cpp | 8 +- src/xrep.hpp | 3 +- src/xreq.cpp | 2 +- src/xreq.hpp | 2 +- src/xsub.cpp | 2 +- src/xsub.hpp | 2 +- src/zmq_connecter.cpp | 15 +-- src/zmq_init.cpp | 233 --------------------------------------------- src/zmq_init.hpp | 98 ------------------- src/zmq_listener.cpp | 18 ++-- 43 files changed, 112 insertions(+), 963 deletions(-) commit ba67eff167e94105b0975166a2192060ab125e58 Author: Martin Sustrik Date: Fri Jul 15 08:26:29 2011 +0200 non-immediate_connect functionality removed It was used only by ROUTER socket. After its removal it became obsolete. Signed-off-by: Martin Sustrik src/options.cpp | 1 - src/options.hpp | 6 ------ src/socket_base.cpp | 32 +++++++++++++------------------- 3 files changed, 13 insertions(+), 26 deletions(-) commit 364839f3e66df567172af239ac7476af4d9260eb Author: Martin Sustrik Date: Fri Jul 15 08:18:20 2011 +0200 Debian packaging removed It is now maintained as a separate project. Signed-off-by: Martin Sustrik debian/README.Debian | 4 -- debian/changelog | 24 ---------- debian/compat | 1 - debian/control | 76 -------------------------------- debian/copyright | 105 -------------------------------------------- debian/libzmq-dev.install | 5 --- debian/libzmq-dev.manpages | 2 - debian/libzmq0.install | 1 - debian/libzmq0.manpages | 5 --- debian/rules | 92 -------------------------------------- debian/source/format | 1 - debian/source/options | 1 - debian/zeromq-bin.install | 3 -- debian/zeromq-bin.manpages | 3 -- 14 files changed, 323 deletions(-) commit e4f98d1e100c225abca67b4aad90be08a729e02f Author: Martin Sustrik Date: Fri Jul 15 08:16:40 2011 +0200 ROUTER and DEALER sockets removed To be replaced by new generic socket type Signed-off-by: Martin Sustrik include/zmq.h | 2 - src/Makefile.am | 4 - src/dealer.cpp | 77 -------------- src/dealer.hpp | 65 ------------ src/router.cpp | 292 --------------------------------------------------- src/router.hpp | 105 ------------------ src/socket_base.cpp | 8 -- 7 files changed, 553 deletions(-) commit 73630de98aeb8add878b1d421aa2bfc22c735c63 Author: Martin Sustrik Date: Fri Jul 15 08:11:42 2011 +0200 Version number bumped to 4.0.0 Signed-off-by: Martin Sustrik include/zmq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57c1342c683df3207094e8ec660e72812be37f9c Author: Martin Sustrik Date: Tue Jul 12 13:05:58 2011 +0200 Bug with setting options on SUB socket fixed Signed-off-by: Martin Sustrik src/sub.cpp | 5 +++++ 1 file changed, 5 insertions(+) commit 29274811ccf2ca905360a463c5124e9e4e4c1708 Author: Martin Sustrik Date: Mon Jul 11 16:05:04 2011 +0200 zmq_bind(3) and zmq_connect(3) describe EINVAL error Signed-off-by: Martin Sustrik doc/zmq_bind.txt | 2 ++ doc/zmq_connect.txt | 2 ++ 2 files changed, 4 insertions(+) commit 2afb791ec2f9853cc642cf8a042c2acc7fbb7acd Author: Martin Sustrik Date: Mon Jul 11 15:54:13 2011 +0200 Subscription forwarding test added Signed-off-by: Martin Sustrik tests/Makefile.am | 4 +- tests/test_sub_forward.cpp | 94 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) commit 215cfc653e5c6155e231b213534739348152129d Author: Martin Sustrik Date: Mon Jul 11 15:28:02 2011 +0200 REQ/REP drop test extended The test now checks whether replies are dropped when reply pipe is overflowed. Signed-off-by: Martin Sustrik tests/test_reqrep_drop.cpp | 74 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit c7542981d18b13b251d5a3129f1ec7ba24aeb9a1 Author: Martin Sustrik Date: Mon Jul 11 10:18:30 2011 +0200 PGM transport reconciled with subscription forwarding As PGM is not capable of passing subscriptions upstream, subscriptions are ignored at sub side and engine subscribes for all messages on pub side. Signed-off-by: Martin Sustrik src/pgm_receiver.cpp | 12 +++++++++++- src/pgm_receiver.hpp | 4 ++++ src/pgm_sender.cpp | 9 +++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) commit d7adc3f19a4c941e854552d6d7881950a69b0d23 Author: Martin Sustrik Date: Mon Jul 11 09:57:59 2011 +0200 ZMQ_FILTER option removed The filtering is now done depending on the socket type. SUB socket filters the messages (end-to-end filtering) while XSUB relies on upstream nodes to do (imprefect) filtering. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 17 ----------------- doc/zmq_setsockopt.txt | 16 ---------------- include/zmq.h | 1 - src/options.cpp | 22 ++-------------------- src/options.hpp | 6 +++--- src/sub.cpp | 4 ++++ 6 files changed, 9 insertions(+), 57 deletions(-) commit a154ef69da4e41d3a8ce5a3141fe8f052c7ea853 Author: Martin Sustrik Date: Mon Jul 11 08:34:20 2011 +0200 Man pages for send & recv function brought up to date Signed-off-by: Martin Sustrik doc/Makefile.am | 3 +- doc/zmq_recv.txt | 70 ++++++++++------------------ doc/zmq_recvmsg.txt | 124 +++++++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_send.txt | 70 ++++++++++++---------------- doc/zmq_sendmsg.txt | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 304 insertions(+), 90 deletions(-) commit 7e1251178b1cbabf0bd648ae8765c01e16cc25a3 Author: Martin Sustrik Date: Mon Jul 11 07:26:45 2011 +0200 Experimental code from zmq_init_t removed. Signed-off-by: Martin Sustrik src/zmq_init.cpp | 61 +++++++++++++++--------------------------------------- src/zmq_init.hpp | 7 ------- 2 files changed, 17 insertions(+), 51 deletions(-) commit 52eaf600e5fe2acf5de6208a6a5a123dfcfe1fa2 Author: Martin Sustrik Date: Sat Jul 9 09:40:40 2011 +0200 Drop outbound messages in XREP socket when SNDHWM is reached Signed-off-by: Martin Sustrik src/rep.cpp | 5 +---- src/xrep.cpp | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) commit aa2150c25c9b0dd518b058f0c50420417441fd23 Author: Martin Sustrik Date: Fri Jul 8 18:12:59 2011 +0200 VSM data are aligned to 32/64 bit boundary Till now the VSM buffer was aligned to 16 bit boundary which could possibly cause problems on RISC architectures when accessing the message data in unsafe manner. Signed-off-by: Martin Sustrik src/config.hpp | 4 ---- src/msg.cpp | 6 ++++++ src/msg.hpp | 13 ++++++++++--- 3 files changed, 16 insertions(+), 7 deletions(-) commit 1526ff638c9cb37b156fd80a40889ac3d8258343 Author: Martin Sustrik Date: Mon Jul 4 09:27:50 2011 +0200 License text in autogen.sh fixed autogen.sh incorrectly referred to the license as GPL. Changed to LGPL. Signed-off-by: Martin Sustrik autogen.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8d96036fcd069e98f6fac69f645d6cc728281836 Author: Martin Sustrik Date: Sun Jul 3 16:11:11 2011 +0200 Build system checks for presence of eventfd.h header Signed-off-by: Martin Sustrik configure.in | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 8fb9d3c6d058393478d3b3ccb1f20bcb19bbe5a0 Merge: 6ae1be1 c687c7e Author: Martin Sustrik Date: Sun Jul 3 15:33:25 2011 +0200 Merge branch 'master' of github.com:zeromq/libzmq commit 6ae1be1a121b9367ea11ce1789d99ec56fb39682 Author: Martin Sustrik Date: Sun Jul 3 15:30:31 2011 +0200 Race condition in eventfd signaler fixed recv function on eventfd signaler could accidentally grab two signals instead of one. Fixed. Signed-off-by: Martin Sustrik src/signaler.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 9a9a0cf41066d32f0d16492e212712b42df36950 Author: Martin Sustrik Date: Sun Jul 3 15:13:57 2011 +0200 eventfd implementation of the signaler Eventfd (on Linux) is more efficient that socketpair for passing simple signals. Signed-off-by: Martin Sustrik src/signaler.cpp | 42 +++++++++++++++++++++++++++++++++++++----- src/signaler.hpp | 2 +- 2 files changed, 38 insertions(+), 6 deletions(-) commit c687c7e61e8519c93eb4bc7ef43c5cf63671eb3e Author: Martin Sustrik Date: Sun Jul 3 14:11:33 2011 +0200 Fix MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 12 ++++++++---- src/signaler.cpp | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) commit da26134aa696352de6e77a800a433878dbabb7fa Author: Martin Sustrik Date: Sun Jul 3 13:44:41 2011 +0200 Inproc tests need no I/O threads Signed-off-by: Martin Sustrik tests/test_pair_inproc.cpp | 2 +- tests/test_reqrep_inproc.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7c0c79812075459765440ca26bad56f4f7ddbe52 Author: Martin Sustrik Date: Sun Jul 3 13:33:45 2011 +0200 Command are now stored in ypipes instead of in socketpairs Storing commands in OS socket buffers caused whole lot of problems when free space in the buffer ran out. This patch stores commands in ypipes instead and uses socketpair just to signal the other thread, ie. at most one byte is stored in the socketpair at any single instant. Signed-off-by: Martin Sustrik src/Makefile.am | 2 + src/config.hpp | 3 + src/mailbox.cpp | 441 +++------------------------------------- src/mailbox.hpp | 29 +-- src/signaler.cpp | 340 +++++++++++++++++++++++++++++++ src/signaler.hpp | 63 ++++++ tests/test_shutdown_stress.cpp | 2 +- 7 files changed, 458 insertions(+), 422 deletions(-) commit de3838403b9a35e7131aae23519ced1f11a3e03c Author: Martin Sustrik Date: Thu Jun 30 00:05:03 2011 +0200 Testing for errors from pthread_* functions fixed pthread_* functions return the error number rather than setting errno. This was not accounter for till now. Signed-off-by: Martin Sustrik src/thread.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4f4cc7328054272fa2c972244b2b7e8378ad5429 Author: Andrew Thompson Date: Wed Jun 29 23:48:19 2011 +0200 Use strrchr to ensure we split off the last colon for the service port IPv6 addresses have colons and will produce invalid data for the getaddrinfo lookup. Signed-off-by: Andrew Thompson AUTHORS | 1 + src/ip.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 543ad30e7d15a8864df26d6d32e57246ede35ae3 Author: Martin Sustrik Date: Tue Jun 28 10:22:27 2011 +0200 Packaging for MSVC build fixed MSVC project files for inproc_lat and inproc_thr were not packaged during make dist phase. Signed-off-by: Martin Sustrik builds/msvc/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f8bf3a4cef6b8e1688683ab8c5ed6dd1bc8e3a12 Author: Martin Sustrik Date: Mon Jun 27 18:16:53 2011 +0200 Rename i_inout to i_engine_sink Signed-off-by: Martin Sustrik src/Makefile.am | 1 - src/decoder.cpp | 10 +++++----- src/decoder.hpp | 4 ++-- src/encoder.cpp | 10 +++++----- src/encoder.hpp | 4 ++-- src/i_engine.hpp | 23 ++++++++++++++++++++++- src/i_inout.hpp | 49 ------------------------------------------------- src/pgm_receiver.cpp | 13 ++++++------- src/pgm_receiver.hpp | 6 +++--- src/pgm_sender.cpp | 6 +++--- src/pgm_sender.hpp | 2 +- src/session.hpp | 6 +++--- src/zmq_engine.cpp | 43 +++++++++++++++++++++---------------------- src/zmq_engine.hpp | 8 ++++---- src/zmq_init.hpp | 7 ++++--- 15 files changed, 81 insertions(+), 111 deletions(-) commit 3ae73ee11f13bbc9c91b235de18fde763c359009 Author: Carl Clemens Date: Sun Jun 26 16:19:45 2011 +0200 Typo in zmq_msg_size(3) fixed Signed-off-by: Carl Clemens AUTHORS | 1 + doc/zmq_msg_size.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 770d0bc77cd1579a1cba33ba1eb3f06839c28c16 Author: Martin Sustrik Date: Thu Jun 23 08:51:48 2011 +0200 Fix MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 24 ++++++++++++++++++++++++ src/dist.cpp | 3 ++- src/fq.cpp | 3 ++- src/lb.cpp | 5 +++-- src/pipe.cpp | 2 +- src/random.cpp | 1 + src/rep.cpp | 2 +- src/req.cpp | 2 +- src/router.cpp | 6 +++--- src/session.cpp | 3 ++- src/socket_base.cpp | 6 +++--- src/xpub.cpp | 3 ++- src/xrep.cpp | 6 +++--- src/xsub.cpp | 5 +++-- 14 files changed, 51 insertions(+), 20 deletions(-) commit d1373792f7888f312cd7286fdf524a0bfe124846 Author: Martin Sustrik Date: Thu Jun 23 07:57:47 2011 +0200 Outstanding requests dropped when requester dies (issue 190) So far the requests in req/rep pattern were delivered to and processed by worker even though the original requester was dead. Thus, the worker processing replies with noone to deliver results to. This optimisation drops requests in two situations: 1. Queued inbound requests in XREP socket when peer disconnects. 2. Queued outbound requests in XREQ when socket is closed. Signed-off-by: Martin Sustrik src/options.cpp | 4 ++- src/options.hpp | 8 +++++ src/pipe.hpp | 5 ++-- src/session.cpp | 2 +- src/socket_base.cpp | 4 +-- src/xrep.cpp | 4 +++ src/xreq.cpp | 4 +++ tests/Makefile.am | 7 ++--- tests/test_reqrep_drop.cpp | 69 ++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 97 insertions(+), 10 deletions(-) commit 12532c7940f23fcb3cd46208c141d47647e76231 Author: Martin Sustrik Date: Wed Jun 22 16:51:40 2011 +0200 O(1) fair-queueing in XREP implemented Up to now the complexity of fair-queueing in XREP was O(n). Signed-off-by: Martin Sustrik src/pipe.cpp | 13 ++++++- src/pipe.hpp | 8 ++++ src/xrep.cpp | 117 ++++++++++++++-------------------------------------------- src/xrep.hpp | 17 ++------- 4 files changed, 50 insertions(+), 105 deletions(-) commit ec81f8fb2523e1e2fe45eaadc05311a35bf551d7 Author: Martin Sustrik Date: Wed Jun 22 11:02:16 2011 +0200 New wire format for REQ/REP pattern This patch introduces two changes: 1. 32-bit ID is used to identify the peer instead of UUID 2. REQ socket seeds the label stack with unique 32-bit request ID It also drops any replies with non-matching request ID Signed-off-by: Martin Sustrik .gitignore | 1 + src/Makefile.am | 2 + src/random.cpp | 39 ++++++++++ src/random.hpp | 34 +++++++++ src/rep.cpp | 52 ++++---------- src/req.cpp | 38 ++++++++-- src/req.hpp | 5 ++ src/socket_base.cpp | 18 ++--- src/xrep.cpp | 45 ++++++++---- src/xrep.hpp | 15 ++-- tests/Makefile.am | 5 +- tests/test_reqrep_device.cpp | 160 ++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 344 insertions(+), 70 deletions(-) commit 10a93bb79fd3d4be1b3ffedfa6785564fbcc082b Author: Martin Sustrik Date: Tue Jun 21 13:44:44 2011 +0200 Unspecified error code from mailbox_t::recv on Win32 fixed Signed-off-by: Martin Sustrik src/mailbox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a28928fe376f73ef8ca683523102908616445ada Author: Martin Sustrik Date: Mon Jun 20 13:36:18 2011 +0200 Introduce ZMQ_ROUTER and ZMQ_DEALER sockets Signed-off-by: Martin Sustrik include/zmq.h | 2 + src/Makefile.am | 4 + src/dealer.cpp | 77 ++++++++++++++ src/dealer.hpp | 65 ++++++++++++ src/router.cpp | 292 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/router.hpp | 105 ++++++++++++++++++ src/socket_base.cpp | 10 +- 7 files changed, 554 insertions(+), 1 deletion(-) commit f437c9ed9b604912287aa6c96557261fc966e7fc Author: Martin Sustrik Date: Mon Jun 20 12:27:56 2011 +0200 Fix errors in zmq_getsockopt(3) manpage Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ab99975ad44ed0fe9ab651f31cc47d493e7fb77e Author: Martin Sustrik Date: Mon Jun 20 11:33:54 2011 +0200 LABEL flag added to the wire format So far there was no distinction between message parts used by 0MQ and message parts used by user. Now, the message parts used by 0MQ are marked as 'LABEL'. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 12 ++++++++++++ doc/zmq_send.txt | 4 ++++ include/zmq.h | 2 ++ src/dist.cpp | 4 ++-- src/encoder.cpp | 4 ++-- src/fq.cpp | 2 +- src/lb.cpp | 4 ++-- src/msg.hpp | 5 +++-- src/pipe.cpp | 9 +++++---- src/rep.cpp | 6 +++--- src/req.cpp | 8 ++++---- src/session.cpp | 2 +- src/socket_base.cpp | 25 ++++++++++++++++++++++++- src/socket_base.hpp | 5 ++++- src/xpub.cpp | 2 +- src/xrep.cpp | 11 ++++++----- src/xsub.cpp | 8 ++++---- 17 files changed, 80 insertions(+), 33 deletions(-) commit ada5d424721c0c0139b8011a5e9de348d061ba2f Author: Martin Sustrik Date: Mon Jun 20 11:16:10 2011 +0200 Basic tests now test multi-part messages instead of single-part Signed-off-by: Martin Sustrik tests/testutil.hpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit c80908c469b1fbd3d1b639ea39d86e4e4311ae57 Author: Martin Sustrik Date: Mon Jun 20 08:21:00 2011 +0200 Bug fixed in pipe termination Signed-off-by: Martin Sustrik src/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7572fee979a1cc2a874dd5621c89a0e849b65816 Author: Fabien Ninoles Date: Mon Jun 20 08:14:21 2011 +0200 Optimise block/non-block switching in mailbox_t For the platforms that don't support MSG_DONTWAIT the reader socket in mailbox_t was kept in non-blocking state and flipped to blocking state and back when blocking read was requested. Now, the state is preserved between calls and flipped only if different type of operation (block vs. non-block) is requested. Signed-off-by: Fabien Ninoles Signed-off-by: Martin Sustrik src/mailbox.cpp | 71 ++++++++++++------------------------------------------- src/mailbox.hpp | 12 ++++++---- 2 files changed, 23 insertions(+), 60 deletions(-) commit 8440de2b14876ecc6b39816528ef0793c6e34598 Author: Martin Sustrik Date: Mon Jun 20 08:11:48 2011 +0200 Fix minor warning in MSVC build Signed-off-by: Martin Sustrik src/socket_base.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f4760f02c3ac966f858414fb50565faa5deb48bf Author: Martin Sustrik Date: Mon Jun 20 07:35:24 2011 +0200 Disable timeo test on MinGW Signed-off-by: Martin Sustrik tests/Makefile.am | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 082f8e19b7591f6f8f34edcc27f195510051c2ba Author: Martin Sustrik Date: Sun Jun 19 19:08:48 2011 +0200 Mailbox timeouts fixed on Windows Signed-off-by: Martin Sustrik src/mailbox.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit ed680a395edb9260eced8289b33041248782f979 Author: Martin Sustrik Date: Sun Jun 19 16:39:27 2011 +0200 Documentation for XPUB and XSUB socket added Signed-off-by: Martin Sustrik doc/zmq_socket.txt | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) commit 9f4d3767fed58ddfa52f63692c6169bfdbcec2e3 Author: Martin Sustrik Date: Sun Jun 19 12:48:36 2011 +0200 Session termination error fixed When session is already terminating and reconnection happens at that point, the session should not create new pipe to its socket. Signed-off-by: Martin Sustrik src/session.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 00dc0245e6aacbff247c84ac8480d3ddcabacd5a Author: Martin Sustrik Date: Sun Jun 19 11:17:20 2011 +0200 Race condition in pipe_t fixed. pipe_t now correctly drops pointer to the underlying pipe when sending pipe_term_ack command. Signed-off-by: Martin Sustrik src/pipe.cpp | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 6052709c2aea5fae70d805e6033861c24b4f2521 Author: Martin Sustrik Date: Sun Jun 19 09:33:01 2011 +0200 ENETDOWN is a legal error from TCP connect Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b77a41eafe6501a3f7cc76f2c746858036aef81 Author: Martin Sustrik Date: Sun Jun 19 09:22:11 2011 +0200 Throughput tests fixed. Introduction of subscription forwarding have broken throughput tests. This patch changes the pattern used in the tests to PUSH/PULL. Signed-off-by: Martin Sustrik perf/inproc_thr.cpp | 10 ++-------- perf/local_thr.cpp | 8 +------- perf/remote_thr.cpp | 4 +--- 3 files changed, 4 insertions(+), 18 deletions(-) commit 4b60023b96d25571f58e50899a2717da14866e6b Merge: d7923f0 9b795de Author: Martin Sustrik Date: Sun Jun 19 09:15:06 2011 +0200 Merge branch 'master' of github.com:zeromq/libzmq commit 9b795de4afdd5669a9000c5d13bec61e51fbba49 Author: Steven McCoy Date: Sat Jun 18 20:44:03 2011 +0200 Refactor Windows versioning and WinSock usage.Signed-off-by: Steven McCoy include/zmq.h | 2 +- src/ctx.cpp | 14 ++--- src/select.cpp | 11 ++-- src/windows.hpp | 157 +++++++++++++++++++++++++++++++++++++++++++++---------- 4 files changed, 141 insertions(+), 43 deletions(-) commit dc66053530e798dbcdb236cc2040031980cc09c7 Author: Martin Sustrik Date: Sat Jun 18 20:41:21 2011 +0200 Minor MSVC warning fixed Signed-off-by: Martin Sustrik src/xsub.cpp | 2 ++ 1 file changed, 2 insertions(+) commit d7923f08cab62ef40027a92f596ff45428870838 Author: Fabien Ninoles Date: Fri Jun 17 12:22:02 2011 +0200 Add sockopt ZMQ_RCVTIMEO/ZMQ_SNDTIMEO. - Add doc and tests - Add options and setup - Wait using poll/select Signed-off-by: Fabien Ninoles Signed-off-by: Martin Sustrik .gitignore | 1 + doc/zmq_getsockopt.txt | 35 ++++++++++++++- doc/zmq_setsockopt.txt | 32 ++++++++++++++ include/zmq.h | 2 + perf/remote_thr.cpp | 2 + src/ctx.cpp | 2 +- src/io_thread.cpp | 2 +- src/mailbox.cpp | 106 ++++++++++++++++++++++++++++++++++++++++---- src/mailbox.hpp | 7 ++- src/options.cpp | 36 +++++++++++++++ src/options.hpp | 4 ++ src/reaper.cpp | 2 +- src/socket_base.cpp | 100 +++++++++++++++++++++++++++-------------- src/socket_base.hpp | 6 +-- tests/Makefile.am | 5 ++- tests/test_timeo.cpp | 115 ++++++++++++++++++++++++++++++++++++++++++++++++ 16 files changed, 407 insertions(+), 50 deletions(-) commit e895607ca7a97378f7ccc5ab050fc54fd54a80ad Author: Martin Sustrik Date: Tue Jun 14 09:58:18 2011 +0200 ENETUNREACH is a valid error from connect This patch fixed the JIRA issue 223 Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 65d2b70312efb148814b58d9cd38cc7069b53a3b Author: Martin Sustrik Date: Mon Jun 13 08:15:05 2011 +0200 Minor patch to fix ICC build Signed-off-by: Martin Sustrik src/xsub.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 970798ff98bc9eb7cd84bf8766cc6034a0e88aa4 Author: Martin Sustrik Date: Mon Jun 13 07:54:58 2011 +0200 mtrie.cpp added to MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ 1 file changed, 8 insertions(+) commit c7fb5c54b688c1817d0604320ac7f9bb3aa02c5c Author: Martin Sustrik Date: Mon Jun 13 07:53:22 2011 +0200 Reverting previous commit that broke MSVC2010 build Signed-off-by: Martin Sustrik src/ctx.cpp | 8 ++------ src/select.cpp | 2 +- src/select.hpp | 2 +- src/windows.hpp | 5 +++-- 4 files changed, 7 insertions(+), 10 deletions(-) commit b164023cca3f29c5eb371a8a0757c98ae4683ae4 Author: Steven McCoy Date: Sun Jun 12 19:37:11 2011 +0200 Fix scope on Windows includes. Fix windows.h included before winsock2.h. Remove definition of _WINSOCKAPI_. Signed-off-by: Steven McCoy src/ctx.cpp | 8 ++++++-- src/select.cpp | 2 +- src/select.hpp | 2 +- src/windows.hpp | 5 ++--- 4 files changed, 10 insertions(+), 7 deletions(-) commit ff93f54653d099bddfed34a342906a3546e70496 Author: Martin Sustrik Date: Sun Jun 12 15:24:08 2011 +0200 ZMQ_FILTER socket option added This option is a performance tweak. In devices XSUB socket filters the messages just to send them to XPUB socket which filters them once more. Setting ZMQ_FILTER option to 0 allows to switch the filtering in XSUB socket off. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 19 ++++++++++++++++++- doc/zmq_setsockopt.txt | 19 +++++++++++++++++++ include/zmq.h | 1 + src/options.cpp | 19 +++++++++++++++++++ src/options.hpp | 3 +++ src/xsub.cpp | 4 ++-- 6 files changed, 62 insertions(+), 3 deletions(-) commit e080e3e8b620b0e7ed02c28712a0c92b08de3451 Author: Martin Sustrik Date: Sun Jun 12 10:19:21 2011 +0200 Publisher-side filtering for multi-part messages fixed Signed-off-by: Martin Sustrik src/dist.cpp | 8 +++++--- src/dist.hpp | 8 +++++--- src/xpub.cpp | 25 ++++++++++++++++++++----- src/xpub.hpp | 3 +++ 4 files changed, 33 insertions(+), 11 deletions(-) commit bd86def1c799a35d5cef0c0a9a1347a18fea227e Author: Martin Sustrik Date: Sat Jun 11 20:29:56 2011 +0200 Actual message filtering happens in XPUB socket Signed-off-by: Martin Sustrik src/dist.cpp | 47 ++++++++++++++++++++++++++++++++++++++--------- src/dist.hpp | 20 +++++++++++++++++++- src/mtrie.cpp | 21 ++++++++++++++++----- src/mtrie.hpp | 11 +++++++---- src/xpub.cpp | 16 ++++++++++++++-- src/xpub.hpp | 3 +++ src/xsub.cpp | 4 ++-- 7 files changed, 99 insertions(+), 23 deletions(-) commit 3935258b826adc31815be4f91b2f6eb02bb3c8ed Author: Martin Sustrik Date: Wed Jun 1 11:54:33 2011 +0200 Minor code beautification for mtrie_t Signed-off-by: Martin Sustrik src/mtrie.cpp | 42 +++++++++++++++++++++++++++--------------- src/mtrie.hpp | 4 ++++ 2 files changed, 31 insertions(+), 15 deletions(-) commit ee7313b4d896e9f7ff6a035395b20f617e4ff796 Author: Martin Sustrik Date: Tue May 31 16:21:17 2011 +0200 Subscriptions are processed immediately in XPUB socket Signed-off-by: Martin Sustrik src/xpub.cpp | 127 +++++++++++++++++++--------------------------------------- src/xpub.hpp | 8 ---- 2 files changed, 42 insertions(+), 93 deletions(-) commit a24a7c15a824bb48da38809bff9416673dc5a176 Author: Martin Sustrik Date: Tue May 31 14:36:51 2011 +0200 Session termination induced by socket fixed Signed-off-by: Martin Sustrik src/pipe.cpp | 18 ++++++++++++------ src/pipe.hpp | 5 +++-- src/session.cpp | 21 ++++++--------------- src/socket_base.cpp | 4 ++-- 4 files changed, 23 insertions(+), 25 deletions(-) commit 0b59866a84f733e5a53b0d2f32570581691747ef Author: Martin Sustrik Date: Mon May 30 10:07:34 2011 +0200 Patches from sub-forward branch incorporated Signed-off-by: Martin Sustrik src/Makefile.am | 2 + src/command.hpp | 8 ++ src/connect_session.cpp | 7 +- src/connect_session.hpp | 4 +- src/fq.cpp | 7 ++ src/fq.hpp | 4 +- src/mtrie.cpp | 218 +++++++++++++++++++++++++++++++++++++++++++++ src/mtrie.hpp | 83 +++++++++++++++++ src/named_session.cpp | 5 +- src/named_session.hpp | 4 +- src/object.cpp | 25 +++++- src/object.hpp | 2 + src/pipe.cpp | 43 +++++++++ src/pipe.hpp | 13 ++- src/pub.cpp | 13 +++ src/pub.hpp | 4 + src/session.cpp | 28 ++++++ src/session.hpp | 21 +++-- src/socket_base.cpp | 14 ++- src/socket_base.hpp | 6 +- src/sub.cpp | 115 +----------------------- src/sub.hpp | 21 +---- src/transient_session.cpp | 6 +- src/transient_session.hpp | 4 +- src/trie.cpp | 63 +++++++++++-- src/trie.hpp | 18 +++- src/xpub.cpp | 120 ++++++++++++++++++++++++- src/xpub.hpp | 26 ++++++ src/xsub.cpp | 160 ++++++++++++++++++++++++++++++--- src/xsub.hpp | 30 ++++++- 30 files changed, 884 insertions(+), 190 deletions(-) commit 311fb0d852374e769d8ff791c9df38f0464960c6 Author: Martin Sustrik Date: Sat May 28 09:02:21 2011 +0200 Subscription matching moved from XSUB to SUB socket This patch will prevent duplicate matching in devices in the future. Instead of matching in both XPUB and XSUB, it'll happen only in XPUB. Receiver endpoint will still filter messages via SUB socket. Signed-off-by: Martin Sustrik src/sub.cpp | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- src/sub.hpp | 19 ++++++++++ src/xsub.cpp | 107 ++++--------------------------------------------------- src/xsub.hpp | 17 --------- 4 files changed, 134 insertions(+), 120 deletions(-) commit 718885fdcd7af797f940078ca8c22aebab93c8bb Author: Martin Sustrik Date: Thu May 26 11:30:25 2011 +0200 Pending messages are delivered even if connection doesn't exist yet Bug in previous refactoring fixed. Signed-off-by: Martin Sustrik src/pipe.cpp | 3 +- src/session.cpp | 110 ++++++++++++++++++++++++---------------------------- src/session.hpp | 10 ++--- src/tcp_socket.cpp | 2 +- 4 files changed, 57 insertions(+), 68 deletions(-) commit 87a6490b39c44e8f9c521f6ccea14f800a712d3f Author: Martin Sustrik Date: Wed May 25 10:25:51 2011 +0200 All pipe termination code moved to pipe_t Till now the code was spread over mutliple locations. Additionally, the code was made more formally correct, with explicit pipe state machine etc. Signed-off-by: Martin Sustrik src/pipe.cpp | 147 +++++++++++++++++++++++++++++++++------------- src/pipe.hpp | 29 +++++++--- src/session.cpp | 161 ++++++++++++++++++++++----------------------------- src/session.hpp | 27 +++------ src/socket_base.cpp | 4 +- 5 files changed, 208 insertions(+), 160 deletions(-) commit 3d4203decf87a5d5fb1718c2163f6d9c6c24328d Author: Martin Sustrik Date: Mon May 23 21:37:52 2011 +0200 Fabien Ninoles added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 71ac91ba4193910359d7671a4e998a17ff506b06 Author: Fabien Ninoles Date: Mon May 23 21:36:00 2011 +0200 Add multi-array support to array_item_t. Allow to have the same item part of two different arrays, as long as they are using different array identifier. src/array.hpp | 116 +++++++++++++-------------------------------------- src/pipe.hpp | 8 +++- src/socket_base.hpp | 2 +- 3 files changed, 37 insertions(+), 89 deletions(-) commit 0f6f7276e32c01ccfe86fb76741a52ac6ffc87af Author: Martin Sustrik Date: Mon May 23 20:30:01 2011 +0200 Move the pipe termination code to socket_base_t So far, the pipe termination code was spread among socket type classes, fair queuer, load balancer, etc. This patch moves all the associated logic to a single place. Signed-off-by: Martin Sustrik src/array.hpp | 38 ++++++++++++++++++++++---- src/dist.cpp | 25 ++--------------- src/dist.hpp | 15 +++------- src/fq.cpp | 30 ++------------------ src/fq.hpp | 14 ++-------- src/lb.cpp | 25 ++--------------- src/lb.hpp | 15 +++------- src/own.cpp | 8 ++++-- src/own.hpp | 3 ++ src/pair.cpp | 31 +++------------------ src/pair.hpp | 17 +++--------- src/pipe.cpp | 4 +-- src/pull.cpp | 21 +++----------- src/pull.hpp | 14 ++-------- src/push.cpp | 20 ++------------ src/push.hpp | 14 ++-------- src/reaper.cpp | 6 +--- src/socket_base.cpp | 59 ++++++++++++++++++++++++++++++++++++++-- src/socket_base.hpp | 38 ++++++++++++++------------ src/sub.hpp | 2 +- src/xpub.cpp | 23 ++-------------- src/xpub.hpp | 14 ++-------- src/xrep.cpp | 33 ++++------------------ src/xrep.hpp | 18 +++--------- src/xreq.cpp | 20 ++++---------- src/xreq.hpp | 15 +++------- src/xsub.cpp | 18 ++---------- src/xsub.hpp | 14 ++-------- tests/test_shutdown_stress.cpp | 2 +- 29 files changed, 190 insertions(+), 366 deletions(-) commit acf0b0e515515e51ad32ba7a2d147ce703579478 Author: Martin Sustrik Date: Sun May 22 17:26:53 2011 +0200 Introduces bi-directional pipes So far, there was a pair of unidirectional pipes between a socket and a session (or an inproc peer). This resulted in complex problems with half-closed states and tracking which inpipe corresponds to which outpipe. This patch doesn't add any functionality in itself, but is essential for further work on features like subscription forwarding. Signed-off-by: Martin Sustrik src/array.hpp | 79 ++++++++--- src/command.hpp | 11 +- src/connect_session.cpp | 1 + src/dist.cpp | 10 +- src/dist.hpp | 13 +- src/fq.cpp | 12 +- src/fq.hpp | 12 +- src/lb.cpp | 8 +- src/lb.hpp | 14 +- src/object.cpp | 40 +++--- src/object.hpp | 19 ++- src/options.cpp | 2 - src/options.hpp | 5 - src/own.cpp | 3 + src/pair.cpp | 98 ++++---------- src/pair.hpp | 24 +--- src/pipe.cpp | 335 +++++++++++++++++++++++------------------------ src/pipe.hpp | 201 ++++++++++++---------------- src/pull.cpp | 26 +++- src/pull.hpp | 13 +- src/push.cpp | 26 +++- src/push.hpp | 13 +- src/session.cpp | 167 ++++++++++------------- src/session.hpp | 29 ++-- src/socket_base.cpp | 73 ++++------- src/socket_base.hpp | 12 +- src/xpub.cpp | 26 +++- src/xpub.hpp | 12 +- src/xrep.cpp | 90 +++++-------- src/xrep.hpp | 24 ++-- src/xreq.cpp | 28 +++- src/xreq.hpp | 13 +- src/xsub.cpp | 26 +++- src/xsub.hpp | 13 +- 34 files changed, 709 insertions(+), 769 deletions(-) commit 9e6b39925603f9e64db08c469bd628d7ef9465de Author: Martin Sustrik Date: Tue May 17 14:27:03 2011 +0200 Couple of minor issues in MSVC build fixed Signed-off-by: Martin Sustrik src/pgm_socket.cpp | 2 +- src/tcp_socket.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit da7b6d0b3893fd14859b77ec69eed0fc6c8ad689 Author: Martin Sustrik Date: Tue May 17 10:13:54 2011 +0200 Paul Colomiets added to AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 38e5f8699ccff09a91e37e139c4a86a259ac597b Author: Paul Colomiets Date: Tue May 17 10:12:27 2011 +0200 Better handling of memory error in resolve_ip_hostname Signed-off-by: Paul Colomiets src/ip.cpp | 9 +++++++++ src/zmq_connecter.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit 864c18f797203c06e66e739166b246cfb3d47ce9 Author: Paul Colomiets Date: Tue May 17 10:09:04 2011 +0200 zmq_msg_init_data returns ERRNO instead aborting Signed-off-by: Paul Colomiets doc/zmq_msg_init_data.txt | 4 +++- src/msg.cpp | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit d8d5a627b1835d20270125e27a157c9a7460f0e7 Author: Martin Sustrik Date: Mon May 16 10:44:38 2011 +0200 Duplicate initialisation of PGM_MULTICAST_HOPS removed Signed-off-by: Martin Sustrik src/pgm_socket.cpp | 80 +++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 42 deletions(-) commit 5d0cffc52f575ff572751cc85fd43063391a211d Author: Martin Sustrik Date: Sun May 15 18:25:43 2011 +0200 ZMQ_MULTICAST_HOPS socket option added Sets the time-to-live field in every multicast packet sent from the socket. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 15 ++++++++++++++- doc/zmq_setsockopt.txt | 12 ++++++++++++ include/zmq.h | 1 + src/options.cpp | 18 ++++++++++++++++++ src/options.hpp | 3 +++ src/pgm_socket.cpp | 14 ++++++++++---- 6 files changed, 58 insertions(+), 5 deletions(-) commit 49df2f416cd43e9e18f3dbd964271c5cca835729 Author: Martin Sustrik Date: Sun May 15 13:12:09 2011 +0200 Fixes warning when compiling with MSVC on Win64 Signed-off-by: Martin Sustrik src/array.hpp | 8 ++++---- src/dist.cpp | 2 +- src/encoder.hpp | 2 +- src/err.cpp | 2 +- src/fq.cpp | 6 +++--- src/ip.cpp | 10 +++++----- src/lb.cpp | 2 +- src/own.cpp | 2 +- src/select.cpp | 7 ++++--- src/tcp_socket.cpp | 16 ++++++++-------- src/tcp_socket.hpp | 6 ++++-- src/xrep.cpp | 7 +++---- src/zmq.cpp | 3 ++- 13 files changed, 38 insertions(+), 35 deletions(-) commit 49387874efe790713f4a090e03a97212f4889163 Author: Martin Sustrik Date: Sun May 8 09:03:49 2011 +0200 Async connect doesn't fail on EWSANETDOWN Signed-off-by: Martin Sustrik src/err.cpp | 112 ++++++++++++++++++++++++++----------------------- src/err.hpp | 12 ++++++ src/tcp_connecter.cpp | 10 ++--- 3 files changed, 76 insertions(+), 58 deletions(-) commit da1ef4d2685c02e8320847d49a38726b2b6d52f0 Author: Pieter Hintjens Date: Sun May 8 09:02:47 2011 +0200 Fixed REP assert on missing envelope Signed-off-by: Pieter Hintjens src/rep.cpp | 34 ++++++++++++++++++++++++---------- src/xrep.cpp | 13 ++++++++++++- src/xrep.hpp | 5 +++++ 3 files changed, 41 insertions(+), 11 deletions(-) commit 0c5b781e97f2bea42925495a5505c51e769fba7f Author: Martin Sustrik Date: Fri May 6 15:51:56 2011 +0200 urrent pipe pointer in XREP out of range -- fixed. Signed-off-by: Martin Sustrik src/xrep.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 3ef7c747ac68214ca463b2f52244fcec92151a46 Author: Martin Sustrik Date: Wed May 4 12:43:23 2011 +0200 Tore Halvorsen added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 10120214ac0d3ec4af146fcb95e3a114ed6f8da5 Author: Tore Halvorsen Date: Wed May 4 12:41:10 2011 +0200 Accessing an iterator after it is accessed is not valid. Moving the erase after the access and check agains current_id. src/xrep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ceb5e1a0734b0c73bd7f74ec5094ae6ad4f9dfc4 Author: Martin Sustrik Date: Tue May 3 23:20:43 2011 +0200 Deallocation functions in zmq.h and msg_t class are consistent. The two functions had different calling conventions (C vs. C++). It is fixed now. Signed-off-by: Martin Sustrik src/msg.cpp | 2 +- src/msg.hpp | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) commit 5e329ba7cac8a52fbbd2c347064c2d9355009022 Author: Martin Sustrik Date: Tue May 3 23:16:03 2011 +0200 Minor patch to keep ICC compiler happy ICC doesn't recognise that assert(false) terminates the program and thus complains that certain functions have no return values. This patch supplies dummy return values to keep the compiler happy. Signed-off-by: Martin Sustrik src/msg.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 6ecec9bbf1cd17666241a3effc31a65e555dbd4a Author: Martin Sustrik Date: Mon May 2 19:28:51 2011 +0200 Current inpipe remains unchaged in XREP when other pipe terminates When an inpipe terminated within XREP, it was erased from the array and thus current_in (which is an index) pointed to a different element in the array. This caused problems when we were in the middle of reading a multipart message. Signed-off-by: Martin Sustrik src/xrep.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e5d4cd39e1c9949b549055f816d60dd35bfacdec Author: Martin Sustrik Date: Mon May 2 19:26:30 2011 +0200 Yet one more fix related to PUB socket and multipart messages This patch fixes the activation of the pipes, when they pass from passive state directly to active. Signed-off-by: Martin Sustrik src/dist.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit e78cc47b184f82fd524da021745b3323df4af507 Author: Pieter Hintjens Date: Mon May 2 18:59:55 2011 +0200 Moved tests off 5555 (conflict with Eclipse) Signed-off-by: Pieter Hintjens tests/test_pair_tcp.cpp | 4 ++-- tests/test_reqrep_tcp.cpp | 4 ++-- tests/test_shutdown_stress.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit eb9bc1b0648d2132e612e2237a0ace47004d6f5c Author: Martin Sustrik Date: Sat Apr 30 06:48:18 2011 +0200 Message atomicity problem in PUB socket fixed. Reaching the HWM caused breaking message atomicity when the flow was reestablished - initial parts of multipart messages may have been lost. Signed-off-by: Martin Sustrik src/dist.cpp | 73 ++++++++++++++++++++++++++++++++-------------------------- src/dist.hpp | 20 ++++++++-------- 2 files changed, 49 insertions(+), 44 deletions(-) commit fe2e772dd5d36024a91ce3abb86996599960e078 Author: Martin Sustrik Date: Sat Apr 30 06:47:36 2011 +0200 pgm_socket uses binary version of UUID pgm_socket used textural form of UUID to generate GSIs. The recent patch that removed support for textual UUIDs broke the functionality. This patch fixes the problem. Signed-off-by: Martin Sustrik src/pgm_socket.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 96213d5735829bfbebfb544a584a34bb8c0081fa Author: Martin Sustrik Date: Fri Apr 29 07:23:30 2011 +0200 WSAENETUNREACH is a valid networking error Till now, 0MQ asserted on Windows when connect () returned WSAENETUNREACH. Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b2eb84f8ca2fc2b8a2af6cd2c54c0abc4535cfc4 Author: Martin Sustrik Date: Fri Apr 29 07:19:22 2011 +0200 Substantial simplification of uuid_t The string format of UUID is not used in 0MQ. Further on, it turns out that UUIDs have fixed microarchitecture-agnostic binary layout (see RFC4122). Thus, the conversion to string and back to binary can be avoided. Signed-off-by: Martin Sustrik src/socket_base.cpp | 4 +- src/uuid.cpp | 193 +++++++-------------------------------------------- src/uuid.hpp | 84 +--------------------- src/zmq_init.cpp | 7 +- 4 files changed, 33 insertions(+), 255 deletions(-) commit 10fbc78e5cab494c3af727f5ea451fdced1c9d95 Author: Martin Sustrik Date: Fri Apr 22 07:51:24 2011 +0200 Assert during SUB socket termination fixed. Fair queueing algorithm was checking whether the current pipe is not closed in the middle of reading a multipart message. However, this is OK when the socket is closing down. Signed-off-by: Martin Sustrik src/fq.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e0246e32d79d71f8e73207b43aed8b23648e4fc7 Author: Martin Sustrik Date: Thu Apr 21 22:27:48 2011 +0200 Message-related functionality factored out into msg_t class. This patch addresses serveral issues: 1. It gathers message related functionality scattered over whole codebase into a single class. 2. It makes zmq_msg_t an opaque datatype. Internals of the class don't pollute zmq.h header file. 3. zmq_msg_t size decreases from 48 to 32 bytes. That saves ~33% of memory in scenarios with large amount of small messages. Signed-off-by: Martin Sustrik include/zmq.h | 29 +----- src/config.hpp | 4 + src/ctx.cpp | 14 +-- src/ctx.hpp | 2 - src/decoder.cpp | 18 ++-- src/decoder.hpp | 5 +- src/dist.cpp | 66 ++++--------- src/dist.hpp | 6 +- src/encoder.cpp | 24 +++-- src/encoder.hpp | 5 +- src/err.cpp | 2 - src/err.hpp | 3 + src/fq.cpp | 13 +-- src/fq.hpp | 3 +- src/i_inout.hpp | 7 +- src/io_thread.cpp | 2 - src/ip.cpp | 4 +- src/lb.cpp | 28 +++--- src/lb.hpp | 2 +- src/msg.cpp | 249 ++++++++++++++++++++++++++++++++----------------- src/msg.hpp | 107 ++++++++++++++++++--- src/object.hpp | 2 - src/options.cpp | 2 - src/pair.cpp | 25 ++--- src/pair.hpp | 4 +- src/pipe.cpp | 49 +++++----- src/pipe.hpp | 13 ++- src/pub.cpp | 1 + src/pull.cpp | 5 +- src/pull.hpp | 2 +- src/push.cpp | 7 +- src/push.hpp | 2 +- src/rep.cpp | 15 ++- src/rep.hpp | 4 +- src/req.cpp | 23 +++-- src/req.hpp | 4 +- src/session.cpp | 17 ++-- src/session.hpp | 4 +- src/socket_base.cpp | 29 +++--- src/socket_base.hpp | 10 +- src/sub.cpp | 17 ++-- src/sub.hpp | 2 +- src/tcp_connecter.cpp | 2 - src/tcp_listener.cpp | 2 - src/xpub.cpp | 9 +- src/xpub.hpp | 4 +- src/xrep.cpp | 69 +++++++------- src/xrep.hpp | 7 +- src/xreq.cpp | 7 +- src/xreq.hpp | 4 +- src/xsub.cpp | 41 ++++---- src/xsub.hpp | 11 +-- src/zmq.cpp | 52 ++++++++++- src/zmq_init.cpp | 29 +++--- src/zmq_init.hpp | 13 ++- 55 files changed, 606 insertions(+), 474 deletions(-) commit 581697695aac72894f2d3fefac904b9d50b3ba67 Author: Martin Sustrik Date: Tue Apr 19 08:08:15 2011 +0200 Message validity is checked in the runtime Signed-off-by: Martin Sustrik doc/zmq_msg_close.txt | 3 ++- doc/zmq_msg_copy.txt | 3 ++- doc/zmq_msg_move.txt | 3 ++- doc/zmq_recv.txt | 2 ++ doc/zmq_send.txt | 2 ++ include/zmq.h | 1 + src/msg.cpp | 40 ++++++++++++++++++++++++++++++++-------- src/req.cpp | 2 +- src/socket_base.cpp | 14 ++++++++++++++ src/xrep.cpp | 2 +- 10 files changed, 59 insertions(+), 13 deletions(-) commit 20e0b7cdcb6e8095fbadb80765e9371803184060 Author: Martin Sustrik Date: Mon Apr 18 09:11:45 2011 +0200 zmq_socket(3) describes the EMFILE error code Signed-off-by: Martin Sustrik doc/zmq_socket.txt | 2 ++ 1 file changed, 2 insertions(+) commit e3dc0b25d98eb072ab37aac842bba0802c87e3e6 Author: Martin Sustrik Date: Mon Apr 18 08:55:51 2011 +0200 OpenPGM compilation error on OSX fixed Signed-off-by: Martin Sustrik src/pgm_socket.hpp | 4 ++++ 1 file changed, 4 insertions(+) commit 452ea97f5bb1bdd4d5ba76279de4189e8b8e5662 Author: Martin Sustrik Date: Fri Apr 15 08:03:26 2011 +0200 zmq_send(3) manpage improved Signed-off-by: Martin Sustrik doc/zmq_send.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 590ad2510bb113fdcd36951f6321fc73be94944a Author: Martin Sustrik Date: Fri Apr 15 07:59:28 2011 +0200 Error handling for accept on Cygwin fixed Signed-off-by: Martin Sustrik src/tcp_listener.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5444064c1a195daee5e57eb996157393a4eed796 Author: Martin Sustrik Date: Wed Apr 13 10:33:54 2011 +0200 Minor cleanup of preprocessor definitions for OpenPGM Signed-off-by: Martin Sustrik src/pgm_socket.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 933ace0919974628c8ac2f9ada67645fdf4c80e2 Author: Martin Sustrik Date: Wed Apr 13 10:06:44 2011 +0200 MSVC build fixed to reflect zmq.cpp split Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 6191213a5737b774d83f341d4507b8baf702d381 Author: Martin Sustrik Date: Tue Apr 12 14:20:49 2011 +0200 Code dealing with messages moved to msg.cpp Signed-off-by: Martin Sustrik src/Makefile.am | 3 +- src/dist.cpp | 2 +- src/msg.cpp | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/msg.hpp | 52 +++++++++++++++++ src/msg_content.hpp | 52 ----------------- src/zmq.cpp | 131 ------------------------------------------ 6 files changed, 214 insertions(+), 185 deletions(-) commit 3b636d7d185cd1a1fa300b4d9ca78d2587cb4bf5 Author: Martin Sustrik Date: Tue Apr 12 10:00:29 2011 +0200 zmq_utils implementation moved to zmq_utils.cpp Signed-off-by: Martin Sustrik src/Makefile.am | 3 ++- src/zmq.cpp | 30 --------------------------- src/zmq_utils.cpp | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 31 deletions(-) commit e6fd193760952fb7ad9ba787ff210993cf1c2031 Author: Martin Sustrik Date: Tue Apr 12 09:22:22 2011 +0200 OpenPGM now doesn't redefine bool, we can drop the workaround Signed-off-by: Martin Sustrik src/pgm_socket.hpp | 5 ----- src/zmq.cpp | 5 ----- 2 files changed, 10 deletions(-) commit a3b49ca958be908b88b17ecc946006dccfbd2a75 Author: Pieter Hintjens Date: Mon Apr 11 12:14:00 2011 +0200 Fixed example Signed-off-by: Pieter Hintjens doc/zmq_getsockopt.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0839cceac9dd29cc64cd9a634b9d3340cfbf3bbe Author: Martin Sustrik Date: Sat Apr 9 09:46:59 2011 +0200 Missing ENOTSOCK added on Win32 Signed-off-by: Martin Sustrik include/zmq.h | 3 +++ 1 file changed, 3 insertions(+) commit b96fe15bb666e59728b6aa02f28c5838020f6bf3 Author: Martin Sustrik Date: Sat Apr 9 09:35:34 2011 +0200 Run-time checking for context & socket validity added Signed-off-by: Martin Sustrik doc/zmq_bind.txt | 4 ++-- doc/zmq_close.txt | 4 ++-- doc/zmq_connect.txt | 4 ++-- doc/zmq_getsockopt.txt | 4 ++-- doc/zmq_recv.txt | 4 ++-- doc/zmq_send.txt | 4 ++-- doc/zmq_setsockopt.txt | 4 ++-- doc/zmq_socket.txt | 2 +- doc/zmq_term.txt | 2 +- src/ctx.cpp | 9 +++++++++ src/ctx.hpp | 6 ++++++ src/socket_base.cpp | 9 +++++++++ src/socket_base.hpp | 6 ++++++ src/zmq.cpp | 32 ++++++++++++++++---------------- 14 files changed, 62 insertions(+), 32 deletions(-) commit e62686aca57ab307e952c53fd3848acaad22735e Author: Mikko Koppanen Date: Sat Apr 9 08:45:12 2011 +0200 RPM packaging improvements Signed-off-by: Mikko Koppanen Makefile.am | 1 - builds/redhat/zeromq.spec | 137 ----------------------------------------- builds/redhat/zeromq.spec.in | 138 ++++++++++++++++++++++++++++++++++++++++++ configure.in | 3 +- 4 files changed, 140 insertions(+), 139 deletions(-) commit 6fd403c4d8d22cec6c47aad4b978b3cc78b956c4 Author: Mikko Koppanen Date: Mon Apr 4 22:52:02 2011 +0200 Make pkg-config dependency conditional Signed-off-by: Mikko Koppanen autogen.sh | 6 ------ configure.in | 13 ++++++++----- 2 files changed, 8 insertions(+), 11 deletions(-) commit 4b52cf949fa02274ec8817f8e704eaa7cc66adbf Author: Martin Sustrik Date: Mon Apr 4 17:53:49 2011 +0200 TCP and IPC connection initiation allow for multiple properties So far the only property passed on connection initiation was identity. The mechanism was now made extensible. Additional properties are needed to introduce functionality such as checking the peer's socket type, "subports" etc. Signed-off-by: Martin Sustrik src/zmq_init.cpp | 98 +++++++++++++++++++++++++++++++++++++++--------------- src/zmq_init.hpp | 18 ++++++++-- 2 files changed, 87 insertions(+), 29 deletions(-) commit 8203c4dbb2e727ce608590e41c9e0d990c015b3e Author: Martin Sustrik Date: Mon Apr 4 13:12:46 2011 +0200 Another error handling issue on Win32 solved Signed-off-by: Martin Sustrik perf/inproc_lat.cpp | 2 +- perf/inproc_thr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 475ba3849dd6563ce7b70c4db4d0ac85ac83658d Author: Martin Sustrik Date: Mon Apr 4 12:49:39 2011 +0200 Issue with error checking on Win32 platform fixed Signed-off-by: Martin Sustrik src/thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1842628b9058b9243ebe037a6818c27ea1c8cd8d Author: Martin Sustrik Date: Mon Apr 4 12:12:06 2011 +0200 Unreferenced variable removed Signed-off-by: Martin Sustrik src/tcp_socket.cpp | 1 - 1 file changed, 1 deletion(-) commit 2c7af35827863b1e0a167298140a38180980502c Author: Robert G. Jakabosky Date: Sun Apr 3 20:44:02 2011 +0200 Add note about thread-safety to zmq_msg_init_data() manpage. Signed-off-by: Robert G. Jakabosky doc/zmq_msg_init_data.txt | 3 +++ 1 file changed, 3 insertions(+) commit 54ea458f629cc380440e1a349ecf572eed2ecbd4 Author: Martin Sustrik Date: Sun Apr 3 07:36:02 2011 +0200 Git ignores .gcno files Signed-off-by: Martin Sustrik .gitignore | 1 + 1 file changed, 1 insertion(+) commit a48b6cfc003833e40198442124d034942f9f41e3 Author: Mikko Koppanen Date: Sun Apr 3 07:34:14 2011 +0200 Additional gcov changes Signed-off-by: Mikko Koppanen acinclude.m4 | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit 656b646bc634993bd9cb1b036a6838c5d0514fa8 Author: Mikko Koppanen Date: Sat Apr 2 22:50:46 2011 +0200 Large rename: AC_ZMQ_ to LIBZMQ_ and ac_zmq_ to libzmq_. Fixes "warning suspicious cache-id" Signed-off-by: Mikko Koppanen acinclude.m4 | 340 +++++++++++++++++++++++++++++----------------------------- configure.in | 76 ++++++------- 2 files changed, 208 insertions(+), 208 deletions(-) commit bdeddb89f727c434ad499da5a349f3959eba3226 Author: Mikko Koppanen Date: Sat Apr 2 22:49:41 2011 +0200 Added code coverage checking Signed-off-by: Mikko Koppanen acinclude.m4 | 32 ++++++++++++++++++++++++++++++++ configure.in | 3 +++ 2 files changed, 35 insertions(+) commit 7af18468f8ca0c14975ea12a1e6a549d42b81347 Author: Mikko Koppanen Date: Sat Apr 2 22:48:52 2011 +0200 Add option to build with system opepgm Signed-off-by: Mikko Koppanen autogen.sh | 6 ++++++ configure.in | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) commit 0e0e4559a0e1d37fdbf686056f5d869d7a8d0315 Author: Martin Sustrik Date: Sat Apr 2 19:32:44 2011 +0200 Project location on github changed in README file Signed-off-by: Martin Sustrik README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e655227bd30d9845b2a0d8b877abe26c5524a3a Author: Pieter Hintjens Date: Sat Apr 2 09:22:41 2011 +0200 Fixed memory leak with threads on win32 Signed-off-by: Pieter Hintjens src/thread.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 85c2a84036675d40af47b57c410309da04ef742b Author: Martin Sustrik Date: Sat Apr 2 09:50:35 2011 +0200 inproc perf tests now work on Windows Signed-off-by: Martin Sustrik builds/msvc/inproc_lat/inproc_lat.vcproj | 174 ++++++++++++++++++++++++++++++ builds/msvc/inproc_thr/inproc_thr.vcproj | 174 ++++++++++++++++++++++++++++++ builds/msvc/msvc.sln | 22 ++++ perf/inproc_lat.cpp | 46 +++++++- perf/inproc_thr.cpp | 46 +++++++- 5 files changed, 458 insertions(+), 4 deletions(-) commit 54830ac0f6869628e1e35cbae3434ca5e10ad600 Author: Martin Sustrik Date: Sat Apr 2 09:03:57 2011 +0200 MSVC build system updated to match 3.0 changes Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 16 ---------------- builds/msvc/msvc.sln | 33 --------------------------------- 2 files changed, 49 deletions(-) commit ae90d3bdbe58d73dea5001b2f8cbf6ada9e53332 Author: Martin Sustrik Date: Fri Apr 1 11:55:10 2011 +0200 inproc_lat and inproc_thr added to .gitignore Signed-off-by: Martin Sustrik .gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 599df5203ca3e4dfa39ea7617616b7886e95aff3 Author: Martin Sustrik Date: Fri Apr 1 11:53:51 2011 +0200 PGM wire format specification improved in zmq_pgm(7) Signed-off-by: Martin Sustrik doc/zmq_pgm.txt | 5 +++++ 1 file changed, 5 insertions(+) commit cce57617c7d4da78a3fd00e105d4920e34181a07 Author: Martin Sustrik Date: Thu Mar 31 23:49:28 2011 +0200 Ian Barber and Zed Shaw added to credits section talks on conferences, videos Signed-off-by: Martin Sustrik AUTHORS | 2 ++ 1 file changed, 2 insertions(+) commit 5142a1624bcf1659b5ed6b706b8396fc91ecbd00 Author: Martin Sustrik Date: Thu Mar 31 23:16:14 2011 +0200 Robert G. Jakabosky added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit d84558e172f51a9b96659f49c404147315e502f8 Author: Robert G. Jakabosky Date: Thu Mar 31 23:14:38 2011 +0200 Adding thread latency/throughput perf. examples. Signed-off-by: Robert G. Jakabosky perf/Makefile.am | 8 +- perf/inproc_lat.cpp | 190 +++++++++++++++++++++++++++++++++++++++++++++++ perf/inproc_thr.cpp | 204 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 401 insertions(+), 1 deletion(-) commit fbf1f5146860a2557f247cdb0f94bda647c75ceb Author: Mikko Koppanen Date: Thu Mar 31 18:42:09 2011 +0200 Upstream the openpgm build fixes. Add DSO symbol visibility to OpenPGM builds Signed-off-by: Mikko Koppanen .gitignore | 1 + Makefile.am | 11 +- configure.in | 152 ++++++++-------------------- foreign/openpgm/Makefile.am | 8 ++ foreign/openpgm/libpgm-5.0.92~dfsg.tar.gz | Bin 444700 -> 0 bytes foreign/openpgm/libpgm-5.1.115~dfsg.tar.gz | Bin 0 -> 1054630 bytes src/Makefile.am | 95 +---------------- 7 files changed, 59 insertions(+), 208 deletions(-) commit d36d9a378a9f3c561f2ae7849cee907c59d33b72 Author: Martin Sustrik Date: Sun Mar 27 19:41:32 2011 +0200 Comments improvement related to fairness while reading/writing large messages Signed-off-by: Martin Sustrik src/zmq_engine.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 17fdb5e3a8956887e76c487e36d1dc8b667ca248 Author: Martin Sustrik Date: Sun Mar 27 09:50:25 2011 +0200 zmq_recv() returns size of the message even if it's truncated Signed-off-by: Martin Sustrik src/zmq.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 82dbef360c1fd5b20c8b59e1fc7273af14f55502 Author: Martin Sustrik Date: Sat Mar 26 11:05:55 2011 +0100 Memory leak in zmq_recv fixed Signed-off-by: Martin Sustrik src/zmq.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit abb184a051b592b6d4c99fd3299e78ea7c1da826 Author: Martin Sustrik Date: Sat Mar 26 10:38:40 2011 +0100 ZMQ_NOBLOCK renamed ZMQ_DONTWAIT Done because of POSIX compliance Signed-off-by: Martin Sustrik doc/zmq_recv.txt | 2 +- doc/zmq_send.txt | 2 +- include/zmq.h | 2 +- src/socket_base.cpp | 4 ++-- src/xsub.cpp | 6 +++--- tests/test_hwm.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) commit bc4a1ce3345f4e5904e4b13c618f90def21256a5 Author: Martin Sustrik Date: Thu Mar 24 16:47:33 2011 +0100 ZMQ_HWM split into ZMQ_SNDHWM and ZMQ_RCVHWM These new options allow to control the maximum size of the inbound and outbound message pipe separately. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 42 ++++++++++++++++++++++++++++++++---------- doc/zmq_setsockopt.txt | 36 +++++++++++++++++++++++++++++------- include/zmq.h | 3 ++- src/options.cpp | 30 ++++++++++++++++++++++++------ src/options.hpp | 5 +++-- src/session.cpp | 6 ++++-- src/socket_base.cpp | 21 +++++++++++++-------- tests/test_hwm.cpp | 4 ++-- 8 files changed, 109 insertions(+), 38 deletions(-) commit 507718ee1a56e376c06389c513de3868297fec35 Author: Martin Sustrik Date: Thu Mar 24 15:43:03 2011 +0100 ZMQ_HWM type changed to int Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 4 ++-- doc/zmq_setsockopt.txt | 2 +- src/options.cpp | 8 ++++---- src/options.hpp | 4 +++- src/pipe.cpp | 11 +++++------ src/pipe.hpp | 17 ++++++++--------- src/socket_base.cpp | 2 +- tests/test_hwm.cpp | 3 +-- 8 files changed, 25 insertions(+), 26 deletions(-) commit bd9d7715ebe864d1aa85700d1b55b4f37568a1a4 Author: Martin Sustrik Date: Thu Mar 24 15:18:20 2011 +0100 ZMQ_RATE and ZMQ_RECOVERY_IVL types cahnged to int Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 4 ++-- doc/zmq_setsockopt.txt | 4 ++-- src/options.cpp | 21 ++++++++++----------- src/options.hpp | 5 +++-- src/pgm_socket.cpp | 4 ++-- 5 files changed, 19 insertions(+), 19 deletions(-) commit d61f067f5bade1269213735b8628a92621b62c91 Author: Martin Sustrik Date: Thu Mar 24 15:07:23 2011 +0100 ZMQ_EVENTS type changed to int Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 2 +- src/socket_base.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 23bd3726a57793b850cb26e22274fd188fb86e82 Author: Martin Sustrik Date: Thu Mar 24 14:59:43 2011 +0100 ZMQ_RCVMORE type changed to int Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 2 +- src/socket_base.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 17e82a361121dc81c90e17f1382dff678537b651 Author: Martin Sustrik Date: Thu Mar 24 14:48:50 2011 +0100 ZMQ_SNDBUF and ZMQ_RCVBUF type changed to int This mimics POSIX specification. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 4 ++-- doc/zmq_setsockopt.txt | 4 ++-- src/options.cpp | 22 +++++++++++----------- src/options.hpp | 5 +++-- src/tcp_socket.cpp | 15 ++++++--------- src/tcp_socket.hpp | 2 +- 6 files changed, 25 insertions(+), 27 deletions(-) commit a2252de2bcecb672f09c8a5d0013cce23d1d404f Author: Martin Sustrik Date: Thu Mar 24 14:36:40 2011 +0100 ZMQ_RECOVERY_IVL and ZMQ_RECOVERY_IVL_MSEC reconciled There's only one option now -- ZMQ_RECOVRY_IVL -- and it's measured in milliseconds. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 24 ++---------------------- doc/zmq_setsockopt.txt | 31 +++---------------------------- include/zmq.h | 1 - src/options.cpp | 22 ++-------------------- src/options.hpp | 4 +--- src/pgm_socket.cpp | 23 ++++------------------- 6 files changed, 12 insertions(+), 93 deletions(-) commit 8463b4d55e45ea29d5a23f867e7f1c0077279ee7 Author: Martin Sustrik Date: Thu Mar 24 12:27:06 2011 +0100 SWAP functionality removed On-disk storage should be implemented in devices rather than in 0MQ core. 0MQ is a networking library and there's no point in storing network buffers on disk. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 16 --- doc/zmq_setsockopt.txt | 16 --- include/zmq.h | 1 - src/Makefile.am | 2 - src/config.hpp | 4 - src/options.cpp | 18 --- src/options.hpp | 1 - src/pipe.cpp | 93 ++------------ src/pipe.hpp | 30 ++--- src/session.cpp | 6 +- src/socket_base.cpp | 20 ++- src/swap.cpp | 325 ------------------------------------------------ src/swap.hpp | 123 ------------------ 13 files changed, 24 insertions(+), 631 deletions(-) commit fb27a000d9383b503761d0124e7bd41115d70c9a Author: Martin Sustrik Date: Thu Mar 24 11:53:55 2011 +0100 send/recv was changed to send/recv/sendmsg/recvmsg send/recv now complies with POSIX by using raw buffers instead of message objects and by returning number of bytes sent/recvd instead of 0/-1. The return value is changed accordingly for sendmsg and recvmsg. Note that related man pages will be fixed in a separate patch. Signed-off-by: Martin Sustrik include/zmq.h | 6 ++++-- perf/local_lat.cpp | 12 +++++------ perf/local_thr.cpp | 12 +++++------ perf/remote_lat.cpp | 12 +++++------ perf/remote_thr.cpp | 6 +++--- src/zmq.cpp | 59 +++++++++++++++++++++++++++++++++++++++++++++++---- tests/test_hwm.cpp | 34 +++++------------------------ tests/testutil.hpp | 38 ++++++++++----------------------- 8 files changed, 96 insertions(+), 83 deletions(-) commit d4e83d26014f41eaa1698b4062de88fe7f36a669 Author: Martin Sustrik Date: Thu Mar 24 10:18:06 2011 +0100 C++ binding removed from the core Signed-off-by: Martin Sustrik builds/redhat/zeromq.spec | 1 - doc/Makefile.am | 4 +- doc/zmq_cpp.txt | 212 --------------------------------- include/zmq.hpp | 289 --------------------------------------------- src/Makefile.am | 2 +- 5 files changed, 3 insertions(+), 505 deletions(-) commit 7d87db05290e3fd742f381b6f419eb69518ca8cf Author: Martin Sustrik Date: Thu Mar 24 10:03:49 2011 +0100 Auto-tests modified to use C API instead of C++ binding As a side effect, broker HWM test was fixed. Signed-off-by: Martin Sustrik tests/test_hwm.cpp | 107 +++++++++++++++++++++---------- tests/test_pair_inproc.cpp | 30 +++++++-- tests/test_pair_ipc.cpp | 30 +++++++-- tests/test_pair_tcp.cpp | 30 +++++++-- tests/test_reqrep_inproc.cpp | 30 +++++++-- tests/test_reqrep_ipc.cpp | 30 +++++++-- tests/test_reqrep_tcp.cpp | 30 +++++++-- tests/test_shutdown_stress.cpp | 2 +- tests/testutil.hpp | 139 +++++++++++----------------------------- 9 files changed, 263 insertions(+), 165 deletions(-) commit 941be8d2175332cb720f390f93d07a0870db8824 Author: Martin Sustrik Date: Wed Mar 23 17:44:16 2011 +0100 zmq_device removed Devices are basically applications on top of 0MQ stack. They should reside in separate libraties. Signed-off-by: Martin Sustrik builds/redhat/zeromq.spec | 7 --- include/zmq.h | 10 ---- include/zmq.hpp | 7 --- src/Makefile.am | 2 - src/device.cpp | 120 --------------------------------------------- src/device.hpp | 32 ------------ src/zmq.cpp | 18 ------- 7 files changed, 196 deletions(-) commit d4d184a750e2c09a39b95db9a54daf83aac5a446 Author: Martin Sustrik Date: Wed Mar 23 17:33:07 2011 +0100 Pre-compiled devices removed Along with the devices, xmlParser which is no longer needed is removed. Signed-off-by: Martin Sustrik MAINTAINERS | 4 - Makefile.am | 8 +- configure.in | 2 - devices/Makefile.am | 3 - devices/zmq_forwarder/Makefile.am | 8 - devices/zmq_forwarder/zmq_forwarder.cpp | 124 -- devices/zmq_queue/Makefile.am | 8 - devices/zmq_queue/zmq_queue.cpp | 123 -- devices/zmq_streamer/Makefile.am | 8 - devices/zmq_streamer/zmq_streamer.cpp | 123 -- doc/Makefile.am | 6 +- doc/zmq_forwarder.txt | 33 - doc/zmq_queue.txt | 33 - doc/zmq_streamer.txt | 33 - foreign/xmlParser/xmlParser.cpp | 2923 ------------------------------- foreign/xmlParser/xmlParser.hpp | 762 -------- 16 files changed, 5 insertions(+), 4196 deletions(-) commit b45b68ae4ab90af1ce35deec52b0c0492a1f49d4 Author: Martin Sustrik Date: Wed Mar 23 17:01:39 2011 +0100 ZMQ_MCAST_LOOP removed Multicast loopback is not a real multicast, rather a kernel-space simulation. Moreover, it tends to be rather unreliable and lossy. Removing the option will force users to use transports better suited for the job, such as inproc or ipc. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 17 ----------------- doc/zmq_pgm.txt | 5 ++--- doc/zmq_setsockopt.txt | 17 ----------------- include/zmq.h | 1 - src/options.cpp | 25 ------------------------- src/options.hpp | 3 --- src/pgm_socket.cpp | 2 +- 7 files changed, 3 insertions(+), 67 deletions(-) commit f5e6d67948b8c71c2444046f6246aebab16546dc Author: Martin Sustrik Date: Wed Mar 23 15:50:18 2011 +0100 Timeout in zmq_poll is in milliseconds The old timeout in microsecond haven't been compliant with POSIX and was impractical at the same time. Signed-off-by: Martin Sustrik doc/zmq_poll.txt | 2 +- src/zmq.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit e3cf6e9ced979464d30ad4cd63087cfbee33e9bd Author: Martin Sustrik Date: Wed Mar 23 15:40:35 2011 +0100 Obsolete note removed from zmq_poll(3) manpage Signed-off-by: Martin Sustrik doc/zmq_poll.txt | 3 --- 1 file changed, 3 deletions(-) commit 34d7854199ab89faf2edfc3305932cc07b2030ab Author: Martin Sustrik Date: Wed Mar 23 15:26:47 2011 +0100 Obsolete constants ZMQ_UPSTREAM and ZMQ_DOWNSTREAM removed Signed-off-by: Martin Sustrik devices/zmq_streamer/zmq_streamer.cpp | 4 ++-- include/zmq.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) commit dee5f650dde07ec71f482e825984a31028467d1b Author: Martin Sustrik Date: Wed Mar 23 15:24:18 2011 +0100 Version bumped to 3.0.0 Signed-off-by: Martin Sustrik include/zmq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1619b3d84a04fe1886347fd83280a6070c9603f4 Author: Martin Sustrik Date: Sun Mar 20 20:52:54 2011 +0100 Message atomicity bug in load-balancer fixed If the peer getting the message have disconnected in the middle of multiplart message, the remaining part of the message went to a different peer. This patch fixes the issue. Signed-off-by: Martin Sustrik src/lb.cpp | 25 ++++++++++++++++++++++++- src/lb.hpp | 3 +++ 2 files changed, 27 insertions(+), 1 deletion(-) commit 92c7c18367f91c6341fc617026f5e25000466b05 Author: Martin Sustrik Date: Sun Mar 20 11:50:51 2011 +0100 Message atomicity problem solved in PUB socket When new peer connects to a PUB socket while it is in the middle of sending of multi-part messages, it gets just the remaining part of the message, i.e. message atomicity is broken. This patch drops the tail part of the message and starts sending to the peer only when new message is started. Signed-off-by: Martin Sustrik src/dist.cpp | 44 +++++++++++++++++++++++++++++++++++++++----- src/dist.hpp | 15 +++++++++++++++ 2 files changed, 54 insertions(+), 5 deletions(-) commit fac9c2da56073d15cfe25ea2bb5833cb5b9cfff6 Author: Martin Sustrik Date: Wed Mar 16 16:32:31 2011 +0100 zmq_socket(3) and zmq_setsockopt(3) man pages improved Signed-off-by: Martin Sustrik doc/zmq_setsockopt.txt | 3 ++- doc/zmq_socket.txt | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) commit f5015f4c933706f34dbe3cb78e7db29e2ab7f870 Author: Martin Sustrik Date: Wed Mar 16 13:48:40 2011 +0100 Incorrect errno reported from tcp_listener_t::set_address Signed-off-by: Martin Sustrik src/tcp_listener.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit 32ded2b457b2102dba4c15e00363f031d212b1c4 Author: Martin Sustrik Date: Wed Mar 16 13:26:23 2011 +0100 Duplicate identities now checked with zmq_connect Signed-off-by: Martin Sustrik src/connect_session.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++-- src/connect_session.hpp | 10 +++++++++- src/named_session.cpp | 12 +++++++++--- src/named_session.hpp | 2 +- src/session.cpp | 38 ++++++++++++++++++++------------------ src/session.hpp | 12 ++++++++---- src/socket_base.cpp | 4 +++- src/transient_session.cpp | 4 +++- src/transient_session.hpp | 2 +- 9 files changed, 97 insertions(+), 32 deletions(-) commit b79d07b8bc844135c44c1ff8b84b50dc08f56925 Author: Jon Dyte Date: Wed Mar 16 09:54:03 2011 +0100 reset socket state when identity message cannot be written to xrep Signed-off-by: Jon Dyte src/xrep.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7045a4a21327f19170e282f6ba2d25caff13aa90 Author: Martin Sustrik Date: Tue Mar 15 13:11:20 2011 +0100 Dead code removed from named_session.cpp Signed-off-by: Martin Sustrik src/named_session.cpp | 57 ++++++++++++++----------------------------------- src/named_session.hpp | 5 ++--- 2 files changed, 18 insertions(+), 44 deletions(-) commit f987f4b3e28b24fd3e58408c568b688ad1306766 Author: Martin Sustrik Date: Mon Mar 14 20:29:00 2011 +0100 FreeBSD complation error fixed There was an error in pgm_receiver wrt strict aliasing. Signed-off-by: Martin Sustrik src/pgm_receiver.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2970d6c30b1f57e9a75d46982378b103899bddbc Author: Martin Sustrik Date: Mon Mar 14 07:11:30 2011 +0100 Remove obsolete assert from pgm_socket.cpp Signed-off-by: Martin Sustrik src/pgm_socket.cpp | 1 - 1 file changed, 1 deletion(-) commit d0c8edde3596f512d629c6b075289ebe86488ea9 Author: Guido Goldstein Date: Sat Mar 12 17:16:27 2011 +0100 Added missing close method w/ check if socket is already closed. Signed-off-by: Guido Goldstein include/zmq.hpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 7b95c5920c3318935b8cd8f3591cd5c65509f819 Author: Martin Sustrik Date: Wed Mar 9 16:34:37 2011 +0100 Windows build fixed Compilation of ip.cpp have failed because EPROTONOSUPPORT was undefined. Including zmq.h should help as the error code is defined there. Signed-off-by: Martin Sustrik src/ip.cpp | 2 ++ 1 file changed, 2 insertions(+) commit b00be2651c39d0c08064f206b31a14e810ba0b22 Author: Brett Cameron Date: Tue Mar 8 14:39:52 2011 +0100 Different fixed to make OpenVMS port work. Signed-off-by: Martin Sustrik AUTHORS | 2 +- src/ip.cpp | 16 ++++++++++------ src/ip.hpp | 2 -- src/semaphore.hpp | 2 ++ src/stdint.hpp | 10 +--------- 5 files changed, 14 insertions(+), 18 deletions(-) commit 184bdb8e2bb6fe252af1bf4dd16d1c9ed8892f7a Author: Martin Sustrik Date: Thu Mar 3 12:37:11 2011 +0100 Bug caused by interaction of REQ/REP routing and HWM fixed. Signed-off-by: Martin Sustrik src/xrep.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 97add1ec2f75858ee950fa19b266396147efa224 Author: Martin Sustrik Date: Thu Mar 3 12:15:08 2011 +0100 Documentation wrt thread-safety cleaned up. Signed-off-by: Martin Sustrik doc/zmq_init.txt | 5 +++++ doc/zmq_socket.txt | 13 +++---------- 2 files changed, 8 insertions(+), 10 deletions(-) commit 18b9ebea32fbf4a4552b0435c8759e5e5c6fe219 Author: Martin Sustrik Date: Wed Mar 2 16:30:40 2011 +0100 The copyrights in file headers updated. Signed-off-by: Martin Sustrik autogen.sh | 8 +++++--- builds/msvc/platform.hpp | 3 ++- devices/zmq_forwarder/zmq_forwarder.cpp | 3 ++- devices/zmq_queue/zmq_queue.cpp | 3 ++- devices/zmq_streamer/zmq_streamer.cpp | 3 ++- include/zmq.h | 3 ++- include/zmq.hpp | 3 ++- include/zmq_utils.h | 3 ++- perf/local_lat.cpp | 3 ++- perf/local_thr.cpp | 3 ++- perf/remote_lat.cpp | 3 ++- perf/remote_thr.cpp | 3 ++- src/array.hpp | 3 ++- src/atomic_counter.hpp | 3 ++- src/atomic_ptr.hpp | 3 ++- src/blob.hpp | 3 ++- src/clock.cpp | 3 ++- src/clock.hpp | 3 ++- src/command.cpp | 3 ++- src/command.hpp | 3 ++- src/config.hpp | 3 ++- src/connect_session.cpp | 3 ++- src/connect_session.hpp | 3 ++- src/ctx.cpp | 3 ++- src/ctx.hpp | 3 ++- src/decoder.cpp | 3 ++- src/decoder.hpp | 3 ++- src/device.cpp | 3 ++- src/device.hpp | 3 ++- src/devpoll.cpp | 3 ++- src/devpoll.hpp | 3 ++- src/dist.cpp | 3 ++- src/dist.hpp | 3 ++- src/encoder.cpp | 3 ++- src/encoder.hpp | 3 ++- src/epoll.cpp | 3 ++- src/epoll.hpp | 3 ++- src/err.cpp | 3 ++- src/err.hpp | 3 ++- src/fd.hpp | 3 ++- src/fq.cpp | 3 ++- src/fq.hpp | 3 ++- src/i_engine.hpp | 3 ++- src/i_inout.hpp | 3 ++- src/i_poll_events.hpp | 3 ++- src/io_object.cpp | 3 ++- src/io_object.hpp | 3 ++- src/io_thread.cpp | 3 ++- src/io_thread.hpp | 3 ++- src/ip.cpp | 3 ++- src/ip.hpp | 3 ++- src/kqueue.cpp | 3 ++- src/kqueue.hpp | 3 ++- src/lb.cpp | 3 ++- src/lb.hpp | 3 ++- src/likely.hpp | 3 ++- src/mailbox.cpp | 3 ++- src/mailbox.hpp | 3 ++- src/msg_content.hpp | 3 ++- src/mutex.hpp | 3 ++- src/named_session.cpp | 3 ++- src/named_session.hpp | 3 ++- src/object.cpp | 3 ++- src/object.hpp | 3 ++- src/options.cpp | 3 ++- src/options.hpp | 3 ++- src/own.cpp | 3 ++- src/own.hpp | 3 ++- src/pair.cpp | 3 ++- src/pair.hpp | 3 ++- src/pgm_receiver.cpp | 3 ++- src/pgm_receiver.hpp | 3 ++- src/pgm_sender.cpp | 3 ++- src/pgm_sender.hpp | 3 ++- src/pgm_socket.cpp | 3 ++- src/pgm_socket.hpp | 3 ++- src/pipe.cpp | 3 ++- src/pipe.hpp | 3 ++- src/poll.cpp | 3 ++- src/poll.hpp | 3 ++- src/poller.hpp | 3 ++- src/poller_base.cpp | 3 ++- src/poller_base.hpp | 3 ++- src/pub.cpp | 3 ++- src/pub.hpp | 3 ++- src/pull.cpp | 3 ++- src/pull.hpp | 3 ++- src/push.cpp | 3 ++- src/push.hpp | 3 ++- src/reaper.cpp | 3 ++- src/reaper.hpp | 3 ++- src/rep.cpp | 3 ++- src/rep.hpp | 3 ++- src/req.cpp | 3 ++- src/req.hpp | 3 ++- src/select.cpp | 3 ++- src/select.hpp | 3 ++- src/semaphore.hpp | 3 ++- src/session.cpp | 3 ++- src/session.hpp | 3 ++- src/socket_base.cpp | 3 ++- src/socket_base.hpp | 3 ++- src/stdint.hpp | 3 ++- src/sub.cpp | 3 ++- src/sub.hpp | 3 ++- src/swap.cpp | 3 ++- src/swap.hpp | 3 ++- src/tcp_connecter.cpp | 3 ++- src/tcp_connecter.hpp | 3 ++- src/tcp_listener.cpp | 3 ++- src/tcp_listener.hpp | 3 ++- src/tcp_socket.cpp | 3 ++- src/tcp_socket.hpp | 3 ++- src/thread.cpp | 3 ++- src/thread.hpp | 3 ++- src/transient_session.cpp | 3 ++- src/transient_session.hpp | 3 ++- src/trie.cpp | 3 ++- src/trie.hpp | 3 ++- src/uuid.cpp | 3 ++- src/uuid.hpp | 3 ++- src/windows.hpp | 3 ++- src/wire.hpp | 3 ++- src/xpub.cpp | 3 ++- src/xpub.hpp | 3 ++- src/xrep.cpp | 3 ++- src/xrep.hpp | 3 ++- src/xreq.cpp | 3 ++- src/xreq.hpp | 4 +++- src/xsub.cpp | 3 ++- src/xsub.hpp | 3 ++- src/ypipe.hpp | 3 ++- src/yqueue.hpp | 3 ++- src/zmq.cpp | 3 ++- src/zmq_connecter.cpp | 3 ++- src/zmq_connecter.hpp | 3 ++- src/zmq_engine.cpp | 3 ++- src/zmq_engine.hpp | 3 ++- src/zmq_init.cpp | 3 ++- src/zmq_init.hpp | 3 ++- src/zmq_listener.cpp | 3 ++- src/zmq_listener.hpp | 3 ++- tests/test_hwm.cpp | 3 ++- tests/test_pair_inproc.cpp | 3 ++- tests/test_pair_ipc.cpp | 3 ++- tests/test_pair_tcp.cpp | 3 ++- tests/test_reqrep_inproc.cpp | 3 ++- tests/test_reqrep_ipc.cpp | 3 ++- tests/test_reqrep_tcp.cpp | 3 ++- tests/test_shutdown_stress.cpp | 3 ++- tests/testutil.hpp | 3 ++- 151 files changed, 306 insertions(+), 153 deletions(-) commit 5fcef1cac4d9faf0279b83ba48899b0e17b8e2d5 Author: Martin Sustrik Date: Wed Mar 2 09:00:36 2011 +0100 ZMQ_MAXMSGSIZE option added The new option allows user to guard against peers sending oversized messages. Connection to peer sending oversized message is dropped. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 14 ++++++++++++++ doc/zmq_setsockopt.txt | 12 ++++++++++++ include/zmq.h | 1 + src/decoder.cpp | 21 +++++++++++++++++---- src/decoder.hpp | 5 ++++- src/options.cpp | 18 ++++++++++++++++++ src/options.hpp | 3 +++ src/pgm_receiver.cpp | 3 ++- src/zmq_engine.cpp | 2 +- 9 files changed, 72 insertions(+), 7 deletions(-) commit 4c7446211a02937f3e2522aece163d417b4ad0b9 Author: Martin Sustrik Date: Tue Mar 1 16:08:40 2011 +0100 Explicit identities bug in inproc transport fixed. The identity of bound socket was not used. Instead, transient identity was generated. Signed-off-by: Martin Sustrik src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67b1f14190186f54fc5954a70f7214411d780aea Author: Martin Sustrik Date: Sat Feb 26 08:42:20 2011 +0100 Memory leak in PUB/XPUB sockets fixed. Signed-off-by: Martin Sustrik src/xpub.cpp | 14 ++++++-------- src/xpub.hpp | 4 ---- src/xsub.cpp | 7 ++----- src/xsub.hpp | 4 ---- 4 files changed, 8 insertions(+), 21 deletions(-) commit d4e418f5f48a4d73e0a80a54593d11a6cd86d7bc Author: Martin Sustrik Date: Fri Feb 25 08:58:01 2011 +0100 Socket with no owner objects is deallocated immediately Till now the deallocation of such socket was delayed till zmq_term() thus creating a "leak". Signed-off-by: Martin Sustrik src/reaper.cpp | 7 ++++--- src/socket_base.cpp | 24 ++++++++++++++---------- src/socket_base.hpp | 4 ++++ 3 files changed, 22 insertions(+), 13 deletions(-) commit c22e52737a5f12f0edfe3f669fa2bfd6e372dec7 Author: Martin Sustrik Date: Thu Feb 24 16:57:53 2011 +0100 Minor patch to zmq_getsockopt(3) man page Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29e0e7dbadfcd0bab70feee119bd7c5e623b38d4 Author: Martin Sustrik Date: Wed Feb 23 11:48:49 2011 +0100 Incorrect PGM sender/receiver creation fixed Signed-off-by: Martin Sustrik src/connect_session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 820fec7f28b54dc5fc16a38eceb405e9af41260c Author: Martin Sustrik Date: Tue Feb 22 21:43:52 2011 +0100 Version bumped to 2.2.0 Signed-off-by: Martin Sustrik include/zmq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43e8868875e1d5287979e5b9060a9b16be45cc79 Author: Martin Sustrik Date: Tue Feb 22 16:23:36 2011 +0100 Added explicit error message in case of memory exhaustion Signed-off-by: Martin Sustrik src/connect_session.cpp | 6 +++--- src/ctx.cpp | 6 +++--- src/decoder.hpp | 2 +- src/encoder.hpp | 2 +- src/epoll.cpp | 2 +- src/err.hpp | 20 +++++++++++++------- src/io_thread.cpp | 2 +- src/ip.cpp | 2 +- src/kqueue.cpp | 2 +- src/object.cpp | 4 ++-- src/pgm_receiver.cpp | 1 + src/pgm_sender.cpp | 2 +- src/pgm_socket.cpp | 3 ++- src/pipe.cpp | 8 ++++---- src/reaper.cpp | 2 +- src/session.cpp | 2 -- src/socket_base.cpp | 6 +++--- src/swap.cpp | 13 ++++++++----- src/trie.cpp | 6 +++--- src/yqueue.hpp | 4 ++-- src/zmq.cpp | 8 ++++---- src/zmq_connecter.cpp | 2 +- src/zmq_init.cpp | 6 +++--- src/zmq_listener.cpp | 2 +- 24 files changed, 61 insertions(+), 52 deletions(-) commit 98ccff1a24a056aef15372b131eee1c1bf8f62ca Author: Mikko Koppanen Date: Mon Feb 21 23:40:48 2011 +0100 Fixes build on at least CentOS 5 Signed-off-by: Mikko Koppanen builds/redhat/zeromq.spec | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 0eea93526d210372c23041d50f4b401a94e3a006 Author: Martin Sustrik Date: Mon Feb 21 17:49:12 2011 +0100 Fix for memory leak caused by long identities Signed-off-by: Martin Sustrik src/zmq_init.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 5c0931121ba1854766599b6b7dbd1a7937febd6d Author: Martin Sustrik Date: Mon Feb 21 11:22:54 2011 +0100 Computation of buffer size for PGM fixed. Signed-off-by: Martin Sustrik src/pgm_socket.cpp | 41 +++++++++++++++++++++++++++++------------ src/pgm_socket.hpp | 3 +++ 2 files changed, 32 insertions(+), 12 deletions(-) commit 12486fecc4f8d9a3bed37cf3d732b1250b075e24 Author: Martin Sustrik Date: Fri Feb 18 17:57:59 2011 +0100 Fix MSVC and SunStudio builds with OpenPGM Signed-off-by: Martin Sustrik src/pgm_socket.hpp | 5 +++++ src/zmq.cpp | 6 ++++++ 2 files changed, 11 insertions(+) commit 17e2ca71b4f6db76a4848d366defa36f1b19bdd7 Author: Martin Sustrik Date: Fri Feb 18 14:15:10 2011 +0100 Logging of duplicit identities added Signed-off-by: Martin Sustrik src/ctx.cpp | 12 ++++++++++-- src/ctx.hpp | 3 ++- src/object.cpp | 8 ++++++-- src/object.hpp | 2 +- src/session.cpp | 1 + 5 files changed, 20 insertions(+), 6 deletions(-) commit 1f536b2d3820ba5435086a77ad34d86a432b94c7 Author: Martin Sustrik Date: Thu Feb 17 14:20:19 2011 +0100 Init object is child of listener This means that all the handshaking while accepting incoming connection is done exclusively in I/O threads, thus it won't overload the application thread's mailbox. Signed-off-by: Martin Sustrik src/zmq_listener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28f3e87fc6c8c5c7046234bf9a08ae62f26d7f3a Author: Martin Sustrik Date: Thu Feb 17 10:33:38 2011 +0100 Add delay before reconnecting So far ZMQ_RECONNECT_IVL delay was used only when TCP connect failed. Now it is used even if connect succeeds and the peer closes the connection afterwards. Signed-off-by: Martin Sustrik src/config.hpp | 3 --- src/connect_session.cpp | 9 +++++---- src/connect_session.hpp | 2 +- src/zmq_connecter.cpp | 4 ++-- src/zmq_connecter.hpp | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) commit fbe5d859f461b0deaa6083fdee077e01e9b47b91 Author: Michael Compton Date: Tue Feb 15 09:33:19 2011 +0100 Added note regarding setting sockopt before bind/connect Signed-off-by: Michael Compton AUTHORS | 1 + doc/zmq_setsockopt.txt | 1 + 2 files changed, 2 insertions(+) commit ba26cc9938c33fe0837322ea34bcd438f9b7d207 Author: Martin Sustrik Date: Sun Feb 13 10:07:10 2011 +0100 Build problem with OpenPGM and MSVC fixed Signed-off-by: Martin Sustrik src/zmq.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14a0e147b2b89fc7fed92c7d9c806b6c53380400 Author: Pieter Hintjens Date: Sat Feb 12 18:36:21 2011 +0100 Fixed win32 issue with WSAStartup - ctx constructor was calling mailbox_t constructor implicitly - moved WSAStartup and WSACleanup to be outside constructor/destructor Signed-off-by: Pieter Hintjens src/ctx.cpp | 17 ----------------- src/zmq.cpp | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 17 deletions(-) commit e94790006ea6f4c64cc1df1c193aa1cf89a75100 Author: Martin Sustrik Date: Wed Feb 9 22:33:57 2011 +0100 reaper added to MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5b82b1ba30d136655c72f116ee2e372ded453952 Author: Martin Sustrik Date: Wed Feb 9 22:23:21 2011 +0100 Reaper thread waits for commands rather them retrieving them periodically Signed-off-by: Martin Sustrik src/command.hpp | 5 ++++ src/object.cpp | 20 ++++++++++++++++ src/object.hpp | 2 ++ src/reaper.cpp | 64 ++++++++++++++++++--------------------------------- src/reaper.hpp | 13 ++++------- src/socket_base.cpp | 53 ++++++++++++++++++++++++++++-------------- src/socket_base.hpp | 21 +++++++++++++---- 7 files changed, 106 insertions(+), 72 deletions(-) commit 80ac398bba928fa7f245d2e107071677a13185cf Author: Martin Sustrik Date: Wed Feb 9 15:32:15 2011 +0100 Initial implementation of reaper thread. Reaper thread destroys the socket asynchronously. zmq_term() can be interrupted by a signal (EINTR). zmq_socket() will return ETERM after zmq_term() was called. Signed-off-by: Martin Sustrik doc/zmq_socket.txt | 3 +- doc/zmq_term.txt | 2 + src/Makefile.am | 2 + src/command.hpp | 15 ++++- src/ctx.cpp | 158 ++++++++++++++++++++++++--------------------------- src/ctx.hpp | 43 +++++++------- src/io_thread.cpp | 2 +- src/io_thread.hpp | 3 + src/object.cpp | 42 ++++++++++++-- src/object.hpp | 8 +-- src/reaper.cpp | 139 ++++++++++++++++++++++++++++++++++++++++++++ src/reaper.hpp | 81 ++++++++++++++++++++++++++ src/socket_base.cpp | 18 +++--- src/socket_base.hpp | 8 ++- 14 files changed, 394 insertions(+), 130 deletions(-) commit 889424e675eecd9d9c7d1121456401d5c43029a5 Author: Martin Sustrik Date: Tue Feb 8 16:19:37 2011 +0100 max_sockets honoured precisely The internal log socket was subtracted from the number of available sockets. So, if max_sockets was set to 100, you could create only 99 sockets. Fixed. Signed-off-by: Martin Sustrik src/ctx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5dcbc34396bb4d256916fafcbb2ddd646ad179e6 Author: Martin Sustrik Date: Tue Feb 8 14:46:27 2011 +0100 zmq_poll with no fds behaves decently Signed-off-by: Martin Sustrik src/zmq.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 908b39bf8309044913a34c632cd432958dcf6960 Author: Mikko Koppanen Date: Mon Feb 7 15:06:20 2011 +0100 m4_esyscmd_s doesnt seem to be portable across different systems Signed-off-by: Mikko Koppanen configure.in | 2 +- version.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c8e5be87d82e73cfc8a6655d2c2b6779f7c223a5 Author: Martin Sustrik Date: Sat Feb 5 15:04:15 2011 +0100 test-hwm added to .gitignore Signed-off-by: Martin Sustrik .gitignore | 1 + 1 file changed, 1 insertion(+) commit 4efead1bbb8f3d2b84ad8e1fc88b65bc621f987f Author: Chris Rempel Date: Sat Feb 5 14:42:21 2011 +0100 Fixed autogen.sh warnings on Debian 6 systems. Signed-off-by: Chris Rempel Please enter the commit message for your changes. Lines starting AUTHORS | 1 + configure.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 042e34a5d99a9d39b0680d063878f13f5d7e7337 Author: Thijs Terlouw Date: Fri Feb 4 16:44:13 2011 +0100 operator void* () added to context_t. Makes it possible to share the context from C++ to C. Signed-off-by: Thijs Terlouw include/zmq.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) commit 3f758ab2f45a07e3e77af4f1b32dc876f5a151ad Author: Martin Sustrik Date: Thu Feb 3 09:59:54 2011 +0100 Don't use RLIMIT_NOFILES in devpoll_t. The patch allows for running 0MQ on Solaris and HP-UX even though ulimit for max number of file descriptors is set to unlimited. Signed-off-by: Martin Sustrik src/devpoll.cpp | 20 ++++++++++---------- src/devpoll.hpp | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) commit ca1acc340c256a35f0db58805bba7cb337d9a5a3 Author: Martin Sustrik Date: Thu Feb 3 08:46:04 2011 +0100 RLIMIT_NOFILE not used in poll_t anymore The problem was that RLIMIT_NOFILE can be set to RLIM_INIFINITY (and that appears to be default on AIX) which caused 0MQ to fail. Signed-off-by: Martin Sustrik src/poll.cpp | 20 ++++++++++---------- src/poll.hpp | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) commit 1e0302633ea10766d21b2a70d62e6f16440c18d4 Author: Mikko Koppanen Date: Sun Jan 30 12:43:17 2011 +0100 Added WithOpenPGM configuration into MSVC builds Signed-off-by: Mikko Koppanen builds/msvc/libzmq/libzmq.vcproj | 77 ++++++++++++++++++++++++++++++++++++++ builds/msvc/msvc.sln | 17 +++++++++ 2 files changed, 94 insertions(+) commit 72d320366f2a1076ced81f4e871c7affbb9ffb9d Author: Mikko Koppanen Date: Sun Jan 30 11:51:30 2011 +0100 Added test for HWM Signed-off-by: Mikko Koppanen tests/Makefile.am | 5 +++- tests/test_hwm.cpp | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) commit 1b15eba9a9718adfeea5cecf499b8247596f6c71 Author: Martin Sustrik Date: Fri Jan 28 07:50:21 2011 +0100 Fixed the problem of subscription forwarding and PGM interaction Signed-off-by: Martin Sustrik src/socket_base.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f7f1dfc86dd649edbd789a5d157d74721338c912 Author: Thijs Terlouw Date: Wed Jan 26 07:01:06 2011 +0100 ZMQ_RECONNECT_IVL_MAX socket option added It allows for exponential back-off strategy when reconnecting. Signed-off-by: Thijs Terlouw AUTHORS | 1 + doc/zmq_getsockopt.txt | 23 ++++++++++++++++++-- doc/zmq_setsockopt.txt | 24 ++++++++++++++++++--- include/zmq.h | 3 ++- src/options.cpp | 22 +++++++++++++++++++ src/options.hpp | 6 +++++- src/zmq_connecter.cpp | 55 +++++++++++++++++++++++++++++++++--------------- src/zmq_connecter.hpp | 12 +++++++++-- 8 files changed, 120 insertions(+), 26 deletions(-) commit 8e61a11b398c95d829f24c388737eb122405c97b Author: Mikko Koppanen Date: Thu Jan 20 22:13:01 2011 +0100 Do not execute ipc tests under MinGW Signed-off-by: Mikko Koppanen tests/Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8561a55d2ca3f99ef7d122cf621b2379924152a5 Author: Mikko Koppanen Date: Thu Jan 20 22:12:25 2011 +0100 Remove unnecessary visibility pragmas Signed-off-by: Mikko Koppanen src/zmq.cpp | 9 --------- 1 file changed, 9 deletions(-) commit c91bf25645b27fb903886093b27fa153c60be2fd Author: Dhammika Pathirana Date: Thu Jan 20 07:52:40 2011 +0100 Fix handle connection reset during session init Patch to handle nmap version probes. Signed-off-by: Dhammika Pathirana src/decoder.hpp | 4 ++++ src/zmq_engine.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 56bdba592cf336b2bd4241a2b8e331cd38a089e4 Author: Martin Sustrik Date: Tue Jan 18 15:57:45 2011 +0100 Fix cppcheck warnings: Prefer prefix ++/-- operators for non-primitive types. Signed-off-by: Martin Sustrik src/ctx.cpp | 6 +++--- src/epoll.cpp | 4 ++-- src/kqueue.cpp | 2 +- src/own.cpp | 2 +- src/pgm_receiver.cpp | 2 +- src/poller_base.cpp | 2 +- src/select.cpp | 4 ++-- src/xrep.cpp | 8 ++++---- 8 files changed, 15 insertions(+), 15 deletions(-) commit b262f2fe9ba02a6d2749e286eaadc65d489600c9 Author: Martin Sustrik Date: Mon Jan 17 14:51:01 2011 +0100 Typo fixed in zmq_send(3) man page. Signed-off-by: Martin Sustrik doc/zmq_send.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 667b247e322e2f0e99b680170a1d004f124b0568 Author: Steven McCoy Date: Mon Jan 17 14:45:24 2011 +0100 Cancel pending timers when decoder for PGM stalls Otherwise the timer event can raise an input event causing assertion on unprocessed data. Signed-off-by: Steven McCoy src/pgm_receiver.cpp | 6 ++++++ 1 file changed, 6 insertions(+) commit a249d152003d7a7ebf048c2a9a0307abc1adb704 Author: Martin Sustrik Date: Sat Jan 15 20:16:00 2011 +0100 Fix MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ 1 file changed, 8 insertions(+) commit 59fa0c9b46a7f8291c68564ad71ef97dd0bae69e Author: Martin Sustrik Date: Fri Jan 14 12:41:12 2011 +0100 Gerard Toonstra added to the authors file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit a348d94c09ab93a19a57ec22a86782e45f1d06ac Author: Martin Sustrik Date: Fri Jan 14 12:38:07 2011 +0100 Fair queueing of subscriptions added to XPUB socket Signed-off-by: Martin Sustrik src/xpub.cpp | 19 ++++++++++++++++--- src/xpub.hpp | 6 ++++++ 2 files changed, 22 insertions(+), 3 deletions(-) commit 58c9830d90fc39727cec88e48f8985a499aa0ee7 Author: Martin Sustrik Date: Fri Jan 14 12:25:54 2011 +0100 XSUB socket has a subscription distributor Signed-off-by: Martin Sustrik src/xsub.cpp | 7 +++++-- src/xsub.hpp | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) commit 8eae7d8507b1c96aec28bca20a157bb7537c3eb8 Author: Martin Sustrik Date: Fri Jan 14 12:05:10 2011 +0100 'message distribution mechanism' separated from XPUB socket Signed-off-by: Martin Sustrik src/Makefile.am | 2 + src/dist.cpp | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/dist.hpp | 76 ++++++++++++++++++++++++++ src/xpub.cpp | 119 +++------------------------------------- src/xpub.hpp | 23 ++------ 5 files changed, 249 insertions(+), 132 deletions(-) commit 18f29ded6a83875c27395d254c25e3d152ae1cc6 Author: Martin Sustrik Date: Thu Jan 13 11:44:23 2011 +0100 Make cppcheck not complain about "'operator=' should return something" Signed-off-by: Martin Sustrik src/array.hpp | 4 ++-- src/atomic_counter.hpp | 2 +- src/atomic_ptr.hpp | 2 +- src/clock.hpp | 2 +- src/connect_session.hpp | 2 +- src/ctx.hpp | 2 +- src/decoder.hpp | 2 +- src/devpoll.hpp | 2 +- src/encoder.hpp | 2 +- src/epoll.hpp | 2 +- src/fq.hpp | 2 +- src/io_object.hpp | 2 +- src/kqueue.hpp | 2 +- src/lb.hpp | 2 +- src/mailbox.hpp | 2 +- src/mutex.hpp | 2 +- src/named_session.hpp | 2 +- src/object.hpp | 2 +- src/own.hpp | 2 +- src/pair.hpp | 2 +- src/pgm_receiver.hpp | 2 +- src/pgm_sender.hpp | 2 +- src/pipe.hpp | 4 ++-- src/poll.hpp | 2 +- src/poller_base.hpp | 2 +- src/pub.hpp | 2 +- src/pull.hpp | 2 +- src/push.hpp | 2 +- src/rep.hpp | 2 +- src/req.hpp | 2 +- src/select.hpp | 2 +- src/semaphore.hpp | 6 +++--- src/session.hpp | 2 +- src/socket_base.hpp | 2 +- src/sub.hpp | 2 +- src/swap.hpp | 4 ++++ src/tcp_connecter.hpp | 2 +- src/tcp_listener.hpp | 2 +- src/tcp_socket.hpp | 2 +- src/thread.hpp | 2 +- src/transient_session.hpp | 2 +- src/trie.hpp | 2 +- src/xpub.hpp | 2 +- src/xrep.hpp | 2 +- src/xreq.hpp | 2 +- src/xsub.hpp | 2 +- src/ypipe.hpp | 2 +- src/yqueue.hpp | 2 +- src/zmq_connecter.hpp | 2 +- src/zmq_engine.hpp | 2 +- src/zmq_init.hpp | 2 +- src/zmq_listener.hpp | 2 +- 52 files changed, 59 insertions(+), 55 deletions(-) commit 70513871082462c957e46986040ebe7b10d64557 Author: Neale Ferguson Date: Wed Jan 12 09:22:25 2011 +0100 Support dynamic generation of C preprocessor definitions for PGM rather than hardcoding them. Signed-off-by: Neale Ferguson AUTHORS | 1 + configure.in | 59 +++++++++++++++++++++++++++++++++++++++++++++++++------ src/Makefile.am | 14 +------------ src/clock.cpp | 5 +++++ 4 files changed, 60 insertions(+), 19 deletions(-) commit 725ebce13ca7871002063c4a254bf532d35ee878 Author: Martin Sustrik Date: Tue Jan 11 21:12:51 2011 +0100 Version bumped to 2.1.1 Signed-off-by: Martin Sustrik include/zmq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd0ba6e89a709cc8afbd5a7c3c4f9f533c428249 Author: Martin Sustrik Date: Mon Jan 10 13:53:30 2011 +0100 Size of inproc hwm and swap is sum of peers' hwms and swaps The meat of the patch was contributed by Douglas Creager. Martin Sustrik implemented storing peer options in inproc endpoint repository. Signed-off-by: Martin Sustrik AUTHORS | 1 + src/ctx.cpp | 18 +++++++++--------- src/ctx.hpp | 15 ++++++++++++--- src/object.cpp | 6 +++--- src/object.hpp | 4 ++-- src/socket_base.cpp | 34 +++++++++++++++++++++++++--------- 6 files changed, 52 insertions(+), 26 deletions(-) commit babdf48aacc585d57457da8dec1fb6ce262bf719 Author: Dhammika Pathirana Date: Fri Jan 7 13:28:35 2011 +0100 Fix pipe writer termination Signed-off-by: Dhammika Pathirana src/pipe.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8e0049e2fb60d31c07786fffe39fdc9c63369dfa Author: Martin Sustrik Date: Fri Jan 7 12:59:48 2011 +0100 Disable sending messages on SUB socket The ability was inherited from XSUB socket. Now it's properly disabled. Signed-off-by: Martin Sustrik src/sub.cpp | 15 ++++++++++++++- src/sub.hpp | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 08cd2ce05da74143b6154f7d665756870077c38d Author: Min Ragan-Kelley Date: Thu Jan 6 08:42:57 2011 +0100 resolve "function declaration isn't a prototype" change two declarations in headers to form f(void); instead of f(); which eliminates the warnings when compiling against zeromq Signed-off-by: MinRK AUTHORS | 1 + include/zmq.h | 2 +- include/zmq_utils.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 472bdcd6b4995d2ab92e97aafa898f083ce1f3ba Author: Martin Sustrik Date: Wed Jan 5 16:57:51 2011 +0100 Return ETERM from getsockopt(ZMQ_EVETS) if zmq_term() was called Signed-off-by: Martin Sustrik src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95eebbfffaf512d81721697026dbb5434c12c27d Author: Martin Sustrik Date: Mon Jan 3 20:50:24 2011 +0100 sunos/gcc3 compilation issue fixed Signed-off-by: Martin Sustrik src/sub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51d2d9b9f82526a9b471dda272c1d54b3d1b1152 Author: Martin Sustrik Date: Mon Dec 20 13:06:36 2010 +0100 Yet one more fix for oversized messages. Signed-off-by: Martin Sustrik src/decoder.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 112d0cd52ec959a6bb4cf02ab03977bc22478246 Author: Martin Sustrik Date: Mon Dec 20 11:47:41 2010 +0100 Fix the segfault when over-sized message is rejected. The in_progress message inside of decoder was left uninitialised in such a case. Signed-off-by: Martin Sustrik src/decoder.cpp | 2 ++ 1 file changed, 2 insertions(+) commit cbbb1e925d699c8b42b2724740d68839c81684c3 Author: Mikko Koppanen Date: Sat Dec 18 12:13:10 2010 +0100 Fix passing through CFLAGS/CPPFLAGS/CXXFLAGS when using --enable-debug Signed-off-by: Mikko Koppanen acinclude.m4 | 12 ++++++------ configure.in | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) commit d15e881ea02232c3e875699b3c25f43ad2fd093c Author: Martin Sustrik Date: Fri Dec 17 16:30:42 2010 +0100 unplugged engine tries to manipulate the pollset -- fixed Signed-off-by: Martin Sustrik src/zmq_engine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b19ee99bb1a2b19a6bf78c7fa2159a85aa608a10 Author: Dhammika Pathirana Date: Fri Dec 17 15:30:56 2010 +0100 fix race condition in session init Signed-off-by: Dhammika Pathirana src/zmq_engine.cpp | 22 +++++++++++++++++++--- src/zmq_engine.hpp | 3 +++ src/zmq_init.cpp | 44 +++++++++++++++++++++++++++----------------- src/zmq_init.hpp | 4 ++++ 4 files changed, 53 insertions(+), 20 deletions(-) commit 27e83cc5258e191a7d5977e202046447df7896b9 Author: Mikko Koppanen Date: Wed Dec 15 20:10:27 2010 +0100 Fixes assertion on pipe.cpp:237 when swap fills up. Fixes swap::full () functionality Signed-off-by: Mikko Koppanen src/lb.cpp | 9 ++++++++- src/pair.cpp | 5 ++++- src/pipe.cpp | 8 ++++---- src/pipe.hpp | 6 +++--- src/swap.cpp | 15 ++++++++++++++- src/swap.hpp | 8 ++++++-- 6 files changed, 39 insertions(+), 12 deletions(-) commit a46980babe076d34347629a54e9635466e6e2a9f Author: Mikko Koppanen Date: Wed Dec 15 14:41:18 2010 +0100 Remove assertions from devices Signed-off-by: Mikko Koppanen devices/zmq_forwarder/zmq_forwarder.cpp | 6 +++++- devices/zmq_queue/zmq_queue.cpp | 6 +++++- devices/zmq_streamer/zmq_streamer.cpp | 6 +++++- src/device.cpp | 33 +++++++++++-------------------- 4 files changed, 26 insertions(+), 25 deletions(-) commit f749f2d21c1b47e6dcd626633acff764a4484b99 Author: Dhammika Pathirana Date: Mon Dec 13 15:40:26 2010 +0100 add basic uri validations Signed-off-by: Dhammika Pathirana src/socket_base.cpp | 50 ++++++++++++++++++++++++++++---------------------- src/socket_base.hpp | 4 ++++ 2 files changed, 32 insertions(+), 22 deletions(-) commit 22b2b9a2b6e1dd18d58ef51f453d2b4777e71be4 Author: Dhammika Pathirana Date: Mon Dec 13 14:18:47 2010 +0100 fix overwriting errno on bind failure Signed-off-by: Dhammika Pathirana src/tcp_listener.cpp | 7 +++++-- src/tcp_listener.hpp | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) commit a9d969a73e303db2f6ddf436740d0bbef7e63dba Author: Martin Sustrik Date: Thu Dec 9 21:44:15 2010 +0100 Bob Beaty added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit fcfad5682ed7a7f5108853d2a7039aedfd9a9ac2 Author: Bob Beaty Date: Thu Dec 9 21:42:58 2010 +0100 Added Recovery Interval in Milliseconds For very high-speed message systems, the memory used for recovery can get to be very large. The corrent limitation on that reduction is the ZMQ_RECOVERY_IVL of 1 sec. I added in an additional option ZMQ_RECOVERY_IVL_MSEC, which is the Recovery Interval in milliseconds. If used, this will override the previous one, and allow you to set a sub-second recovery interval. If not set, the default behavior is to use ZMQ_RECOVERY_IVL. Signed-off-by: Bob Beaty doc/zmq_getsockopt.txt | 20 ++++++++++++++++++++ doc/zmq_setsockopt.txt | 24 ++++++++++++++++++++++++ include/zmq.h | 1 + src/options.cpp | 18 ++++++++++++++++++ src/options.hpp | 2 ++ src/pgm_socket.cpp | 32 ++++++++++++++++++-------------- 6 files changed, 83 insertions(+), 14 deletions(-) commit 1d81d2f1d4549c2cd0999c9544b059c29706f260 Author: Mikko Koppanen Date: Tue Dec 7 11:15:51 2010 +0100 tar doesn't accept -C flag on solaris while extracting Signed-off-by: Mikko Koppanen configure.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a3353150f845cf0f6e8f2355d3aad760bfba4b64 Author: Mikko Koppanen Date: Tue Dec 7 11:15:18 2010 +0100 Fix werror flag store/restore Signed-off-by: Mikko Koppanen acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aed2eeafdc2fce93738368749b61b36f98ea6cd6 Author: Mikko Koppanen Date: Tue Dec 7 11:14:46 2010 +0100 Fix visibility on rhel4 Signed-off-by: Mikko Koppanen acinclude.m4 | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- configure.in | 16 +++++++--------- 2 files changed, 53 insertions(+), 11 deletions(-) commit 9bb5323a1abce0dcf8ed56734313a5249003d868 Author: Martin Lucina Date: Tue Dec 7 11:10:21 2010 +0100 Clarify zmq_send() operation for ZMQ_PUB sockets Signed-off-by: Martin Lucina doc/zmq_socket.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73bbcb552d6fbd1b3744a1ee29202a19e4d2f46e Author: Martin Sustrik Date: Mon Dec 6 23:10:50 2010 +0100 MSVC build fixed Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) commit 8d6cafe06696e17afff03adf4b33bd504b55e277 Author: Martin Sustrik Date: Mon Dec 6 22:57:29 2010 +0100 All devices conflated into a single implementation. Signed-off-by: Martin Sustrik src/Makefile.am | 8 +--- src/device.cpp | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/device.hpp | 31 +++++++++++++ src/forwarder.cpp | 60 ------------------------- src/forwarder.hpp | 31 ------------- src/queue.cpp | 130 ----------------------------------------------------- src/queue.hpp | 31 ------------- src/streamer.cpp | 60 ------------------------- src/streamer.hpp | 31 ------------- src/zmq.cpp | 24 ++++------ 10 files changed, 172 insertions(+), 364 deletions(-) commit ec61751e17fe4ceb62cc16750b12df6056c5962a Author: Martin Sustrik Date: Mon Dec 6 22:36:10 2010 +0100 options.type correctly set for PUB/SUB/XPUB/XSUB Signed-off-by: Martin Sustrik src/pub.cpp | 1 + src/sub.cpp | 1 + src/xpub.cpp | 2 +- src/xsub.cpp | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) commit 8a6ff4ccd2ecbbfb7b2fd80fe621b8a05b0f9bbd Author: Martin Sustrik Date: Mon Dec 6 09:44:23 2010 +0100 xup and xsub files added to the MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 2daa0bb49d52aeb1aa60c94505bdad72348e5d8e Author: Martin Sustrik Date: Sun Dec 5 09:48:52 2010 +0100 XSUB accepts (un)subscriptions in form of messages. Signed-off-by: Martin Sustrik src/sub.cpp | 31 +++++++++++++++++++++++++++++++ src/sub.hpp | 4 ++++ src/xsub.cpp | 40 +++++++++++++++++++++++++--------------- src/xsub.hpp | 3 ++- 4 files changed, 62 insertions(+), 16 deletions(-) commit c80e7b80cc726ca7c29493c2553c8d19792bb6e5 Author: Martin Sustrik Date: Sat Dec 4 23:14:38 2010 +0100 XPUB and XSUB socket types added. These are just placeholders. At the moment XPUB behaves th same as PUB and XSUB as SUB. Signed-off-by: Martin Sustrik include/zmq.h | 4 +- src/Makefile.am | 4 ++ src/pub.cpp | 144 +------------------------------------------ src/pub.hpp | 34 +--------- src/socket_base.cpp | 11 +++- src/sub.cpp | 134 +--------------------------------------- src/sub.hpp | 38 +----------- src/xpub.cpp | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/xpub.hpp | 73 ++++++++++++++++++++++ src/xsub.cpp | 161 ++++++++++++++++++++++++++++++++++++++++++++++++ src/xsub.hpp | 78 +++++++++++++++++++++++ 11 files changed, 506 insertions(+), 346 deletions(-) commit abc8b5e40c55deb96e7674b15629f2affa4eb92a Author: Martin Lucina Date: Wed Dec 1 11:55:56 2010 +0100 Update NEWS file for 2.1.0 release Signed-off-by: Martin Lucina NEWS | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) commit 4a3ed39a22655406e17c49fab4912c4681f3d7bf Author: Steven McCoy Date: Wed Dec 1 11:52:05 2010 +0100 Bump OpenPGM to 5.0.92. Signed-off-by: Steven McCoy configure.in | 2 +- foreign/openpgm/libpgm-5.0.91~dfsg.tar.gz | Bin 444731 -> 0 bytes foreign/openpgm/libpgm-5.0.92~dfsg.tar.gz | Bin 0 -> 444700 bytes 3 files changed, 1 insertion(+), 1 deletion(-) commit 520d621016691bcb2a0551147aaa38a9891080b3 Author: Martin Lucina Date: Wed Dec 1 11:11:25 2010 +0100 Bump ABI version to 1:0:0 for ZeroMQ 2.1.0 release Signed-off-by: Martin Lucina configure.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit b70d628fad5ab97d24473b83fd18997b4e87477d Author: Martin Lucina Date: Wed Dec 1 10:57:37 2010 +0100 Documentation updates for 2.1 - Clarify ZMQ_LINGER, zmq_close (), zmq_term () relationship - New socket options - Clarify thread safety of sockets and migration between threads - Other minor and spelling fixes Signed-off-by: Martin Lucina doc/zmq.txt | 12 +++-- doc/zmq_close.txt | 12 +++-- doc/zmq_errno.txt | 2 +- doc/zmq_getsockopt.txt | 116 ++++++++++++++++++++++++++++++++---------------- doc/zmq_pgm.txt | 6 +-- doc/zmq_poll.txt | 11 ++--- doc/zmq_setsockopt.txt | 67 ++++++++++++++++++---------- doc/zmq_socket.txt | 24 +++++++--- doc/zmq_tcp.txt | 6 +-- doc/zmq_term.txt | 27 ++++++----- doc/zmq_version.txt | 2 +- 11 files changed, 186 insertions(+), 99 deletions(-) commit 5bb0a339be31064900257e04e2ffd32e80911d63 Author: Mikko Koppanen Date: Wed Dec 1 10:33:07 2010 +0100 Prefix variables with "ac_zmq_" - Added a macro for checking clang compiler - Moved basic compiler checks to a macro - Added a macro for checking if compiler supports a flag - Added --enable-debug flag - Added a macro for running normal autoconf check with compiler flags - Added a macro for checking for verbose flag for different compilers (-Wall) - Added a macro for turning on strict standards compliance - Added a macro for turning warnings to errors - Added a macro for checking if compiler supports given pragma - Most of the flags now go through checks if the compilers supports them rather than enumerating different compilers - Added DSO symbol visibility for sun compiler - Enabled verbose mode for sun compiler - Fixed build for ICC 12.x by adding -wd279 to size_t checks - Removed pkg-config checks as those don't seem to be used anywhere Signed-off-by: Mikko Koppanen acinclude.m4 | 461 ++++++++++++++++++++++++++++++++++++++++++++++----- autogen.sh | 6 - configure.in | 212 +++++++++++------------ include/zmq.h | 14 +- include/zmq_utils.h | 14 +- 5 files changed, 532 insertions(+), 175 deletions(-) commit 17d7e6ede0f907461130302cf4bddcdf9e2737cf Merge: 28db150 289b1f5 Author: Martin Sustrik Date: Wed Dec 1 10:27:24 2010 +0100 Merge branch 'maint' * maint: Remove unnecessary cast in kevent_delete Conflicts: src/kqueue.cpp Signed-off-by: Martin Sustrik commit 289b1f5ced492a2dc62edaba0016abde21093692 Author: Martin Lucina Date: Wed Dec 1 10:25:31 2010 +0100 Remove unnecessary cast in kevent_delete Fixes the build on NetBSD where the compiler complains about casting NULL to (int). Signed-off-by: Martin Lucina src/kqueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28db150aaf7b1cffb996f1b27bc082f75acec261 Author: Steven McCoy Date: Mon Nov 29 10:52:22 2010 +0100 Fix thread thunker scope for MSVC. Signed-off-by: Steven McCoy src/thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 325dd2f0914de502ae7687f94927fa98c20380c9 Author: Martin Sustrik Date: Sat Nov 27 22:19:43 2010 +0100 Functions passed to pthread_create are declared as extern "C" So far these were declared as C++ static functions which was incorrect and caused warnings with SunStudio. Signed-off-by: Martin Sustrik src/thread.cpp | 54 ++++++++++++++++++++++------------------ src/thread.hpp | 10 ++++---- tests/test_shutdown_stress.cpp | 19 ++++++++------ 3 files changed, 46 insertions(+), 37 deletions(-) commit 0bc2a05d84dc8e496a60d0c8def7689783e08e01 Author: Martin Sustrik Date: Sat Nov 27 12:51:43 2010 +0100 .gitignore modified to ignore test executables Signed-off-by: Martin Sustrik .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) commit c9584096e033850c77c4c3d4ee99e8073f7b26da Author: Martin Lucina Date: Thu Nov 25 17:12:31 2010 +0100 Control symbol exports using -fvisibility On systems using GCC 4.0 or newer which support symbol visibility in shared libraries, use -fvisibility=hidden and only export explict API functions defined in zmq.cpp. We do not enable -fvisibility on MinGW since this uses a separate mechanism (__declspec). Signed-off-by: Martin Lucina configure.in | 12 ++++++++++++ include/zmq.h | 8 ++++++++ include/zmq_utils.h | 6 ++++++ src/Makefile.am | 3 +-- src/zmq.cpp | 8 ++++++++ 5 files changed, 35 insertions(+), 2 deletions(-) commit 734624be760b3c7942eb26bea77fca918cb1540d Author: Martin Sustrik Date: Thu Nov 25 14:05:43 2010 +0100 Typo fixed in a comment. Signed-off-by: Martin Sustrik src/i_engine.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92618fd99ac19f3169552c25cbabffbe9e983f7f Author: Sebastian Otaegui Date: Thu Nov 25 14:04:53 2010 +0100 Small fix for the rhel6 spec Signed-off-by: Sebastian Otaegui builds/redhat/zeromq.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a689047de091b2ffbc58cde4a89e98119ae0f599 Merge: ac40680 83d9af9 Author: Martin Sustrik Date: Mon Nov 22 16:07:15 2010 +0100 Merge branch 'maint' * maint: Mikko Koppanen becomes a maintainer of the build system. commit 83d9af99516fc620ffdfa6cd5a226ab70673cb5d Author: Martin Sustrik Date: Mon Nov 22 16:06:20 2010 +0100 Mikko Koppanen becomes a maintainer of the build system. Signed-off-by: Martin Sustrik MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac40680ea2f6b32a3c451db1b606524e86a347dd Author: Martin Sustrik Date: Fri Nov 19 12:35:06 2010 +0100 Problem with blob_t initialisation fixed. HP's version of STL doesn't allow for initialisation of basic_string (blob_t) using NULL pointer, while SGI's implementation is OK with that. Fixed. Signed-off-by: Martin Sustrik src/object.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit edf7c18d79b195001d7ed7d05ac30a4d7a64bce1 Author: Mikko Koppanen Date: Fri Nov 19 09:10:26 2010 +0100 Add a check that the compiler actually works. The patch tests that the C and C++ compilers actually exist and work. autoconf seems to default to 'g++' when C++ compiler is not found, which causes the following error (when the compiler isn't there): checking for uuid_generate in -luuid... no configure: error: cannot link with -luuid, install uuid-dev. The config.log contains the real error message "g++ command not found" but the error message shown to the user is misleading. Signed-off-by: Mikko Koppanen acinclude.m4 | 18 ++++++++++++++++++ configure.in | 6 +++++- 2 files changed, 23 insertions(+), 1 deletion(-) commit 945c931daf0c053a9cdbfdbb3ec7d0e90c29fc10 Author: Mikko Koppanen Date: Thu Nov 18 11:51:27 2010 +0100 Run autoupdate on the configure.in I ran autoupdate on the configure.in, which generated most of the patch attached. There is also a small manual fix in which removes the warning "Remember to add LT_INIT to configure.in" which I assume is because AC_PROG_LIBTOOL was called inside a macro. Signed-off-by: Mikko Koppanen acinclude.m4 | 3 --- configure.in | 13 +++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) commit 72a7b93f124cdaee8082aff218f6497c366f53f9 Author: Mikko Koppanen Date: Wed Nov 17 15:10:43 2010 +0100 Allow building without documentation. Allows building without documentation even if asciidoc and xmlto are installed. This eases up working with the build system because doc generation take quite a while on repeated builds. Signed-off-by: Mikko Koppanen acinclude.m4 | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit c86375831d4002ac58501bacebb3fd12d5c651b8 Author: Mikko Koppanen Date: Wed Nov 17 15:09:06 2010 +0100 Remove unneeded substitutions Couldn't find a place where these substs were actually used Signed-off-by: Mikko Koppanen configure.in | 15 --------------- 1 file changed, 15 deletions(-) commit b83d0a1bc077fdcc481fee40dcf4780669c3f3d2 Author: Mikko Koppanen Date: Wed Nov 17 15:07:59 2010 +0100 Remove unnecessary conditional This conditional is unnecessary as BUILD_PGM can be negated in the test. Signed-off-by: Mikko Koppanen configure.in | 1 - src/Makefile.am | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 925595259b51dd84711b620afdf02245e537a38f Author: Mikko Koppanen Date: Wed Nov 17 15:06:51 2010 +0100 MinGW32 build fixes After long discussions in IRC we came to conclusion that there is no elegant way to handle static builds with MinGW32. This patch sets AC_DISABLE_STATIC by default on MinGW32 and Cygwin Signed-off-by: Mikko Koppanen acinclude.m4 | 27 +++++++++++++++++++++++++++ configure.in | 19 ++++++++++++++----- 2 files changed, 41 insertions(+), 5 deletions(-) commit 3dbd5d58723bdc31eb00a6ebf4f643059a432f8c Author: Mikko Koppanen Date: Wed Nov 17 15:05:01 2010 +0100 Fix mingw32 build MinGW32 defines __int64_t as long long, which causes the build to fail unless -Wno-long-long is used. In addition the shutdown_stress test isn't currently compatible with Win. Signed-off-by: Mikko Koppanen configure.in | 3 ++- tests/Makefile.am | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 34f50a6840fdf638bbd7887aa2438006baeb884d Merge: bd0ecf4 152c64f Author: Martin Sustrik Date: Tue Nov 16 14:26:04 2010 +0100 Merge branch 'maint' * maint: FD_SETSIZE defaults to 1024 in MSVC build Conflicts: builds/msvc/libzmq/libzmq.vcproj Signed-off-by: Martin Sustrik commit bd0ecf478466b27103af92db33ffebc3948f2e4e Author: Martin Sustrik Date: Tue Nov 16 14:15:29 2010 +0100 FD_SETSIZE defaults to 1024 in MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 152c64f25df9d037e7f51874d2d66724337aad38 Author: Martin Sustrik Date: Tue Nov 16 14:04:55 2010 +0100 FD_SETSIZE defaults to 1024 in MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit da3327cf8780ea4d454e0aa8904b5aab3c446b23 Author: Mikko Koppanen Date: Mon Nov 15 17:02:36 2010 +0100 Build refactoring Signed-off-by: Mikko Koppanen acinclude.m4 | 53 ++++++++++++++++++++++++++++++ configure.in | 97 +++++++++++++++++++++++++++++-------------------------- src/Makefile.am | 3 +- 3 files changed, 106 insertions(+), 47 deletions(-) commit f77c8ca47ff77af44eab7b4b8538ed49ec428eda Merge: a2500ae ffcb0ba Author: Martin Sustrik Date: Sat Nov 13 18:16:13 2010 +0100 Merge branch 'maint' * maint: Couple of patches for AIX build commit ffcb0baa735538b8b4a0f00799d1185adba2761f Author: Martin Sustrik Date: Sat Nov 13 18:08:18 2010 +0100 Couple of patches for AIX build - RAND_bytes function resides in crypto library - pollfd on AIX used 'reqevents' instead of events and 'retnevents' instead of 'revents' Signed-off-by: Martin Sustrik AUTHORS | 1 + configure.in | 1 + src/zmq.cpp | 23 ++++++++++++++--------- 3 files changed, 16 insertions(+), 9 deletions(-) commit a2500ae3485d6243778b832d22dc6dc02a00f025 Author: Chia-liang Kao Date: Fri Nov 12 19:16:00 2010 +0100 Fix a bug that zmq_poll's select backend spins when timeout=-1, due to ptimeout not properly recalculated after first pass. Signed-off-by: Chia-liang Kao AUTHORS | 1 + src/zmq.cpp | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) commit 8abe67357ab905c5c86191c1d9005666f66b6ca0 Merge: c021702 f7123de Author: Martin Sustrik Date: Fri Nov 12 14:47:26 2010 +0100 Merge branch 'maint' * maint: Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal Conflicts: src/socket_base.cpp commit f7123de9434a96794e6a7cd83b398ceb18c9de8b Author: Marc Rossi Date: Fri Nov 12 14:38:25 2010 +0100 Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal Added block boolean var to second process_commands() invocation for blocking sockets instead of always using true. This prevents the process_commands() call from hanging when a message is received with an empty queue after the call to xrecv() but prior to the initial call to process_commands() invoked when ++ticks == inbound_poll_rate. Signed-off-by: Marc Rossi AUTHORS | 1 + src/socket_base.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit c0217027ccd2267b05e017af436a842755d044b0 Author: Martin Sustrik Date: Sat Nov 6 08:02:14 2010 +0100 Coding style cleanup in mailbox.cpp Signed-off-by: Martin Sustrik src/mailbox.cpp | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit 9da84a5239e5356e34d872c2b5af1d19b9c7eb4f Author: Martin Sustrik Date: Fri Nov 5 17:39:51 2010 +0100 signaler renamed to mailbox For historical reasons queue to transfer commands between threads was called 'signaler'. Given that it was used to pass commands rather than signals it was renamed to 'mailbox', see Erlang mailboxes. Signed-off-by: Martin Sustrik MAINTAINERS | 2 +- builds/msvc/libzmq/libzmq.vcproj | 4 +- src/Makefile.am | 4 +- src/ctx.cpp | 14 +- src/ctx.hpp | 6 +- src/io_thread.cpp | 12 +- src/io_thread.hpp | 15 +- src/mailbox.cpp | 378 ++++++++++++++++++++++++++++++++++++++ src/mailbox.hpp | 61 ++++++ src/own.cpp | 2 +- src/signaler.cpp | 366 ------------------------------------ src/signaler.hpp | 61 ------ src/socket_base.cpp | 12 +- src/socket_base.hpp | 10 +- 14 files changed, 479 insertions(+), 468 deletions(-) commit 9cfdb441f45057c7106a101835d65164fce9470a Author: Martin Sustrik Date: Fri Nov 5 16:38:52 2010 +0100 slots renamed to tids Threads were so far identified by integers called 'slots'. This patch renames them to more comprehensible 'tid's (thread IDs). Signed-off-by: Martin Sustrik src/ctx.cpp | 12 ++++++------ src/ctx.hpp | 6 +++--- src/io_thread.cpp | 4 ++-- src/io_thread.hpp | 2 +- src/object.cpp | 14 +++++++------- src/object.hpp | 8 ++++---- src/own.cpp | 4 ++-- src/own.hpp | 2 +- src/pair.cpp | 4 ++-- src/pair.hpp | 2 +- src/pub.cpp | 4 ++-- src/pub.hpp | 2 +- src/pull.cpp | 4 ++-- src/pull.hpp | 2 +- src/push.cpp | 4 ++-- src/push.hpp | 2 +- src/rep.cpp | 4 ++-- src/rep.hpp | 2 +- src/req.cpp | 4 ++-- src/req.hpp | 2 +- src/socket_base.cpp | 24 ++++++++++++------------ src/socket_base.hpp | 4 ++-- src/sub.cpp | 4 ++-- src/sub.hpp | 2 +- src/xrep.cpp | 4 ++-- src/xrep.hpp | 2 +- src/xreq.cpp | 4 ++-- src/xreq.hpp | 2 +- 28 files changed, 67 insertions(+), 67 deletions(-) commit 623a9c9f1b53bdda9ad61f58cdc7a286e3e474cd Author: Martin Sustrik Date: Thu Nov 4 21:23:07 2010 +0100 Jacob Rideout added to the AUTGORS file. Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 0ada4f8e30088e6a91fef7a45fd7e5dd7bdb9d1d Author: Jacob Rideout Date: Thu Nov 4 21:21:01 2010 +0100 Fix documentation typos Signed-off-by: Jacob Rideout doc/zmq_getsockopt.txt | 6 +++--- doc/zmq_setsockopt.txt | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) commit 1b39bcd88336ebed002e13a8ac3d4bc104b13718 Author: Martin Lucina Date: Thu Nov 4 17:54:47 2010 +0100 Automatically resize signalling socket buffer if full If the socketpair used by signaler_t fills up, this can lead to deadlock. This patch provides partial resolution by attempting to resize SO_SNDBUF on the writer side, and if that fails we shall at least assert rather than hang. I've also refactored the signaler_t code to make the platform-dependent parts clearer and have tested both the MSG_DONTWAIT and standard POSIX path in recv. The Win32 implementation currently does not implement resizing as I'm not convinced that it's safe, but it will also assert like other platforms if signaler_t::send() cannot succeed. The OpenVMS implementation has been carried forward but is untested. Signed-off-by: Martin Lucina src/config.hpp | 4 - src/signaler.cpp | 403 ++++++++++++++++++++++++++---------------------------- src/signaler.hpp | 18 +-- 3 files changed, 201 insertions(+), 224 deletions(-) commit 756f7df8c8e82a67f033049af47a3f783ad951e1 Author: Martin Sustrik Date: Thu Nov 4 16:11:04 2010 +0100 Previous FD_STSIZE patch reverted. Signed-off-by: Martin Sustrik src/select.cpp | 3 --- 1 file changed, 3 deletions(-) commit 2246689c8fcf37cd69bd8098b21dc28a9abbcdeb Author: Martin Sustrik Date: Thu Nov 4 13:12:40 2010 +0100 FD_SETSIZE for internal polling defaults to 1024 If, when compiling 0MQ you don't set FD_SETSIZE, it defaults to 1024 rather than to 64. Signed-off-by: Martin Sustrik src/select.cpp | 3 +++ 1 file changed, 3 insertions(+) commit b90e621329688c83f21f26bbe0367966a245e607 Author: Martin Sustrik Date: Thu Nov 4 10:01:58 2010 +0100 minor typo fixed Devpoll polling mechanism used ZMQ_HAVE_SOLRIS instead of ZMQ_HAVE_SOLARIS in one case. Fixed. Signed-off-by: Martin Sustrik src/devpoll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4a41067d3e873ba4a87c4711ad2f755e7de9157 Author: Martin Sustrik Date: Tue Nov 2 14:27:24 2010 +0100 HP-UX has no OPEN_MAX defined devpoll_t used this constant to determine how many events to retrieve from the poller in one go. The implementation was changed not to depend on this constant. Signed-off-by: Martin Sustrik src/devpoll.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit de93f6359f061d08846cd203ad3ba4fda915e504 Author: Martin Sustrik Date: Tue Nov 2 13:30:20 2010 +0100 crypto library is needed on HP-UX to generate UUIDs Signed-off-by: Martin Sustrik configure.in | 1 + 1 file changed, 1 insertion(+) commit dbcd38252435ff69f1043649a94ec985e7f1ff5b Merge: 0ad71f8 eb83678 Author: Martin Sustrik Date: Mon Nov 1 14:13:36 2010 +0100 Merge branch 'maint' * maint: Add INSTALL to Git, thus making it a normal file commit eb83678b2b5eaca07d6813cab5c7dea493ac4bc8 Author: Martin Lucina Date: Mon Nov 1 14:12:33 2010 +0100 Add INSTALL to Git, thus making it a normal file INSTALL gets added in somewhat magically by automake, or not. Adding it into Git ensures it's always included in the distribution. Signed-off-by: Martin Lucina .gitignore | 1 - INSTALL | 237 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 237 insertions(+), 1 deletion(-) commit 0ad71f88fe5531011c0354f22eeb070b1f729c7d Author: Mikael Helbo Kjaer Date: Mon Nov 1 12:54:58 2010 +0100 select now uses Erase-Remove idiom for retired fds Signed-off-by: Mikael Helbo Kjaer src/select.cpp | 17 ++++++++--------- src/select.hpp | 3 +++ 2 files changed, 11 insertions(+), 9 deletions(-) commit 085b709021c44673d9bf65a5d639e3c2e99703af Author: Martin Sustrik Date: Sat Oct 30 18:17:53 2010 +0200 Documentation for zmq_close and zmq_term fixed. Signed-off-by: Martin Sustrik doc/zmq_close.txt | 12 ++++++------ doc/zmq_term.txt | 21 +++++++++------------ 2 files changed, 15 insertions(+), 18 deletions(-) commit 3d8eb071a2a664d8de1e2e2fa7cb46a4f2764e5e Author: Martin Sustrik Date: Sat Oct 30 16:17:08 2010 +0200 Coding style fixed for pgm_socket Signed-off-by: Martin Sustrik src/pgm_socket.cpp | 211 ++++++++++++++++++++++++++++++++-------------------- src/pgm_socket.hpp | 5 +- 2 files changed, 132 insertions(+), 84 deletions(-) commit b358df9fffd6a4155318356024358b8a1e2b9c9c Author: Martin Sustrik Date: Sat Oct 30 15:08:28 2010 +0200 Name of "GNU Lesser Public License" corrected. Signed-off-by: Martin Sustrik builds/msvc/platform.hpp | 6 +++--- devices/zmq_forwarder/zmq_forwarder.cpp | 6 +++--- devices/zmq_queue/zmq_queue.cpp | 6 +++--- devices/zmq_streamer/zmq_streamer.cpp | 6 +++--- include/zmq.h | 6 +++--- include/zmq.hpp | 6 +++--- include/zmq_utils.h | 6 +++--- perf/local_lat.cpp | 6 +++--- perf/local_thr.cpp | 6 +++--- perf/remote_lat.cpp | 6 +++--- perf/remote_thr.cpp | 6 +++--- src/array.hpp | 6 +++--- src/atomic_counter.hpp | 6 +++--- src/atomic_ptr.hpp | 6 +++--- src/blob.hpp | 6 +++--- src/clock.cpp | 6 +++--- src/clock.hpp | 6 +++--- src/command.cpp | 6 +++--- src/command.hpp | 6 +++--- src/config.hpp | 6 +++--- src/connect_session.cpp | 6 +++--- src/connect_session.hpp | 6 +++--- src/ctx.cpp | 6 +++--- src/ctx.hpp | 6 +++--- src/decoder.cpp | 6 +++--- src/decoder.hpp | 6 +++--- src/devpoll.cpp | 6 +++--- src/devpoll.hpp | 6 +++--- src/encoder.cpp | 6 +++--- src/encoder.hpp | 6 +++--- src/epoll.cpp | 6 +++--- src/epoll.hpp | 6 +++--- src/err.cpp | 6 +++--- src/err.hpp | 6 +++--- src/fd.hpp | 6 +++--- src/forwarder.cpp | 6 +++--- src/forwarder.hpp | 6 +++--- src/fq.cpp | 6 +++--- src/fq.hpp | 6 +++--- src/i_engine.hpp | 6 +++--- src/i_inout.hpp | 6 +++--- src/i_poll_events.hpp | 32 +++++++++++++++---------------- src/io_object.cpp | 6 +++--- src/io_object.hpp | 6 +++--- src/io_thread.cpp | 6 +++--- src/io_thread.hpp | 6 +++--- src/ip.cpp | 6 +++--- src/ip.hpp | 6 +++--- src/kqueue.cpp | 6 +++--- src/kqueue.hpp | 6 +++--- src/lb.cpp | 6 +++--- src/lb.hpp | 6 +++--- src/likely.hpp | 6 +++--- src/msg_content.hpp | 6 +++--- src/mutex.hpp | 6 +++--- src/named_session.cpp | 6 +++--- src/named_session.hpp | 6 +++--- src/object.cpp | 6 +++--- src/object.hpp | 6 +++--- src/options.cpp | 6 +++--- src/options.hpp | 6 +++--- src/own.cpp | 6 +++--- src/own.hpp | 6 +++--- src/pair.cpp | 6 +++--- src/pair.hpp | 6 +++--- src/pgm_receiver.cpp | 6 +++--- src/pgm_receiver.hpp | 6 +++--- src/pgm_sender.cpp | 6 +++--- src/pgm_sender.hpp | 6 +++--- src/pgm_socket.cpp | 6 +++--- src/pgm_socket.hpp | 6 +++--- src/pipe.cpp | 6 +++--- src/pipe.hpp | 6 +++--- src/poll.cpp | 6 +++--- src/poll.hpp | 6 +++--- src/poller.hpp | 6 +++--- src/poller_base.cpp | 6 +++--- src/poller_base.hpp | 6 +++--- src/pub.cpp | 6 +++--- src/pub.hpp | 6 +++--- src/pull.cpp | 6 +++--- src/pull.hpp | 6 +++--- src/push.cpp | 6 +++--- src/push.hpp | 6 +++--- src/queue.cpp | 6 +++--- src/queue.hpp | 6 +++--- src/rep.cpp | 6 +++--- src/rep.hpp | 6 +++--- src/req.cpp | 6 +++--- src/req.hpp | 6 +++--- src/select.cpp | 6 +++--- src/select.hpp | 6 +++--- src/semaphore.hpp | 6 +++--- src/session.cpp | 6 +++--- src/session.hpp | 6 +++--- src/signaler.cpp | 6 +++--- src/signaler.hpp | 6 +++--- src/socket_base.cpp | 6 +++--- src/socket_base.hpp | 6 +++--- src/stdint.hpp | 6 +++--- src/streamer.cpp | 6 +++--- src/streamer.hpp | 6 +++--- src/sub.cpp | 6 +++--- src/sub.hpp | 6 +++--- src/swap.cpp | 6 +++--- src/swap.hpp | 6 +++--- src/tcp_connecter.cpp | 6 +++--- src/tcp_connecter.hpp | 6 +++--- src/tcp_listener.cpp | 6 +++--- src/tcp_listener.hpp | 6 +++--- src/tcp_socket.cpp | 6 +++--- src/tcp_socket.hpp | 6 +++--- src/thread.cpp | 6 +++--- src/thread.hpp | 6 +++--- src/transient_session.cpp | 6 +++--- src/transient_session.hpp | 6 +++--- src/trie.cpp | 6 +++--- src/trie.hpp | 6 +++--- src/uuid.cpp | 13 +++---------- src/uuid.hpp | 6 +++--- src/windows.hpp | 6 +++--- src/wire.hpp | 6 +++--- src/xrep.cpp | 6 +++--- src/xrep.hpp | 6 +++--- src/xreq.cpp | 6 +++--- src/xreq.hpp | 6 +++--- src/ypipe.hpp | 6 +++--- src/yqueue.hpp | 6 +++--- src/zmq.cpp | 6 +++--- src/zmq_connecter.cpp | 6 +++--- src/zmq_connecter.hpp | 6 +++--- src/zmq_engine.cpp | 6 +++--- src/zmq_engine.hpp | 6 +++--- src/zmq_init.cpp | 6 +++--- src/zmq_init.hpp | 6 +++--- src/zmq_listener.cpp | 6 +++--- src/zmq_listener.hpp | 6 +++--- tests/test_pair_inproc.cpp | 6 +++--- tests/test_pair_ipc.cpp | 6 +++--- tests/test_pair_tcp.cpp | 6 +++--- tests/test_reqrep_inproc.cpp | 6 +++--- tests/test_reqrep_ipc.cpp | 6 +++--- tests/test_reqrep_tcp.cpp | 6 +++--- tests/test_shutdown_stress.cpp | 6 +++--- tests/testutil.hpp | 6 +++--- 145 files changed, 448 insertions(+), 455 deletions(-) commit 3d01b929fe5e57311ea62fff4a37abbeaab1b3eb Author: Martin Sustrik Date: Fri Oct 29 08:19:07 2010 +0200 Peter Bourgon added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 9384faf7e5f2fb58d976df8b29f979402346207a Author: Peter Bourgon Date: Fri Oct 29 08:16:59 2010 +0200 Add function to zmq::error_t to access errnum Signed-off-by: Peter Bourgon include/zmq.hpp | 5 +++++ 1 file changed, 5 insertions(+) commit dace2473f1cfea902dfd3be4a233f4092397d65a Author: Martin Sustrik Date: Thu Oct 28 08:44:53 2010 +0200 Burak Arslan added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 3eb935ef6e211d2fa5094ae032777ed319253d11 Author: Burak Arslan Date: Thu Oct 28 08:41:28 2010 +0200 switch to c++-specific headers Signed-off-by: Burak Arslan include/zmq.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a1d4df0fd29e040756bff6302cf9a134074d9b9 Author: Dhammika Pathirana Date: Wed Oct 27 09:37:32 2010 +0200 fix typo, destroy new engine Signed-off-by: Dhammika Pathirana src/session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 465da7b17eef4c86020a5def41a87977410b965a Author: Dhammika Pathirana Date: Tue Oct 26 16:02:47 2010 +0200 drop connection requests with duplicate peer identity Signed-off-by: Dhammika Pathirana src/session.cpp | 9 +++++++-- src/zmq_init.hpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit 401986e6bb565f94d975acaba9504eb6ee3c8598 Author: Martin Sustrik Date: Tue Oct 26 15:35:56 2010 +0200 Build with MSVC2005 fixed To use __rdtsc() function MSVC2005 requires including intrin.h Signed-off-by: Martin Sustrik AUTHORS | 1 + src/clock.cpp | 4 ++++ 2 files changed, 5 insertions(+) commit e1debf15bbdb0747cffb6013d59fb3f73462a600 Author: Steven McCoy Date: Tue Oct 26 14:24:07 2010 +0200 Update to OpenPGM 5.0.91. Signed-off-by: Steven McCoy configure.in | 2 +- foreign/openpgm/libpgm-5.0.78.tar.gz | Bin 511599 -> 0 bytes foreign/openpgm/libpgm-5.0.91~dfsg.tar.gz | Bin 0 -> 444731 bytes 3 files changed, 1 insertion(+), 1 deletion(-) commit 11af0fcc54d06052bbbf20c64a3ce31000d02f7d Merge: 71bef33 8ef53c0 Author: Martin Sustrik Date: Sat Oct 23 22:12:47 2010 +0200 Merge branch 'maint' * maint: Fixes build on Linux using Sun Studio compiler commit 8ef53c0dc6d625bdeb95b7f9626cf58cf6babfed Author: Mikko Koppanen Date: Fri Oct 15 10:43:22 2010 +0200 Fixes build on Linux using Sun Studio compiler Signed-off-by: Mikko Koppanen configure.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 71bef330fc9f09ee070c90d174fc0bcb7783b38d Author: Dhammika Pathirana Date: Sat Oct 23 20:59:54 2010 +0200 handle decoding malformed messages Signed-off-by: Dhammika Pathirana src/decoder.cpp | 26 ++++++++++++++++++-------- src/decoder.hpp | 23 +++++++++++++++++++---- src/zmq_engine.cpp | 26 ++++++++++++++++---------- 3 files changed, 53 insertions(+), 22 deletions(-) commit 8d6979922efff7183ce03b49715472e5b2a6a1df Author: Steven McCoy Date: Sat Oct 23 14:35:02 2010 +0200 Changes for MSVC OpenPGM build. Signed-off-by: Steven McCoy src/pgm_socket.cpp | 1 - src/pgm_socket.hpp | 1 + src/zmq.cpp | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) commit da59f8dd7a7f275eff98e5705767ac89ac503912 Merge: e73c96b 21b0c0b Author: Martin Sustrik Date: Sat Oct 23 13:51:12 2010 +0200 Merge branch 'maint' * maint: SunStudio fixed. commit 21b0c0b4f7896facbfcaf10c8eb777e72a505a45 Author: Martin Sustrik Date: Sat Oct 23 13:49:13 2010 +0200 SunStudio fixed. With SunStudio's implementation of STL basic_string constructor doesn't accept NULL as a parameter even though size of string is set to zero. Fixed. Signed-off-by: Martin Sustrik src/object.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e73c96ba30c5e9ada83592bc2289a56eeadf6155 Author: Martin Sustrik Date: Mon Oct 18 09:11:36 2010 +0200 Minor comment improvement. Signed-off-by: Martin Sustrik src/session.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 0c86f90280d69bd360f7566f9549c904c26d5e42 Author: Martin Sustrik Date: Sun Oct 17 10:26:06 2010 +0200 Minor typo fixed in zmq_getsockopt(3) man page. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a780833683ed1f5bc4a112644836973f8282434b Author: Martin Sustrik Date: Sun Oct 17 10:23:58 2010 +0200 ZMQ_BACKLOG socket option added. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 13 +++++++++++++ doc/zmq_setsockopt.txt | 13 +++++++++++++ include/zmq.h | 1 + src/config.hpp | 4 ---- src/options.cpp | 19 +++++++++++++++++++ src/options.hpp | 3 +++ src/tcp_listener.cpp | 12 +++++++----- src/tcp_listener.hpp | 3 ++- src/zmq_listener.cpp | 2 +- 9 files changed, 59 insertions(+), 11 deletions(-) commit e8e2944f45eab3e22dc46ceac3225a886ca468ad Author: Martin Sustrik Date: Sun Oct 17 09:54:12 2010 +0200 ZMQ_RECONNECT_IVL socket options added. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 15 ++++++++++-- doc/zmq_setsockopt.txt | 13 +++++++++++ include/zmq.h | 1 + src/config.hpp | 3 --- src/options.cpp | 59 +++++++++++++++++++++++++++++++++--------------- src/options.hpp | 3 +++ src/zmq_connecter.cpp | 15 ++++++------ src/zmq_connecter.hpp | 2 +- 8 files changed, 80 insertions(+), 31 deletions(-) commit 8b8837688a97c4d05aff01a6dea7ac5a35b21fa2 Author: Martin Sustrik Date: Sat Oct 16 17:56:25 2010 +0200 Couple of bugs in zmq_poll fixed. Signed-off-by: Martin Sustrik src/zmq.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 72b15a6dae6c199d847ebde5ac73de238f0ebf75 Author: Martin Sustrik Date: Sat Oct 16 16:05:34 2010 +0200 Implementation of zmq_strerror moved from zmq.cpp to err.cpp Signed-off-by: Martin Sustrik src/err.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ src/err.hpp | 9 ++++++--- src/zmq.cpp | 38 +------------------------------------- 3 files changed, 48 insertions(+), 40 deletions(-) commit 61d38fbeed89d69516b9976c60b7711fefed6411 Author: Martin Sustrik Date: Sat Oct 16 14:48:06 2010 +0200 Bug in low precision clock fixed. Signed-off-by: Martin Sustrik src/clock.cpp | 4 ++-- src/clock.hpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 0a03e86e9547fa7c221b316a5a943467adea3dfd Author: Martin Sustrik Date: Sat Oct 16 10:53:29 2010 +0200 ZMQ_LINGER socket option added. 1. ZMQ_LINGER option can be set/get 2. options are part of own_t base class rather than being declared separately by individual objects 3. Linger option is propagated with "term" command so that the newest value of it is used rather than the stored old one. 4. Session sets the linger timer if needed and terminates as soon as it expires. 5. Corresponding documentation updated. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 16 ++++++++++++++++ doc/zmq_setsockopt.txt | 16 ++++++++++++++++ include/zmq.h | 1 + src/command.hpp | 1 + src/object.cpp | 7 ++++--- src/object.hpp | 4 ++-- src/options.cpp | 18 ++++++++++++++++++ src/options.hpp | 3 +++ src/own.cpp | 20 ++++++++++++-------- src/own.hpp | 8 ++++++-- src/pair.cpp | 4 ++-- src/pair.hpp | 2 +- src/pub.cpp | 4 ++-- src/pub.hpp | 2 +- src/pull.cpp | 4 ++-- src/pull.hpp | 2 +- src/push.cpp | 4 ++-- src/push.hpp | 2 +- src/session.cpp | 40 ++++++++++++++++++++++++++++++++++++---- src/session.hpp | 17 ++++++++++++----- src/socket_base.cpp | 4 ++-- src/socket_base.hpp | 6 +----- src/sub.cpp | 4 ++-- src/sub.hpp | 2 +- src/xrep.cpp | 4 ++-- src/xrep.hpp | 2 +- src/xreq.cpp | 4 ++-- src/xreq.hpp | 2 +- src/zmq_connecter.cpp | 5 ++--- src/zmq_connecter.hpp | 4 ---- src/zmq_init.cpp | 3 +-- src/zmq_init.hpp | 4 ---- src/zmq_listener.cpp | 7 +++---- src/zmq_listener.hpp | 6 +----- 34 files changed, 158 insertions(+), 74 deletions(-) commit a1474e305762d32df2b79300d124aac7fa0181c8 Author: Toralf Wittner Date: Sat Oct 16 08:27:57 2010 +0200 Cancel tx_timer_id in pgm_sender_t::out_event(). Signed-off-by: Toralf Wittner AUTHORS | 1 + src/pgm_sender.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 733c6780c557a0eaacdf17961fb8f3841c65f862 Author: Martin Sustrik Date: Sat Oct 16 01:22:18 2010 +0200 Minor code clean-up to keep clang compiler happy. "warning: extra ';' inside a struct or union [-pedantic]" Signed-off-by: Martin Sustrik src/pipe.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b95f11aa0a7887f5eb8eb8e2e0f09532bc3604ba Author: Mikko Koppanen Date: Sat Oct 16 01:05:15 2010 +0200 Don't set pedantic to yes if using ICC Signed-off-by: Mikko Koppanen acinclude.m4 | 17 +++++++++++++++++ configure.in | 13 +++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) commit 48b0a901b8056957e36ba52ae4416d656971bb47 Author: Martin Sustrik Date: Sat Oct 16 00:53:50 2010 +0200 Obsolete compile-time option removed. Signed-off-by: Martin Sustrik src/config.hpp | 4 ---- 1 file changed, 4 deletions(-) commit ae5a3c8a99a30b54d0b079bbd98be286685056e8 Merge: 18d46c8 710615c Author: Martin Sustrik Date: Sat Oct 16 00:49:01 2010 +0200 Merge branch 'maint' * maint: Version number increased. Conflicts: include/zmq.h Signed-off-by: Martin Sustrik commit 710615cdab8c8e500c259bb27df2af70f5ae8275 Author: Martin Sustrik Date: Sat Oct 16 00:47:31 2010 +0200 Version number increased. Signed-off-by: Martin Sustrik include/zmq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18d46c81047fc2f8449a5b4ff3e41cc25bd1cfc2 Merge: 027eed4 53d1677 Author: Martin Sustrik Date: Fri Oct 15 19:38:52 2010 +0200 Merge branch 'maint' commit 53d1677c8b0f85e309c6a067b47c80dedcffb5aa Author: Martin Sustrik Date: Fri Oct 15 19:37:41 2010 +0200 Update NEWS for 2.0.10 release Signed-off-by: Martin Sustrik NEWS | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 027eed41b8bf16cb8b2f9f83be1fe286b39e4fd8 Merge: 2e9871c 6e95205 Author: Martin Sustrik Date: Fri Oct 15 17:46:21 2010 +0200 Merge branch 'maint' * maint: Fix memory leak under Windows commit 6e9520533395b19ed6f6a17de6f196aa5e93da9f Author: Taras Shpot Date: Fri Oct 15 17:45:02 2010 +0200 Fix memory leak under Windows The comment about memory ownership in uuid_t::to_string was misleading as on most platforms the buffer is a field of the object; The string allocated in UuidToString() wasn't properly freed with RpcStringFree() Signed-off-by: Taras Shpot AUTHORS | 1 + src/uuid.cpp | 2 ++ src/uuid.hpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) commit 2e9871ce34b5abc60ebc37c1887b76895537d62a Merge: eeb8e7c 5b44025 Author: Martin Lucina Date: Fri Oct 15 17:30:03 2010 +0200 Merge branch 'maint' Conflicts: configure.in Signed-off-by: Martin Lucina commit 5b44025602b6af952fc434a6e7bf8dff65a00be6 Author: Martin Lucina Date: Fri Oct 15 17:27:10 2010 +0200 maint: Upgrade OpenPGM to 2.1.28~dfsg Upgrade OpenPGM to version 2.1.28 for ZeroMQ 2.0.x. Now we also use the DFSG-compliant upstream release tarball. Signed-off-by: Martin Lucina configure.in | 2 +- foreign/openpgm/libpgm-2-1-28~dfsg.tar.gz | Bin 0 -> 340501 bytes foreign/openpgm/libpgm-2.1.26.tar.gz | Bin 413863 -> 0 bytes 3 files changed, 1 insertion(+), 1 deletion(-) commit eeb8e7c8beef83fe8c23bde888a1081fc9e8e3ec Merge: 7b9e397 3cf01bf Author: Martin Sustrik Date: Fri Oct 15 17:13:36 2010 +0200 Merge branch 'maint' * maint: Makefile.am: Add missing files to distribution, improve maintainer-clean configure.in: Extract API version from zmq.h Added bin directory to ignore list. Conflicts: configure.in include/zmq.h commit 3cf01bf56e66657da795e43f09fa2499b2381dc9 Author: Martin Lucina Date: Fri Oct 15 15:30:10 2010 +0200 Makefile.am: Add missing files to distribution, improve maintainer-clean Add missing files needed for regenerating configure to the distribution; add MAINTAINERS; improve maintainer-clean to produce a really clean tree. Signed-off-by: Martin Lucina Makefile.am | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 3b3df731e60d604794538d0b9f6cb5b802a8745d Author: Martin Lucina Date: Fri Oct 15 15:05:54 2010 +0200 configure.in: Extract API version from zmq.h * Added a version.sh and relevant changes to configure.in to extract the API version from zmq.h at the time autogen.sh is run. * Moved the version macros to be next to zmq_version in zmq.h and improved the comments. * Modified ZMQ_MAKE_VERSION to use (x) instead of plain x when expanding macro parameters. Signed-off-by: Martin Lucina Makefile.am | 1 + configure.in | 8 +++++--- include/zmq.h | 21 +++++++++++---------- version.sh | 21 +++++++++++++++++++++ 4 files changed, 38 insertions(+), 13 deletions(-) commit 7b9e39724eeecf33dde3b0e4fd9f205480afb977 Author: Martin Sustrik Date: Fri Oct 15 11:31:20 2010 +0200 Minor fix in devpoll.hpp Signed-off-by: Martin Sustrik src/devpoll.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17b0785744287d0897175ed13000fba710c2dc5b Author: Martin Sustrik Date: Fri Oct 15 11:29:20 2010 +0200 Destructor of poller_base_t made virtual. Signed-off-by: Martin Sustrik src/poller_base.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e74a439c4b7901f3d3607a2d4142266bc1781b4 Author: Mikko Koppanen Date: Fri Oct 15 11:21:56 2010 +0200 Cast execute_timers() result to int Signed-off-by: Mikko Koppanen src/devpoll.cpp | 2 +- src/epoll.cpp | 2 +- src/kqueue.cpp | 2 +- src/poll.cpp | 2 +- src/select.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit b64b50ae218dbbc362eaeb0571a337650f623e3c Author: Martin Sustrik Date: Fri Oct 15 10:58:19 2010 +0200 Timers correctly canceled by PGM engines on shutdown. Signed-off-by: Martin Sustrik src/pgm_receiver.cpp | 10 +++++++--- src/pgm_sender.cpp | 17 ++++++++++++++--- src/pgm_sender.hpp | 3 ++- 3 files changed, 23 insertions(+), 7 deletions(-) commit e288f7a347eb5a2fd38043d930fc67c8e8bcce9b Author: Mikko Koppanen Date: Fri Oct 15 10:43:22 2010 +0200 Fixes build on Linux using Sun Studio compiler Signed-off-by: Mikko Koppanen configure.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e33e4d7650e36af7d09569de21f7f71b5670945c Author: Mikko Koppanen Date: Fri Oct 15 10:38:09 2010 +0200 ICC related qualifier fix Signed-off-by: Mikko Koppanen AUTHORS | 1 + src/pipe.hpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 03a18c27ace49cbcbb0c495e4c575c34b8f862a4 Author: Martin Pales Date: Thu Oct 14 16:31:58 2010 +0200 zmq::clock_t : return correct value in rdtsc() on solaris Function clock_t::rdtsc() now returns correct value when compiled with sunstudio 12 compiler. Signed-off-by: Martin Pales src/clock.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) commit 26d7669464054a4aed3f0ee9643bffa0e01aab5c Author: Gonzalo Diethelm Date: Thu Oct 14 08:02:43 2010 -0300 Added bin directory to ignore list. .gitignore | 1 + 1 file changed, 1 insertion(+) commit b7386f5b5031b2e75fb4370069935d7f6a0eedbb Author: Martin Sustrik Date: Thu Oct 14 12:13:52 2010 +0200 To insert to associateive STL containers value_type used instead of make_pair Signed-off-by: Martin Sustrik src/ctx.cpp | 4 ++-- src/pgm_receiver.cpp | 2 +- src/socket_base.cpp | 2 +- src/xrep.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit f9e6d94be56fab6d1d8e281e48bb5d6091562acb Author: Martin Pales Date: Thu Oct 14 12:02:05 2010 +0200 zmq::poller_base_t : workaround for sunstudio compiler in add_timer() A minor workaround to resolve compilation error with sunstudio compiler, which does not yet support member templates for std::multimap. Signed-off-by: Martin Pales src/poller_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cafcdbbe2bc9c78899568bb6cb957b700e12c66b Author: Martin Sustrik Date: Thu Oct 14 09:34:09 2010 +0200 Safety measure in zmq_msg_close implemented zmq_msg_close now empties the message on zmq_msg_close, thus not leaving random data in the structure, that may be mistaken for a valid message. Signed-off-by: Martin Sustrik src/zmq.cpp | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit b174ad2c45c746e56b41671a3d68ef496bba6b97 Author: Martin Sustrik Date: Thu Oct 14 09:16:49 2010 +0200 zmq_poll man page fixed to reflect the precise timeout semantics. Signed-off-by: Martin Sustrik doc/zmq_poll.txt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit da73b7c6f60f2ea1adc6fbd99e22576b9ce2f316 Author: Martin Pales Date: Thu Oct 14 08:38:11 2010 +0200 zmq::devpoll_t : correct a typo in loop() A minor typo correction to resolve compilation error on Solaris. Signed-off-by: Martin Pales AUTHORS | 1 + src/devpoll.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit e2167cecaefec6557c7a5712fb75e51487ff69a6 Author: Martin Sustrik Date: Wed Oct 13 21:39:20 2010 +0200 Precise timouts in zmq_poll implemented Signed-off-by: Martin Sustrik src/zmq.cpp | 127 ++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 90 insertions(+), 37 deletions(-) commit 9d96e0037a9d027fd286f771fa2a8db5def485c8 Author: Martin Sustrik Date: Wed Oct 13 10:09:46 2010 +0200 Clean-up of the code related to attaching/detaching engines to sessions. Session base class now handles the engine events exclusively. It notifies derived session types using dedicated "attached" and "detached" events. Couple of bugs was fixed along the way. Signed-off-by: Martin Sustrik src/connect_session.cpp | 9 ++++----- src/connect_session.hpp | 3 ++- src/named_session.cpp | 15 +++++---------- src/named_session.hpp | 5 +---- src/session.cpp | 18 ++++++++---------- src/session.hpp | 12 ++++++------ src/transient_session.cpp | 4 ++++ src/transient_session.hpp | 3 ++- 8 files changed, 32 insertions(+), 37 deletions(-) commit 5ae878b891fa5189f5202f1577d22bdb9ba51f77 Merge: 954d7f7 2568947 Author: Martin Sustrik Date: Wed Oct 13 08:01:13 2010 +0200 Merge branch 'maint' * maint: Add support for RHEL6 in the spec file commit 2568947a71adc0e8ddad54b6054a3b3e532e1613 Author: Sebastian Otaegui Date: Wed Oct 13 07:59:50 2010 +0200 Add support for RHEL6 in the spec file Signed-off-by: Sebastian Otaegui AUTHORS | 1 + builds/redhat/zeromq.spec | 7 +++++++ 2 files changed, 8 insertions(+) commit 954d7f743dbc0c159794915c6deadc374dbf64d2 Author: Martin Sustrik Date: Tue Oct 12 17:55:09 2010 +0200 Avoid duplicate creation of pipes for a single session When a session is being closed down its inbound and outbound pipe pointers are set to null. If (re) connection happens at that time, session may try to reinistantiate the pipes which is wrong. This patch allows session to attach pipes only once in its lifetime. Signed-off-by: Martin Sustrik src/session.cpp | 40 ++++++++++++++++++++++++---------------- src/session.hpp | 3 +++ 2 files changed, 27 insertions(+), 16 deletions(-) commit c6d74e0a0345cae2c09c6fb29911159331c93e64 Author: Steven McCoy Date: Tue Oct 12 12:26:21 2010 +0200 Drop PGM parameters to 100mb friendly range. Signed-off-by: Steven McCoy src/pgm_socket.cpp | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 5b8af52efc0ddf1df5506a2800aa69bc50a44ddb Author: Steven McCoy Date: Mon Oct 11 17:59:58 2010 +0200 Fix assertion in PGM transports on cancel_timer Signed-off-by: Steven McCoy src/pgm_receiver.cpp | 2 ++ src/pgm_sender.cpp | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit e168173162dd26238a799c19142bab8b7885ebb3 Merge: f22e85f 57428db Author: Martin Sustrik Date: Mon Oct 11 16:42:10 2010 +0200 Merge branch 'maint' * maint: configure.in: Do not patch libtool rpath handling Fixing the Red Hat packaging commit 57428db89885631128cb9a48b334b050eb83a512 Author: Martin Lucina Date: Mon Oct 11 16:39:48 2010 +0200 configure.in: Do not patch libtool rpath handling For historic reasons (mainly compatbility with really old libtool), configure was patching libtool to not use rpath in binaries. This breaks (among other things) correct operation of "make check" since the test binaries may not be run with the correct shared library version. Current best practice as seen e.g. at http://wiki.debian.org/RpathIssue suggests that this is no longer an issue, so I'm removing the code that patches libtool. Signed-off-by: Martin Lucina configure.in | 11 ----------- 1 file changed, 11 deletions(-) commit 6cd0867f0208b4fca4cfca2a2ff7bc0de5199d4a Author: Martin Sustrik Date: Mon Oct 11 16:32:27 2010 +0200 Fixing the Red Hat packaging When adding ZMQ_VERSION macros, I incorrectly removed the PACKAGE_VERSION macro. Adding it back. Signed-off-by: Martin Sustrik configure.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f22e85f19f2bf58285e4984e875487f17c85e791 Author: Martin Sustrik Date: Mon Oct 11 12:23:18 2010 +0200 Reverting commit 1d431190f50c86f62460 The patch was supposed to check that pipe writer sends messages in atomic fashion. However, it prevented the user to read half of a message and close the socket. Signed-off-by: Martin Sustrik src/xrep.cpp | 7 ------- 1 file changed, 7 deletions(-) commit 73e7ef37c2e72dd542d20ddc5be30cedce68e329 Author: Martin Sustrik Date: Sun Oct 10 09:23:37 2010 +0200 When XREP silently drops message, it does not empty it -- fixed Signed-off-by: Martin Sustrik src/xrep.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit f5030a93a52fc73292c16dae5f8e0e1b39732df0 Author: Christian Gudrian Date: Sat Oct 9 19:19:50 2010 +0200 Execute the timers before pollset initialisation. Since executing the timers might modify the source pollsets we have to defer the initialisation until after the timers have executed. Signed-off-by: Christian Gudrian AUTHORS | 1 + src/select.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 318cdd1f24cd663702222cc182ae2ccac5e76870 Merge: 214b560 ef8db78 Author: Martin Sustrik Date: Sat Oct 9 08:03:58 2010 +0200 Merge branch 'maint' * maint: Version macros added Conflicts: builds/msvc/platform.hpp Signed-off-by: Martin Sustrik commit ef8db789a1c97152e84ff03c9a7f6e1e77d95981 Author: Martin Sustrik Date: Sat Oct 9 07:53:24 2010 +0200 Version macros added Macro ZMQ_VERSION represents the current version of 0MQ Macro ZMQ_MAKE_VERSION(major,minor,patch) allows to create a representation of the specified version. The versions can be compared using simple <, >, ==, etc. operators. Signed-off-by: Martin Sustrik builds/msvc/platform.hpp | 6 +----- configure.in | 13 ------------- include/zmq.h | 10 ++++++++++ src/zmq.cpp | 6 +++--- 4 files changed, 14 insertions(+), 21 deletions(-) commit 214b56077a7e5d12813c8034013171d33283566c Author: Martin Lucina Date: Fri Oct 8 22:06:41 2010 +0200 Fix missing platform.hpp in zmq_connecter.cpp Missed testing on Win32 Signed-off-by: Martin Lucina src/zmq_connecter.cpp | 1 + 1 file changed, 1 insertion(+) commit daf5d3273b1930af7e4c54ee597b89ecb3763000 Author: Martin Sustrik Date: Fri Oct 8 21:42:55 2010 +0200 More cleanup of session termination process. Fix in termination of session attached to a REP socket. Several fixes of session termination in case of disconnection. Signed-off-by: Martin Sustrik src/connect_session.cpp | 2 ++ src/named_session.cpp | 1 + src/session.cpp | 10 ++++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) commit f90c8d957ea2a11c73a307aae2494a26d22c2f3b Author: Martin Lucina Date: Fri Oct 8 17:49:40 2010 +0200 Scalability improvements for large amounts of connections Add signaler_sndbuf_size option to config.hpp which allows the user to increase the size of the send buffer used by the signalling socketpair. Implement random backoff for reconnection attempts using a primitive pseudo-random generation to prevent reconnection storms. Add wait_before_connect option to config.hpp to allow the user to enable random delay even on initial connect. Default is false for low latency. Signed-off-by: Martin Lucina src/config.hpp | 9 ++++++++- src/signaler.cpp | 39 ++++++++++++++++++++++++++++++++------- src/zmq_connecter.cpp | 25 +++++++++++++++++++++---- src/zmq_connecter.hpp | 3 +++ 4 files changed, 64 insertions(+), 12 deletions(-) commit 7a685b0f88386b11c4c1fcbb45324aa28f4e2eac Author: Martin Sustrik Date: Fri Oct 8 17:23:21 2010 +0200 Clean-up of session termination process Specifically, shutdown of child objects is initiated *before* termination handshake with socket object. Signed-off-by: Martin Sustrik src/fq.cpp | 4 ++ src/fq.hpp | 1 + src/pair.cpp | 12 ++++-- src/pair.hpp | 1 + src/pipe.cpp | 7 ++++ src/pipe.hpp | 1 + src/session.cpp | 111 ++++++++++++++++++++++++++++--------------------------- src/session.hpp | 25 ++++++++----- src/xrep.cpp | 4 ++ src/xrep.hpp | 1 + 10 files changed, 99 insertions(+), 68 deletions(-) commit 965fb7755b50ca1522f076da46fa3651812126e1 Author: Martin Lucina Date: Mon Oct 4 16:22:30 2010 +0200 configure.in: OpenPGM no longer requires pkg-config configure.in | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit d62d721f1a6f7c9df627b3f3fa8e200ddc9bf5f5 Author: Steven McCoy Date: Mon Oct 4 16:14:57 2010 +0200 configure.in: Add amd64 to OpenPGM supported platforms configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d431190f50c86f624605ab11c1580b2d2f7ee06 Author: Nir Soffer Date: Sat Oct 2 10:01:18 2010 +0200 make sure that reader does not terminate in the middle of a multipart message AUTHORS | 1 + src/xrep.cpp | 7 +++++++ 2 files changed, 8 insertions(+) commit 2142b8918a0cea79c79c8ed8ce5652148abe4a39 Author: Martin Sustrik Date: Fri Oct 1 18:46:32 2010 +0200 issue 92 -- Assertion failed: inpipe && outpipe (pair.cpp:86) -- fixed src/pair.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 1a6cd59e8b423cdf3a4f4f854b37c5e0693baef6 Author: Martin Sustrik Date: Fri Oct 1 16:03:08 2010 +0200 stress test for shutdown process added tests/Makefile.am | 7 +++- tests/test_shutdown_stress.cpp | 83 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 2 deletions(-) commit 2a85cce189ae915e85bb567b1401d063284e622f Merge: 0bb76b6 8f9080e Author: Martin Sustrik Date: Fri Oct 1 13:37:59 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 0bb76b667b277b143a9a2901e8bf407f34da469d Author: Martin Sustrik Date: Fri Oct 1 13:37:46 2010 +0200 assert when xrep socket gets reconnected in the middle of the shutdown -- fixed src/xrep.cpp | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) commit 8f9080ebb9ea5576c87a1412748aef1faf0653f6 Author: Martin Lucina Date: Thu Sep 30 15:30:24 2010 +0200 zmq_poll(): Fix busy-loop if timeout is zero Fix a case where zmq_poll() (poll-based version) could go off into a busy-loop if no revents are returned and the timeout passed in is zero. src/zmq.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit ac9b05c36b9d1f5bb3f8465b4c56478c399a01f3 Merge: 98fa2fa 79aea5f Author: Martin Sustrik Date: Thu Sep 30 15:12:06 2010 +0200 Merge branch 'maint' * maint: zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed commit 79aea5ffa61f969ec66205f7c9c8c1611a2fd8da Author: Max Wolf Date: Thu Sep 30 15:10:47 2010 +0200 zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed AUTHORS | 1 + src/xrep.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 98fa2fa802773252a2c569ffea99bce1c5f9cd4c Author: Martin Sustrik Date: Thu Sep 30 14:03:54 2010 +0200 fix in XREP's fair queueing mechanism src/xrep.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 7881ba1bcd2c940037e54a74d6aeb8376329cde4 Author: Martin Sustrik Date: Thu Sep 30 11:35:14 2010 +0200 minor whitespace fix src/pgm_socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaa925eca7a3e0c64d184a4a96fec139166a7470 Author: Steven McCoy Date: Thu Sep 30 11:33:35 2010 +0200 FreeBSD doesn't define MSG_ERRQUEUE -- now it's defined in 0MQ src/pgm_socket.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit ec2e85919e4a34a313e6d0df84cc421bc9682ad8 Author: Ilja Golshtein Date: Wed Sep 29 10:09:03 2010 +0200 C++ binding destructors don't throw exceptions AUTHORS | 1 + include/zmq.hpp | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) commit d14be62499478f31cf641399982ecdf4f6f158c4 Author: Steven McCoy Date: Tue Sep 28 22:46:56 2010 +0200 more fixes to (e)pgm transport src/pgm_receiver.cpp | 21 ++++++++++++- src/pgm_receiver.hpp | 7 +++++ src/pgm_sender.cpp | 37 +++++++++++++++++++++-- src/pgm_sender.hpp | 7 +++++ src/pgm_socket.cpp | 81 +++++++++++++++++++++++++++++++++++++------------- src/pgm_socket.hpp | 5 ++++ 6 files changed, 134 insertions(+), 24 deletions(-) commit 96d85b20982926e60d5065cba3203971c9eeed63 Author: Steven McCoy Date: Tue Sep 28 16:58:51 2010 +0200 * Add assertions to check for OpenPGM calls with invalid parameters. * Assertion to check that pgm_getaddrinfo is actually returning something. * Missing pgm_connect call. * Typo on TOS causing immediate abort. * Placeholder calls for timeouts whilst continuing spin loop functionality. * OpenPGM v5 now supports reference counting so remove init checks. * Duplicate UDP unicast port setting, requires one unicast and one multicast. * Incorrectly set socket rcvbuf size with sndbuf. * Replace std::lexicographical_compare of TSI's with long word integer comparisons. * pgm_socket_t::receive returns -1 on no data. src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 12 +++--- src/pgm_socket.cpp | 109 ++++++++++++++++++++++++++++++++------------------ src/zmq.cpp | 24 +++++------ 4 files changed, 87 insertions(+), 60 deletions(-) commit 00cd7d49c7f2b532b2349581b82577bc714f9bf8 Author: Steven McCoy Date: Tue Sep 28 16:35:29 2010 +0200 Upgrade to OpenPGM-5.0.78 configure.in | 16 +- foreign/openpgm/libpgm-2.1.26.tar.gz | Bin 413863 -> 0 bytes foreign/openpgm/libpgm-5.0.78.tar.gz | Bin 0 -> 511599 bytes src/Makefile.am | 96 +++--- src/pgm_socket.cpp | 564 ++++++++++++++++++---------------- src/pgm_socket.hpp | 2 +- src/zmq.cpp | 26 +- 7 files changed, 364 insertions(+), 340 deletions(-) commit 10bb9d0405169487cd53c6f109091e036577860e Author: Martin Sustrik Date: Tue Sep 28 15:32:12 2010 +0200 Dhammika Pathirana was missing from the AUTOHRS file for some reason -- fixed AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 87beaaa00d49d216f856b8322f1ad04e4f9ecea3 Author: Gonzalo Diethelm Date: Tue Sep 28 15:27:45 2010 +0200 ZMQ_TYPE socket option added .gitignore | 1 + doc/zmq_getsockopt.txt | 13 +++++++++++++ include/zmq.h | 1 + src/options.cpp | 10 ++++++++++ src/options.hpp | 3 +++ src/pair.cpp | 1 + src/pub.cpp | 1 + src/pull.cpp | 1 + src/push.cpp | 1 + src/rep.cpp | 1 + src/req.cpp | 1 + src/sub.cpp | 1 + src/xrep.cpp | 1 + src/xreq.cpp | 1 + 14 files changed, 37 insertions(+) commit 6715f9b1858587db6aec826bdc9a7905bba8030e Merge: 16c3884 c1deb22 Author: Martin Sustrik Date: Tue Sep 28 07:51:59 2010 +0200 Merge branch 'maint' * maint: crash when closing an ypipe -- fixed commit c1deb226f4d1bc94c158c050088813aae96775e9 Author: Dhammika Pathirana Date: Tue Sep 28 07:46:17 2010 +0200 crash when closing an ypipe -- fixed src/ypipe.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f61921d09679c4bed15204ec4e55d1c7313e3f6a Author: Martin Sustrik Date: Tue Sep 28 07:39:16 2010 +0200 REQ socket can die when reply is delivered on wrong unerlying connection -- fixed src/req.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 16c3884a61b146040277ec61bfdbc553c883b4d6 Author: Martin Sustrik Date: Mon Sep 27 11:18:21 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 42 +++++++++++++++++++++++++++++++++----- src/clock.cpp | 2 +- src/ctx.cpp | 6 ++++++ src/select.cpp | 3 ++- 4 files changed, 46 insertions(+), 7 deletions(-) commit e2f834d2947ad7e7f4e6bfb5be653af8b8a2a576 Author: Martin Sustrik Date: Mon Sep 27 09:53:30 2010 +0200 ZMQ_FD and ZMQ_EVENTS documentation added doc/zmq_getsockopt.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 30c1cba4e4276f4ddcb5a455fdd62d4d6bd1edd2 Author: Martin Sustrik Date: Mon Sep 27 09:34:00 2010 +0200 latency optimisation for the case where there are no timers src/poller_base.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit 238640a526c419392bf2df95de196db89ea6eb73 Author: Martin Sustrik Date: Sun Sep 26 21:42:23 2010 +0200 timers properly implemented src/config.hpp | 4 ---- src/devpoll.cpp | 35 +++++---------------------------- src/devpoll.hpp | 6 ------ src/epoll.cpp | 43 +++++++--------------------------------- src/epoll.hpp | 6 ------ src/kqueue.cpp | 40 ++++++------------------------------- src/kqueue.hpp | 6 ------ src/poll.cpp | 33 +++++++------------------------ src/poll.hpp | 6 ------ src/poller_base.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++++++- src/poller_base.hpp | 27 +++++++++++++++++++++++++ src/select.cpp | 37 +++++++---------------------------- src/select.hpp | 6 ------ src/zmq_connecter.cpp | 3 ++- src/zmq_connecter.hpp | 2 +- 15 files changed, 113 insertions(+), 193 deletions(-) commit 8d7bf6684cbb9625ec7c963b8867e2411b49eb57 Author: Martin Sustrik Date: Sun Sep 26 19:22:33 2010 +0200 common base for all pollers created; the only thing it handles at the moment is 'load' src/Makefile.am | 2 ++ src/devpoll.cpp | 13 ++---------- src/devpoll.hpp | 9 ++------- src/epoll.cpp | 12 ++--------- src/epoll.hpp | 9 ++------- src/kqueue.cpp | 15 +++++--------- src/kqueue.hpp | 9 ++------- src/poll.cpp | 12 ++--------- src/poll.hpp | 9 ++------- src/poller_base.cpp | 44 ++++++++++++++++++++++++++++++++++++++++ src/poller_base.hpp | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/select.cpp | 12 ++--------- src/select.hpp | 9 ++------- 13 files changed, 125 insertions(+), 86 deletions(-) commit cf815e8c785254d97190f223765fbbd19a1e6d52 Author: Martin Sustrik Date: Sun Sep 26 18:30:03 2010 +0200 new interfaces for timers; the implementation is not changed yet src/config.hpp | 4 ++++ src/devpoll.cpp | 6 +++--- src/devpoll.hpp | 7 +++---- src/epoll.cpp | 6 +++--- src/epoll.hpp | 4 ++-- src/i_poll_events.hpp | 2 +- src/io_object.cpp | 10 +++++----- src/io_object.hpp | 6 +++--- src/io_thread.cpp | 2 +- src/io_thread.hpp | 2 +- src/kqueue.cpp | 6 +++--- src/kqueue.hpp | 4 ++-- src/poll.cpp | 6 +++--- src/poll.hpp | 4 ++-- src/select.cpp | 6 +++--- src/select.hpp | 4 ++-- src/zmq_connecter.cpp | 8 ++++---- src/zmq_connecter.hpp | 3 +++ 18 files changed, 48 insertions(+), 42 deletions(-) commit be79a9fbc26a55c90b693485f69dfd17f710cb13 Author: Martin Sustrik Date: Sun Sep 26 18:01:59 2010 +0200 minor beautifications src/config.hpp | 4 +++- src/connect_session.hpp | 3 +++ src/named_session.hpp | 3 +++ src/transient_session.hpp | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) commit 5dae27d0ed92aba070f824a4bf5dfa7845aa165d Author: Martin Sustrik Date: Sun Sep 26 16:55:54 2010 +0200 clock_t class added src/Makefile.am | 2 ++ src/clock.cpp | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/clock.hpp | 56 +++++++++++++++++++++++++++++ src/config.hpp | 7 ++++ src/socket_base.cpp | 38 ++++++-------------- src/socket_base.hpp | 2 +- src/zmq.cpp | 43 +++------------------- 7 files changed, 181 insertions(+), 67 deletions(-) commit 7d5061798c93655796b1cf64afd7f5b8146a7681 Merge: e478468 9129b79 Author: Martin Sustrik Date: Sun Sep 26 13:36:05 2010 +0200 Merge branch 'maint' * maint: if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed Conflicts: src/app_thread.cpp commit 9129b792486b87d4f54607321427c2df783c9ec1 Author: Martin Sustrik Date: Sun Sep 26 13:30:33 2010 +0200 if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed src/app_thread.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e478468e52fcb085f9d429cee5dd6938c80343bc Author: Martin Sustrik Date: Tue Sep 21 09:10:17 2010 +0200 minor error in comment fixed src/socket_base.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c118866003277222173ea04916c3e3b82c88b95 Author: Martin Sustrik Date: Tue Sep 21 09:00:46 2010 +0200 The flag in the socket has clear semantics now -- it tracks whether corresponding context was closed, it doesn't track whether zmq_close was called on the socket itself src/socket_base.cpp | 41 +++++++++++++---------------------------- src/socket_base.hpp | 6 ++---- 2 files changed, 15 insertions(+), 32 deletions(-) commit 4d51a52874b814f65a31a0c1b8e0a36cb671697c Author: Martin Sustrik Date: Mon Sep 20 17:25:04 2010 +0200 zmq_poll (select version) now correctly assumes that ZMQ_FD is edge-trigerred src/zmq.cpp | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) commit f49b77eedcdacf9663050a20723ac964af7cdac0 Author: Martin Lucina Date: Mon Sep 20 16:55:46 2010 +0200 zmq_poll honours ZMQ_FORCE_POLL and ZMQ_FORCE_SELECT options src/zmq.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 1abfc92d265bce4f60d63cd302319c451d2c451a Author: Martin Lucina Date: Mon Sep 20 16:45:25 2010 +0200 minor problem in zmq_poll (select version) fixed src/zmq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 328c92a0a70b98b4a3bf09132bd8f8041e4c8628 Author: Martin Sustrik Date: Mon Sep 20 00:06:05 2010 +0200 problem with engine being attached to session while it's being terminated fixed src/encoder.hpp | 2 +- src/session.cpp | 40 ++++++++++++++++++++++++++++++++++++++-- src/session.hpp | 2 ++ src/zmq_engine.hpp | 5 +---- 4 files changed, 42 insertions(+), 7 deletions(-) commit 1d2399720b3fd06da5e7f9f4a211f30c57a9ce2d Author: Martin Sustrik Date: Sun Sep 19 22:45:48 2010 +0200 zmq_init_t destroyed zmq_engine_t before plugging it out from the poller first -- fixed src/zmq_engine.cpp | 10 +++++++++- src/zmq_engine.hpp | 7 ++++++- src/zmq_init.cpp | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) commit cda3c96a7fed0ee603c13e787ac511a1ea171367 Author: Martin Sustrik Date: Sun Sep 19 22:17:37 2010 +0200 minor code reorganisation in ctx_t::terminate src/ctx.cpp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 938689a49128ca17d2bc9662f311c6dbb70240db Author: Martin Sustrik Date: Sun Sep 19 21:40:26 2010 +0200 synchronisation problem fixed in ctx_t src/ctx.cpp | 2 ++ src/zmq_init.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 471013a59fc7f41b694c0bc0b11a459d4c19700d Author: Martin Sustrik Date: Sun Sep 19 20:43:14 2010 +0200 two races fixed in session creation src/zmq_init.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 1f10208ad065c01e172669affdd48b6f2698ff4c Author: Martin Sustrik Date: Sun Sep 19 08:42:19 2010 +0200 termination of pipe via delimiter message could stuck when no data were read from the pipe (because connection wasn't active) -- fixed src/session.cpp | 7 +++++++ 1 file changed, 7 insertions(+) commit 5153b6368be58d0fcaea262463a3fc08ea658f78 Author: Martin Sustrik Date: Sun Sep 19 08:39:53 2010 +0200 obsolete 'active' flag removed from session_t src/session.cpp | 11 +++-------- src/session.hpp | 3 --- 2 files changed, 3 insertions(+), 11 deletions(-) commit 4c6d07d3668558d910c9b1d19d52ccdeacc90574 Author: Martin Sustrik Date: Sat Sep 18 07:37:36 2010 +0200 single term ack counting mechanism for every socket (no separate mechanisms for fq_t and lb_t) src/Makefile.am | 1 - src/fq.cpp | 18 ++++++++---------- src/fq.hpp | 4 ++-- src/i_terminate_events.hpp | 38 -------------------------------------- src/lb.cpp | 18 ++++++++---------- src/lb.hpp | 4 ++-- src/own.hpp | 16 ++++++++-------- src/pull.cpp | 7 ------- src/pull.hpp | 6 +----- src/push.cpp | 7 ------- src/push.hpp | 6 +----- src/sub.cpp | 7 ------- src/sub.hpp | 6 +----- src/xreq.cpp | 7 ------- src/xreq.hpp | 6 +----- 15 files changed, 32 insertions(+), 119 deletions(-) commit fb6ce536d96c82e8f4378a87a5d59aefcc57a96d Author: Martin Sustrik Date: Sat Sep 18 06:48:45 2010 +0200 more details on launch_sibling in comments src/own.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0c215fada4f448788069e42bda34609f74c8b64b Author: Martin Sustrik Date: Sat Sep 18 06:42:46 2010 +0200 potential duplicate termination of pipes removed src/fq.cpp | 1 + src/lb.cpp | 1 + src/socket_base.cpp | 10 ---------- 3 files changed, 2 insertions(+), 10 deletions(-) commit c7b9ba3ccdd5a18afb22dda1afee16c938076c25 Author: Martin Sustrik Date: Fri Sep 17 12:58:20 2010 +0200 reconnection process fixed when failure occurs during init phase src/command.hpp | 3 ++- src/session.cpp | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 85aa25e56cbf6f4194162235fc06bed8683b1bad Author: Martin Sustrik Date: Fri Sep 17 12:32:46 2010 +0200 bug in REQ+multipart fixed src/req.cpp | 1 + 1 file changed, 1 insertion(+) commit ff1080728f3a587ee472a64533fd7e44b365e6f0 Merge: be159b6 e2802d9 Author: Martin Sustrik Date: Wed Sep 15 16:58:00 2010 +0200 Merge branch 'maint' * maint: values of RATE, RECOVERY_IVL and SWAP options are checked for negative values commit e2802d9a4b7e518c549e8dd95a34d2424058f086 Author: Martin Sustrik Date: Wed Sep 15 16:44:57 2010 +0200 values of RATE, RECOVERY_IVL and SWAP options are checked for negative values src/options.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit be159b63169474b644ebd38177bf4e808ebb5487 Author: Martin Lucina Date: Mon Sep 13 13:27:48 2010 +0200 zmq::writer_t: Add missing test for swap src/pipe.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 92f9136ca6c69d2d1588ff5ff65e668e40e0f7eb Author: Martin Sustrik Date: Fri Sep 10 13:11:08 2010 +0200 lefover assert removed src/lb.cpp | 3 --- 1 file changed, 3 deletions(-) commit a68e6739f4248e25a0f9a64c89729f55dfacb842 Author: Martin Sustrik Date: Thu Sep 9 08:25:00 2010 +0200 when no I/O threads are available error is raised instead of assertion doc/zmq_bind.txt | 2 ++ doc/zmq_connect.txt | 2 ++ include/zmq.h | 2 +- src/connect_session.cpp | 15 ++++++++++----- src/ctx.cpp | 7 +++++-- src/ctx.hpp | 5 +++-- src/object.cpp | 4 ++-- src/object.hpp | 2 +- src/socket_base.cpp | 21 ++++++++++++++++++--- src/zmq.cpp | 2 ++ src/zmq_connecter.cpp | 9 +++++++-- src/zmq_listener.cpp | 9 +++++++-- 12 files changed, 60 insertions(+), 20 deletions(-) commit 47e87b7e4b8dd6a0cfbc1f30ffcb06edfa83c853 Author: Martin Sustrik Date: Wed Sep 8 15:45:59 2010 +0200 EMTHREAD error code returned to zmq.h to ensure backward compatibility include/zmq.h | 1 + 1 file changed, 1 insertion(+) commit 91ea20464439b5359a5d803181141fc756fa817c Author: Martin Sustrik Date: Wed Sep 8 08:39:27 2010 +0200 EINTR returned from the blocking functions doc/zmq_getsockopt.txt | 2 ++ doc/zmq_poll.txt | 2 ++ doc/zmq_recv.txt | 3 ++ doc/zmq_send.txt | 3 ++ doc/zmq_setsockopt.txt | 2 ++ src/ctx.cpp | 5 ---- src/ctx.hpp | 3 -- src/io_thread.cpp | 8 ++++-- src/signaler.cpp | 47 ++++++++++++++++---------------- src/signaler.hpp | 2 +- src/socket_base.cpp | 71 ++++++++++++++++++++++++++---------------------- src/socket_base.hpp | 3 +- src/zmq.cpp | 26 ++++++++---------- 13 files changed, 93 insertions(+), 84 deletions(-) commit f374431ebe0f3e18a2b2adeafa8093ff59a9eac2 Author: Martin Sustrik Date: Tue Sep 7 17:06:33 2010 +0200 get rid of 'has virtual functions but non-virtual destructor' warnings in pipe.hpp src/pipe.hpp | 4 ++++ 1 file changed, 4 insertions(+) commit 6d4ffd90dbda943e5d1215fb56d06eeac1b4420f Author: Martin Sustrik Date: Tue Sep 7 15:49:54 2010 +0200 Bug in fq_t and lb_t (when used via ZMQ_EVENTS option) fixed src/fq.cpp | 7 +++++-- src/lb.cpp | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) commit b4740c14e7fc68040037d65bdfac4233b08c5a08 Merge: d4c8de5 01c463c Author: Martin Sustrik Date: Sat Sep 4 19:10:17 2010 +0200 Merge branch 'maint' * maint: Version number incremented to 2.0.10 NEWS updated for 2.0.9 Conflicts: builds/msvc/platform.hpp configure.in commit 01c463cc89626bf9d69500ab1f4957705663788e Author: Martin Sustrik Date: Sat Sep 4 19:08:55 2010 +0200 Version number incremented to 2.0.10 builds/msvc/platform.hpp | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ebf3089735329f0d083a992c98a9fd63b128346e Author: Martin Sustrik Date: Sat Sep 4 18:38:20 2010 +0200 NEWS updated for 2.0.9 NEWS | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d4c8de5050a183f4df72062ce3ff6ceca0128fdf Merge: 76f2e5d 1e84519 Author: Martin Lucina Date: Sat Sep 4 17:49:40 2010 +0200 Merge branch 'maint' * maint: Update .gitignore doc: Add 0MQ version to XHTML11 backend footer build: Generate ChangeLog in 'make dist', ZIP automatically commit 1e8451961e498abd1da61e64f5baf48890e1563e Author: Martin Lucina Date: Sat Sep 4 17:44:11 2010 +0200 Update .gitignore .gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 32fd916c731901944e01c0cb445d32ce0d162693 Author: Martin Lucina Date: Sat Sep 4 17:42:33 2010 +0200 doc: Add 0MQ version to XHTML11 backend footer Thanks to Matt Weinstein for the suggestion. doc/asciidoc.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a6d3629fb4f87c018c7ba2f8c4ff69f7eda07790 Author: Martin Lucina Date: Sat Sep 4 17:26:36 2010 +0200 build: Generate ChangeLog in 'make dist', ZIP automatically Change 'make dist' to generate the Git ChangeLog file, that way it doesn't have to be manually updated nor kept in Git which causes unnecessary work. Also change 'make dist' to invoke 'dist-zip' automatically to generate a ZIP as well as a .tar.gz. Thanks to http://live.gnome.org/Git/ChangeLog for the inspiration to automatically generate ChangeLog. ChangeLog | 2724 ---------------------------------------------------------- Makefile.am | 20 +- configure.in | 2 +- 3 files changed, 17 insertions(+), 2729 deletions(-) commit 76f2e5d5442d3200c8ca09681a887830775c84c0 Merge: ca17612 db7fe85 Author: Martin Sustrik Date: Sat Sep 4 17:19:38 2010 +0200 Merge branch 'maint' * maint: Broken device numbering reverted assert on malformed messages forwarder and streamer devices handle multi-part messages correctly improved null checking in zmq_term Conflicts: AUTHORS include/zmq.h src/zmq.cpp commit db7fe858d6356988fb9a9270c235178e523b2370 Author: Martin Sustrik Date: Sat Sep 4 17:12:08 2010 +0200 Broken device numbering reverted include/zmq.h | 64 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 10227899b1ccdaecf709fbfc7b765e147baf3080 Author: Dhammika Pathirana Date: Fri Aug 27 18:06:37 2010 +0200 assert on malformed messages src/zmq_decoder.cpp | 7 +++++++ 1 file changed, 7 insertions(+) commit c2f3b3b4458187085e148850068f9719c2567614 Author: Jon Dyte Date: Fri Aug 27 06:59:55 2010 +0200 forwarder and streamer devices handle multi-part messages correctly src/forwarder.cpp | 17 ++++++++++++++--- src/queue.cpp | 15 ++++++++------- src/streamer.cpp | 17 ++++++++++++++--- 3 files changed, 36 insertions(+), 13 deletions(-) commit ae567be0c295d9c18da5ba4be4f8403cc844a9a3 Author: Ivo Danihelka Date: Thu Aug 26 12:14:53 2010 +0200 improved null checking in zmq_term AUTHORS | 1 + src/zmq.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit ca176121deb8dbdc62d8a37fec377c07fc786480 Merge: 2673a84 51a84c1 Author: Martin Lucina Date: Sat Sep 4 16:24:21 2010 +0200 Merge branch 'maint' * maint: zmq::select_t, zmq_poll(): assert if FD_SETSIZE reached zmq.h: Fix typo and use of C99 comment Conflicts: src/zmq.cpp commit 51a84c15ded2d70985c9d971ebdf3f3c9c18d590 Author: Martin Lucina Date: Sat Sep 4 16:12:33 2010 +0200 zmq::select_t, zmq_poll(): assert if FD_SETSIZE reached Ensure that 0MQ does not attempt to call select() on more than FD_SETSIZE file descriptors. src/select.cpp | 4 ++++ src/zmq.cpp | 4 ++++ 2 files changed, 8 insertions(+) commit f850190c16df0d55015dc15cd5c0c50289db5dda Author: Martin Lucina Date: Sat Sep 4 16:10:14 2010 +0200 zmq.h: Fix typo and use of C99 comment include/zmq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2673a84e07b93b8607958516c55341c2eb220a6e Merge: 0a1f7e3 ee3444f Author: Martin Lucina Date: Sat Sep 4 16:01:31 2010 +0200 Merge branch 'maint' * maint: doc: Update zmq_socket(3) for 2.0.8 API changes Revert "Added man page for the zmq_device method" Revert "Added clean target that deletes generated man pages" Revert "Various changes to documentation project:" Revert "Reverting 'clean' change to Makefile" Revert "Removed empty man pages for old standalone devices" Revert "Further cleanups on reference manual" Revert "Small improvements to zmq_device(3) page" Revert "Removed wip zmq_deviced from master" commit ee3444ff93888a052cd1ba48aa22892f7077a7a0 Author: Martin Lucina Date: Sat Sep 4 16:00:26 2010 +0200 doc: Update zmq_socket(3) for 2.0.8 API changes doc/zmq_socket.txt | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit 26b39bcdef390f45bb316c4488b51470c27086e2 Author: Martin Lucina Date: Sat Sep 4 15:55:41 2010 +0200 Revert "Added man page for the zmq_device method" This reverts commit f575f252c99c99d3622f313d6bbad6635197a1e4. Conflicts: doc/zmq_device.txt doc/zmq_device.txt | 99 ---------------------------------------------------- 1 file changed, 99 deletions(-) commit 8800ac7de5d50426b0459ebea4568bb77954ea3d Author: Martin Lucina Date: Sat Sep 4 15:55:19 2010 +0200 Revert "Added clean target that deletes generated man pages" This reverts commit 6cd90304476c1c6873d67068009def63e520b848. doc/Makefile.am | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 32baeb610e779862b58c56f66571b01599743a9e Author: Martin Lucina Date: Sat Sep 4 15:55:11 2010 +0200 Revert "Various changes to documentation project:" This reverts commit 77a3c36ff1f11215229a4efdb821a3cb83a9d6fc. doc/asciidoc.conf | 15 ------ doc/zmq.txt | 19 +++++++ doc/zmq_bind.txt | 9 +++- doc/zmq_close.txt | 4 ++ doc/zmq_connect.txt | 4 ++ doc/zmq_cpp.txt | 4 ++ doc/zmq_deviced.txt | 123 --------------------------------------------- doc/zmq_errno.txt | 4 ++ doc/zmq_forwarder.txt | 4 ++ doc/zmq_getsockopt.txt | 4 ++ doc/zmq_init.txt | 4 ++ doc/zmq_inproc.txt | 4 ++ doc/zmq_ipc.txt | 4 ++ doc/zmq_msg_close.txt | 4 ++ doc/zmq_msg_copy.txt | 4 ++ doc/zmq_msg_data.txt | 4 ++ doc/zmq_msg_init.txt | 4 ++ doc/zmq_msg_init_data.txt | 4 ++ doc/zmq_msg_init_size.txt | 4 ++ doc/zmq_msg_move.txt | 4 ++ doc/zmq_msg_size.txt | 4 ++ doc/zmq_pgm.txt | 5 +- doc/zmq_poll.txt | 4 ++ doc/zmq_queue.txt | 4 ++ doc/zmq_recv.txt | 4 ++ doc/zmq_send.txt | 4 ++ doc/zmq_setsockopt.txt | 4 ++ doc/zmq_socket.txt | 31 ++++++------ doc/zmq_streamer.txt | 4 ++ doc/zmq_strerror.txt | 4 ++ doc/zmq_tcp.txt | 4 ++ doc/zmq_term.txt | 5 ++ doc/zmq_version.txt | 4 ++ 33 files changed, 155 insertions(+), 156 deletions(-) commit 4cb6dbd52f5ab65350a448ceb07ff77eacc2b84c Author: Martin Lucina Date: Sat Sep 4 15:55:03 2010 +0200 Revert "Reverting 'clean' change to Makefile" This reverts commit c51de31f2fd31f782e419bfac2fb8d40d689f3e3. doc/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) commit 48d3e2d6607499b8c5feb1258c9bd40519923c69 Author: Martin Lucina Date: Sat Sep 4 15:54:53 2010 +0200 Revert "Removed empty man pages for old standalone devices" This reverts commit 6ff193999d96487f7aa7e578980ab5554e61d8dc. doc/asciidoc.conf | 2 +- doc/zmq_forwarder.txt | 29 +++++++++++++++++++++++++++++ doc/zmq_queue.txt | 29 +++++++++++++++++++++++++++++ doc/zmq_streamer.txt | 29 +++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 1 deletion(-) commit 6c393f53e28f41118eed9a8d034d8d46f2555572 Author: Martin Lucina Date: Sat Sep 4 15:54:34 2010 +0200 Revert "Further cleanups on reference manual" This reverts commit 13f3481e127a6b2390e847af6b01ee88f1b4ae61. Conflicts: doc/zmq_device.txt doc/zmq_tcp.txt doc/zmq.txt | 22 +++++++++++------- doc/zmq_bind.txt | 13 ++++------- doc/zmq_connect.txt | 13 ++++------- doc/zmq_device.txt | 60 +++++++++++------------------------------------- doc/zmq_deviced.txt | 50 +++++++++++----------------------------- doc/zmq_getsockopt.txt | 2 +- doc/zmq_pgm.txt | 4 ++-- doc/zmq_poll.txt | 4 ++-- doc/zmq_setsockopt.txt | 2 +- doc/zmq_tcp.txt | 8 +++---- 10 files changed, 60 insertions(+), 118 deletions(-) commit 6647e61243fdfbdc600ef3bfbd15b7c2ca6e853e Author: Martin Lucina Date: Sat Sep 4 15:51:40 2010 +0200 Revert "Small improvements to zmq_device(3) page" This reverts commit 96bcc9e6cf73781c31042278eb960c0363a78805. doc/zmq_device.txt | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) commit 83d253d72d4fe83f4a001a7cfb4059ccc52b04e0 Author: Martin Lucina Date: Sat Sep 4 15:51:09 2010 +0200 Revert "Removed wip zmq_deviced from master" This reverts commit de0173754cc82f6c08875a892892f043a804554c. doc/Makefile.am | 2 +- doc/zmq.txt | 4 +- doc/zmq_deviced.txt | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+), 2 deletions(-) commit 0a1f7e3524338690551c04ebfccd896a0b96f399 Merge: a81a373 14853c2 Author: Martin Sustrik Date: Thu Sep 2 08:07:40 2010 +0200 Merge branch 'maint' * maint: Prior to this patch prefix_tree asserts. Fix for signaler_t on HP-UX and AIX platforms Mikael Kjaer added to AUTHORS Conflicts: src/trie.cpp commit 14853c2db528b3fd6eed84786053549e71f61bb7 Author: Jon Dyte Date: Thu Sep 2 07:52:02 2010 +0200 Prior to this patch prefix_tree asserts. This is because as it adds the 255th element at a node it attempts to calculate the count member var which is an unsigned char via count = (255 -0) + 1; and pass the result to realloc. Unfortunately the result is zero and realloc returns null; the prefix_tree asserts. I have fixed it by making the count an unsigned short. src/prefix_tree.cpp | 12 ++++++------ src/prefix_tree.hpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 8ec0743c7551de3c76126d080961cece732370f1 Author: Bernd Melchers Date: Thu Sep 2 07:33:57 2010 +0200 Fix for signaler_t on HP-UX and AIX platforms AUTHORS | 1 + src/signaler.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit d5b6f680a54c682da066e769c46075a4bc57bd55 Author: Martin Sustrik Date: Thu Sep 2 07:26:14 2010 +0200 Mikael Kjaer added to AUTHORS AUTHORS | 1 + 1 file changed, 1 insertion(+) commit a81a37399b2ab4143aedf3ff4c442655b9e7e9b7 Merge: 47aaf10 59315eb Author: Martin Sustrik Date: Wed Sep 1 18:42:15 2010 +0200 Merge branch 'maint' * maint: Erasure of retired fd's in select.cpp causes an assertion in MSVC 2008 STL commit 59315ebdcb565d23ba78ba0ca8581cef465fc9bd Author: Mikael Helbo Kjær Date: Wed Sep 1 18:39:12 2010 +0200 Erasure of retired fd's in select.cpp causes an assertion in MSVC 2008 STL I was hitting an issue with an SCL enabled STL library in connection with the way select_t::loop was erasing retired fd's. The problem as identified by the SCL assertion was that by the time the iterator given to the erase method was called it was considered invalid by the library. I am not sure this isn't just a "quirk" of the MSVC STL library as the other code looks valid to me as well. src/select.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 47aaf10211a0f3380dc82942a8cb4eba8c3c7ea3 Merge: 0fe7d3c 99ddfa7 Author: Martin Sustrik Date: Wed Sep 1 18:35:48 2010 +0200 Merge branch 'maint' * maint: maint: will become 2.0.9 Conflicts: builds/msvc/platform.hpp configure.in commit 99ddfa7d65a4556bdbb68fd1831e2de73595f0c7 Author: Martin Sustrik Date: Wed Sep 1 18:22:03 2010 +0200 maint: will become 2.0.9 builds/msvc/platform.hpp | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0fe7d3c998f65fb93b0f3d15c40d8bc2fe0923ad Merge: 651c1ad 6a0c323 Author: Martin Sustrik Date: Wed Sep 1 15:29:19 2010 +0200 conflicts resolved commit 651c1adc80ddc724877f2ebedf07d18e21e363f6 Author: Martin Sustrik Date: Wed Sep 1 15:24:46 2010 +0200 sys transport introdced; inproc://log moved to sys://log src/ctx.cpp | 2 +- src/socket_base.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 6a0c323bb231a2460c238cd0b93293fcd482f9bc Author: Martin Sustrik Date: Wed Sep 1 13:31:45 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 24 ++++++++---------------- src/ctx.cpp | 6 ++++-- 2 files changed, 12 insertions(+), 18 deletions(-) commit ce0972dca3982538fd123b61fbae3928fad6d1e7 Author: Martin Sustrik Date: Wed Sep 1 07:57:38 2010 +0200 context creates an inproc endpoint ('inproc://log') to distribute 0MQ's log messages src/ctx.cpp | 25 +++++++++++++++++++++++-- src/ctx.hpp | 10 ++++++++++ src/object.cpp | 5 +++++ src/object.hpp | 5 +++++ 4 files changed, 43 insertions(+), 2 deletions(-) commit db73c76314d7109da4b400a3edb107c4eda802a2 Author: Martin Sustrik Date: Wed Sep 1 07:56:04 2010 +0200 assert when pipe attaches to PUB socket in process of termination -- fixed src/pub.cpp | 1 - 1 file changed, 1 deletion(-) commit aaa07613d3d7ff1eafcec3d38769f806fae5ac5c Author: Martin Sustrik Date: Wed Sep 1 07:54:57 2010 +0200 pipe being attached to the PAIR socket during its termination process is immediately asked to terminate itself src/pair.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 47c064f2eaa01c324e06588a4f07892762e78fcd Author: Martin Sustrik Date: Wed Sep 1 07:35:15 2010 +0200 hangup when closing socket with no pipes attached -- fixed src/fq.cpp | 5 +++++ src/lb.cpp | 5 +++++ 2 files changed, 10 insertions(+) commit 090e460d6f09b5611d34a4867efb6cf46dd44a34 Author: Martin Sustrik Date: Tue Aug 31 21:03:34 2010 +0200 naming cleanup: yarray->array src/Makefile.am | 3 +- src/array.hpp | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/ctx.hpp | 4 +- src/fq.hpp | 4 +- src/lb.hpp | 4 +- src/pipe.hpp | 6 +-- src/pub.hpp | 4 +- src/socket_base.hpp | 4 +- src/yarray.hpp | 110 -------------------------------------- src/yarray_item.hpp | 64 ---------------------- 10 files changed, 160 insertions(+), 189 deletions(-) commit f5acbb5095901e56a9bfd29b9a8c1c7d3f165ce3 Author: Martin Sustrik Date: Tue Aug 31 07:01:40 2010 +0200 naming cleanup: zmq_encoder->encoder, zmq_decoder->decoder src/Makefile.am | 6 +-- src/decoder.cpp | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/decoder.hpp | 47 +++++++++++++++++---- src/encoder.cpp | 89 +++++++++++++++++++++++++++++++++++++++ src/encoder.hpp | 39 +++++++++++++---- src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 6 +-- src/pgm_sender.hpp | 4 +- src/zmq_decoder.cpp | 114 -------------------------------------------------- src/zmq_decoder.hpp | 59 -------------------------- src/zmq_encoder.cpp | 89 --------------------------------------- src/zmq_encoder.hpp | 55 ------------------------ src/zmq_engine.hpp | 8 ++-- 13 files changed, 283 insertions(+), 349 deletions(-) commit e45583c0f2b8fb11f119317e7c94052c07c24ea8 Author: Martin Sustrik Date: Mon Aug 30 17:04:51 2010 +0200 OSX build fixed -- semaphore replaced by mutex src/semaphore.hpp | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) commit f0a36f9994e0a4e6e509bdf4b6dd75af27f984bb Author: Martin Sustrik Date: Mon Aug 30 15:28:08 2010 +0200 Minor patch to zmq_cpp(7) doc/zmq_cpp.txt | 2 ++ 1 file changed, 2 insertions(+) commit fba90af8a7cc4a790cc9c77b6313fc253b51c36c Author: Martin Sustrik Date: Mon Aug 30 12:10:40 2010 +0200 Issue 54 - socket_base.cpp:162 comparison error src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68d62cfb4eb89549a3118e8e396531452b1174c3 Author: Martin Sustrik Date: Sat Aug 28 14:07:26 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 0a8473deddae61a8c9221c3df089239ac2e2ca62 Author: Guido Goldstein Date: Sat Aug 28 13:58:23 2010 +0200 Added tests for transports per socket tests/Makefile.am | 17 ++++++--- tests/simple.cpp | 32 ----------------- tests/test_pair.cpp | 78 ------------------------------------------ tests/test_pair_inproc.cpp | 30 ++++++++++++++++ tests/test_pair_ipc.cpp | 30 ++++++++++++++++ tests/test_pair_tcp.cpp | 30 ++++++++++++++++ tests/test_reqrep.cpp | 77 ----------------------------------------- tests/test_reqrep_inproc.cpp | 30 ++++++++++++++++ tests/test_reqrep_ipc.cpp | 30 ++++++++++++++++ tests/test_reqrep_tcp.cpp | 30 ++++++++++++++++ tests/testutil.hpp | 69 ++++++++++++++++++++++++++++++++++--- 11 files changed, 258 insertions(+), 195 deletions(-) commit 6ec783e7023b4c4d4d10a3870b4c560684ae7069 Author: Martin Sustrik Date: Sat Aug 28 13:26:19 2010 +0200 prefix_tree_t renamed to trie_t src/Makefile.am | 4 +- src/prefix_tree.cpp | 180 --------------------------------------------------- src/prefix_tree.hpp | 55 ---------------- src/sub.hpp | 4 +- src/trie.cpp | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/trie.hpp | 58 +++++++++++++++++ 6 files changed, 242 insertions(+), 239 deletions(-) commit beea535f9d7ff210ea035de190c0d87184ee1963 Author: Martin Sustrik Date: Sat Aug 28 13:18:53 2010 +0200 swap's block size made into a compile-time parameter src/config.hpp | 4 ++++ src/swap.cpp | 5 +++-- src/swap.hpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) commit d8b975f4e73ae940c0c0f9c8c6c7aac1199fee09 Author: Martin Sustrik Date: Sat Aug 28 13:14:45 2010 +0200 msg_store_t renamed to swap_t src/Makefile.am | 4 +- src/msg_store.cpp | 307 ----------------------------------------------------- src/msg_store.hpp | 114 -------------------- src/pipe.cpp | 2 +- src/pipe.hpp | 4 +- src/swap.cpp | 307 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/swap.hpp | 114 ++++++++++++++++++++ 7 files changed, 426 insertions(+), 426 deletions(-) commit d90b4071151e3752208d3a9d49fb50845f89ab1b Author: Martin Sustrik Date: Sat Aug 28 13:06:58 2010 +0200 refactoring of pipe/swap interaction src/pipe.cpp | 194 ++++++++++++++++++++++++++++++---------------------------- src/pipe.hpp | 39 ++++++------ 2 files changed, 120 insertions(+), 113 deletions(-) commit 42000d2c4f988a164eaeb9b580a4f588d91e353e Author: Martin Sustrik Date: Sat Aug 28 10:15:03 2010 +0200 terminology unified: revive->activate src/command.hpp | 13 ++++++------- src/fq.cpp | 4 ++-- src/object.cpp | 26 +++++++++++++------------- src/object.hpp | 8 ++++---- src/pipe.cpp | 8 ++++---- src/pipe.hpp | 4 ++-- src/socket_base.cpp | 5 +++-- 7 files changed, 34 insertions(+), 34 deletions(-) commit 92923cd40b645af844c5ed1055a0a45c6daa3c89 Author: Martin Sustrik Date: Sat Aug 28 08:44:12 2010 +0200 bug in pipe deactivation fixed src/pipe.cpp | 8 +++----- src/socket_base.cpp | 2 +- tests/test_pair.cpp | 7 ++++--- tests/test_reqrep.cpp | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) commit 035c937ee7452708a9dd3abd851fda6a753808f4 Author: Martin Sustrik Date: Sat Aug 28 07:02:22 2010 +0200 zmq_poll: account for the fact that ZMQ_FD is edge-triggered src/zmq.cpp | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 67aa788577fb49474dd7329b14316d25f1b3c08b Author: Guido Goldstein Date: Sat Aug 28 06:31:40 2010 +0200 Fixed socket states in tests tests/test_pair.cpp | 3 +++ tests/test_reqrep.cpp | 3 +++ tests/testutil.hpp | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) commit 4d9b046977f895f8d61731672a5e84967ed85eb2 Author: Guido Goldstein Date: Fri Aug 27 21:13:45 2010 +0200 two tests added AUTHORS | 1 + tests/Makefile.am | 4 ++- tests/simple.cpp | 2 +- tests/test_pair.cpp | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/test_reqrep.cpp | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/testutil.hpp | 64 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 217 insertions(+), 2 deletions(-) commit 0b76f234a2c521194029c6708c394391dfc66ea7 Merge: 35cb1fa 98dc118 Author: Martin Lucina Date: Fri Aug 27 18:41:10 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 35cb1fade62a92fdccc9fa0d75a3b69115c56c35 Author: Martin Lucina Date: Fri Aug 27 18:35:59 2010 +0200 Add a basic framework for a test suite The test suite uses the standard automake support. Tests are always built, but run only when you do a "make check". Makefile.am | 4 ++-- configure.in | 2 +- tests/Makefile.am | 8 ++++++++ tests/simple.cpp | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) commit 98dc11843e3234e3d70b50d4f650089e7cf99e63 Author: Dhammika Pathirana Date: Fri Aug 27 18:06:37 2010 +0200 assert on malformed messages src/zmq_decoder.cpp | 7 +++++++ 1 file changed, 7 insertions(+) commit 56faac7f19bf2a6d2c7b6e0c2e35fcb667a72a48 Author: Martin Sustrik Date: Fri Aug 27 15:01:38 2010 +0200 zmq_poll returns prematurely even if infinite timeout is set - fixed src/zmq.cpp | 204 +++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 114 insertions(+), 90 deletions(-) commit 3cb84b5ceac0f8652a99ec61152a865292e02cf1 Author: Jon Dyte Date: Fri Aug 27 06:59:55 2010 +0200 forwarder and streamer devices handle multi-part messages correctly src/forwarder.cpp | 17 ++++++++++++++--- src/queue.cpp | 15 ++++++++------- src/streamer.cpp | 17 ++++++++++++++--- 3 files changed, 36 insertions(+), 13 deletions(-) commit 43f2c6ff5b15d6feae2bd608e50503f7d4c62682 Author: Ivo Danihelka Date: Thu Aug 26 12:14:53 2010 +0200 improved null checking in zmq_term AUTHORS | 1 + src/zmq.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit b608c19c5a28f0f49a106bfddf680f0a410df6c8 Author: Martin Sustrik Date: Tue Aug 24 15:58:48 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 52 +++++++++++++++++++++++++------------- src/pipe.hpp | 9 ++++--- src/socket_base.cpp | 1 + 3 files changed, 40 insertions(+), 22 deletions(-) commit 9b8993efb48ccbe3df917338cc078129b5af495b Author: Martin Sustrik Date: Tue Aug 24 11:19:22 2010 +0200 elementary fixes to the named session src/named_session.cpp | 21 +++++++++++---------- src/session.cpp | 37 +++++++++++-------------------------- src/session.hpp | 9 ++++----- src/socket_base.cpp | 12 ++++++------ src/socket_base.hpp | 7 +++---- src/zmq_init.cpp | 6 ++---- 6 files changed, 37 insertions(+), 55 deletions(-) commit 46d70555659c05a0c8d95c6d7aa8c7e0cc5ebc66 Author: Martin Sustrik Date: Tue Aug 24 10:20:55 2010 +0200 connecter object unregisters its fd correctly src/zmq_connecter.cpp | 12 ++++-------- src/zmq_connecter.hpp | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) commit 87655b0b9d9121465e0b2ea1976b0879b1b1f756 Author: Martin Sustrik Date: Tue Aug 24 09:57:15 2010 +0200 listener object unregisters its fd correctly src/zmq_engine.cpp | 3 --- src/zmq_listener.cpp | 5 ++--- src/zmq_listener.hpp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) commit 0d5f3ebbdad12a63e7cc28c53c38d750761a75e3 Author: Martin Sustrik Date: Tue Aug 24 09:39:17 2010 +0200 sessions created by listerner are correctly shut down src/session.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 5a731e73c855cd96040b3ecd55ef3b65606e1eb6 Author: Martin Sustrik Date: Sat Aug 14 08:53:52 2010 +0200 added ZMQ_MAKE_VALGRIND_HAPPY compile-time option perf/remote_thr.cpp | 8 ++++++-- src/object.cpp | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) commit 43e34d028115c43577713c0c3e1f0c33b0aac94a Author: Martin Sustrik Date: Sat Aug 14 08:37:38 2010 +0200 engine leak fixed; pgm compilation fixed src/connect_session.cpp | 20 ++++++++------------ src/i_engine.hpp | 4 ++++ src/pgm_receiver.cpp | 12 +++++++++--- src/pgm_receiver.hpp | 7 ++++--- src/pgm_sender.cpp | 12 +++++++++--- src/pgm_sender.hpp | 7 ++++--- src/session.cpp | 3 +++ src/socket_base.cpp | 2 -- src/zmq_engine.cpp | 6 ++++++ src/zmq_engine.hpp | 1 + 10 files changed, 48 insertions(+), 26 deletions(-) commit 45f83d78a56f4b3a812c87fec03a75558445b2ab Author: Martin Sustrik Date: Thu Aug 12 15:03:51 2010 +0200 one more dezombification bug fixed src/ctx.cpp | 33 +++++++++------------------------ src/ctx.hpp | 7 +------ src/object.cpp | 5 ----- src/object.hpp | 3 --- src/own.cpp | 7 ++++++- src/own.hpp | 5 ++++- src/socket_base.cpp | 21 ++++++++++++++++----- src/socket_base.hpp | 12 ++++++++++-- 8 files changed, 46 insertions(+), 47 deletions(-) commit 936dbf956b0f1471a96fc06bcba67765257dbc4a Author: Martin Sustrik Date: Thu Aug 12 08:16:18 2010 +0200 dezombification procedure fixed src/ctx.cpp | 46 ++++++++++++++++++++++++++++++++++------------ src/ctx.hpp | 12 ++++++++---- src/object.cpp | 5 +++++ src/object.hpp | 3 +++ src/socket_base.cpp | 10 ++++++---- src/socket_base.hpp | 4 ++-- src/zmq.cpp | 2 +- 7 files changed, 59 insertions(+), 23 deletions(-) commit 76bd6e73c335dbebd8bd30565f83a810058f2cc8 Author: Martin Sustrik Date: Wed Aug 11 17:06:49 2010 +0200 engine termination on disconnect fixed src/connect_session.cpp | 2 +- src/connect_session.hpp | 6 +++--- src/session.cpp | 14 ++++++++++++-- src/session.hpp | 1 + src/transient_session.cpp | 2 +- src/transient_session.hpp | 5 +++-- 6 files changed, 21 insertions(+), 9 deletions(-) commit d13933bc62fce71b5a58118020e0dd3776e79aa9 Author: Martin Sustrik Date: Wed Aug 11 14:09:56 2010 +0200 I/O object hierarchy implemented src/Makefile.am | 11 +- src/command.hpp | 4 +- src/connect_session.cpp | 115 ++++++++++++ src/connect_session.hpp | 60 ++++++ src/ctx.cpp | 6 +- src/ctx.hpp | 2 +- src/fq.cpp | 21 ++- src/fq.hpp | 11 +- src/i_engine.hpp | 15 +- src/i_inout.hpp | 21 +-- src/i_terminate_events.hpp | 38 ++++ src/io_object.cpp | 22 ++- src/io_object.hpp | 10 +- src/lb.cpp | 22 ++- src/lb.hpp | 11 +- src/named_session.cpp | 87 +++++++++ src/named_session.hpp | 56 ++++++ src/object.cpp | 26 ++- src/object.hpp | 23 +-- src/own.cpp | 198 ++++++++++++++++++++ src/own.hpp | 132 ++++++++++++++ src/owned.cpp | 77 -------- src/owned.hpp | 94 ---------- src/pair.cpp | 28 ++- src/pair.hpp | 7 +- src/pub.cpp | 26 ++- src/pub.hpp | 8 +- src/pull.cpp | 14 +- src/pull.hpp | 17 +- src/push.cpp | 14 +- src/push.hpp | 17 +- src/session.cpp | 161 ++++++---------- src/session.hpp | 73 +++++--- src/socket_base.cpp | 435 +++++++++++++------------------------------- src/socket_base.hpp | 68 ++----- src/sub.cpp | 12 +- src/sub.hpp | 11 +- src/transient_session.cpp | 36 ++++ src/transient_session.hpp | 46 +++++ src/xrep.cpp | 25 ++- src/xrep.hpp | 12 +- src/xreq.cpp | 17 +- src/xreq.hpp | 13 +- src/zmq_connecter.cpp | 38 ++-- src/zmq_connecter.hpp | 24 +-- src/zmq_engine.cpp | 52 +++--- src/zmq_engine.hpp | 14 +- src/zmq_init.cpp | 142 +++++++-------- src/zmq_init.hpp | 33 ++-- src/zmq_listener.cpp | 19 +- src/zmq_listener.hpp | 11 +- 51 files changed, 1441 insertions(+), 994 deletions(-) commit ee1f1af0091d9bdffa0e5ce1783da925b3cd7e56 Author: Martin Lucina Date: Sat Aug 7 21:04:30 2010 +0200 zmq_poll(): Fix some corner cases Trying to optimize out the case where items_[i]. events is 0 would result in a bogus pollfds[i]. Similarly in the select()-based impl, while not strictly necessary it's better to get ZMQ_FD even if events is 0 since that detects ETERM and friends. src/zmq.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit a85d1e51bff991a0d2f93ded2724e0ee290edf12 Author: Martin Lucina Date: Sat Aug 7 20:35:42 2010 +0200 zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt2 Rewrite the select()-based zmq_poll() implementation to use ZMQ_FD and ZMQ_EVENTS. Also fix some corner cases: We should not pollute revents with unrequested events, and we don't need to poll on ZMQ_FD at all if a pollitem with no events set was passed in. src/zmq.cpp | 227 +++++++++++++++++++++++------------------------------------ 1 file changed, 90 insertions(+), 137 deletions(-) commit 6b1ca2cb1e0adc9f28aae8d322b0832a3b174a04 Author: Martin Lucina Date: Sat Aug 7 18:33:44 2010 +0200 Fix whitespace Dunno where those s came from... src/zmq.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cd12508418530724f10a353fc3a14ab321d0be8e Author: Martin Lucina Date: Sat Aug 7 18:24:12 2010 +0200 zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt1 Rewrite zmq_poll() to use ZMQ_FD and ZMQ_EVENTS introduced on the wip-shutdown branch. Only do the poll()-based version of zmq_poll (), the select()-based version will not compile at the moment. src/zmq.cpp | 169 +++++++++++++++++++---------------------------------------- 1 file changed, 54 insertions(+), 115 deletions(-) commit eb7b8a413a99b2e43e8feee410f2b860e99e7056 Author: Martin Sustrik Date: Sat Aug 7 11:24:07 2010 +0200 REP socket layered on top of XREP socket src/rep.cpp | 263 +++++++++-------------------------------------------------- src/rep.hpp | 49 ++--------- 2 files changed, 45 insertions(+), 267 deletions(-) commit 3e97c0fef49e511dcae400e134876581cdae43f3 Author: Martin Sustrik Date: Sat Aug 7 09:52:34 2010 +0200 REQ socket implementation is layered on top of XREQ src/fq.cpp | 7 ++ src/pipe.cpp | 6 +- src/req.cpp | 243 ++++++++-------------------------------------------------- src/req.hpp | 54 ++----------- 4 files changed, 47 insertions(+), 263 deletions(-) commit f77edfce26bf50ab6eae6550d33f345c9785acca Author: Martin Sustrik Date: Fri Aug 6 20:55:37 2010 +0200 Destruction of session is delayed till both in & out pipes are closed src/pipe.cpp | 5 ----- src/pipe.hpp | 4 ---- src/session.cpp | 7 ++++--- 3 files changed, 4 insertions(+), 12 deletions(-) commit 05d908492dc382941fc633ad7082b5bd86e84e67 Author: Martin Sustrik Date: Fri Aug 6 17:49:37 2010 +0200 WIP: Socket migration between threads, new zmq_close() semantics Sockets may now be migrated between OS threads; sockets may not be used by more than one thread at any time. To migrate a socket to another thread the caller must ensure that a full memory barrier is called before using the socket from the target thread. The new zmq_close() semantics implement the behaviour discussed at: http://lists.zeromq.org/pipermail/zeromq-dev/2010-July/004244.html Specifically, zmq_close() is now deterministic and while it still returns immediately, it does not discard any data that may still be queued for sending. Further, zmq_term() will now block until all outstanding data has been sent. TODO: Many bugs have been introduced, needs testing. Further, SO_LINGER or an equivalent mechanism (possibly a configurable timeout to zmq_term()) needs to be implemented. include/zmq.h | 70 ++++---- src/Makefile.am | 15 +- src/app_thread.cpp | 195 -------------------- src/app_thread.hpp | 88 --------- src/config.hpp | 5 +- src/ctx.cpp | 249 ++++++++++++-------------- src/ctx.hpp | 94 ++++------ src/fq.cpp | 29 +-- src/fq.hpp | 17 +- src/i_endpoint.hpp | 43 ----- src/io_thread.cpp | 5 +- src/io_thread.hpp | 2 +- src/lb.cpp | 21 ++- src/lb.hpp | 13 +- src/object.cpp | 29 ++- src/object.hpp | 14 +- src/owned.cpp | 10 +- src/owned.hpp | 9 +- src/pair.cpp | 72 ++++---- src/pair.hpp | 26 ++- src/pipe.cpp | 250 +++++++++++++++----------- src/pipe.hpp | 111 +++++++----- src/pub.cpp | 62 +++---- src/pub.hpp | 21 ++- src/pull.cpp | 48 +---- src/pull.hpp | 16 +- src/push.cpp | 50 +----- src/push.hpp | 16 +- src/rep.cpp | 81 ++++++--- src/rep.hpp | 30 ++-- src/req.cpp | 65 ++++--- src/req.hpp | 32 ++-- src/semaphore.hpp | 135 ++++++++++++++ src/session.cpp | 62 +++---- src/session.hpp | 26 ++- src/socket_base.cpp | 495 +++++++++++++++++++++++++++++++++++++-------------- src/socket_base.hpp | 100 +++++++---- src/sub.cpp | 40 +---- src/sub.hpp | 11 +- src/thread.cpp | 20 --- src/thread.hpp | 9 - src/xrep.cpp | 65 +++---- src/xrep.hpp | 26 ++- src/xreq.cpp | 37 +--- src/xreq.hpp | 10 +- src/zmq.cpp | 7 +- src/zmq_encoder.cpp | 2 +- 47 files changed, 1427 insertions(+), 1406 deletions(-) commit b7e0fa972f45d21e45cacb93a1a92d38fdc11f40 Author: Martin Sustrik Date: Wed Aug 25 15:38:43 2010 +0200 'master' will become 2.1.x release builds/msvc/platform.hpp | 4 ++-- configure.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1e089f7163c8c59b60b39742ee4bc40e1ca843c5 Author: Martin Lucina Date: Wed Aug 25 13:11:20 2010 +0200 Update ChangeLog for v2.0.8 ChangeLog | 493 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 493 insertions(+) commit c9076c5d8b9b69f4e1bf797127735a563b712eb9 Author: Martin Lucina Date: Wed Aug 25 12:50:16 2010 +0200 Basic documentation for XREQ/XREP socket types Add some basic documentation for XREQ/XREP socket types, including a brief description of the most common use case (REQ -> XREP) and (XREQ -> REP). doc/zmq_socket.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 6d275a8788ad06dda451845402877010f114d6d4 Merge: 98bea86 d788c1f Author: Pieter Hintjens Date: Wed Aug 25 12:09:55 2010 +0200 Updated NEWS for stable 2.0.8 release commit 98bea86240c3e2cb0c1c9832f5660994a0a11f34 Author: Pieter Hintjens Date: Wed Aug 25 11:43:52 2010 +0200 Updated NEWS for stable 2.0.8 release NEWS | 54 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 6 deletions(-) commit d788c1f7e49305976f3e1d0540c5671c47348880 Author: Pieter Hintjens Date: Wed Aug 25 11:43:52 2010 +0200 Updated NEWS for stable 2.0.8 release NEWS | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) commit c06a3cc5101a36bf70c593937374371cafbacfc3 Author: Martin Lucina Date: Wed Aug 25 11:24:24 2010 +0200 Update version number to 2.0.8 builds/msvc/platform.hpp | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b66dd7afd20b82668a3d7756900c91680bd1d91e Author: Martin Lucina Date: Wed Aug 25 09:50:45 2010 +0200 zmq_stopwatch_stop: Don't return EFAULT Function returning unsigned long int cannot return (-1) src/zmq.cpp | 4 ---- 1 file changed, 4 deletions(-) commit 2b2accb8bf574bfb7d85893696f477d5bc6ca272 Author: Pieter Hintjens Date: Sat Aug 21 15:47:10 2010 +0200 Added calls to zmq_msg_close in examples doc/zmq_recv.txt | 3 +++ 1 file changed, 3 insertions(+) commit c52d1f2d47ac93e391ff707b50245aa33d7e8323 Author: Pieter Hintjens Date: Sat Aug 21 13:46:03 2010 +0200 Fixed example for multipart zmq_recv() doc/zmq_recv.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87612be91d4ff5252613196f061bd89d3bce25ec Merge: de0035b 5be54b9 Author: Pieter Hintjens Date: Fri Aug 20 01:06:34 2010 +0200 Merge branch '46_device_robustness' commit de0035b6d9fc1c5423d10fbac468b0e17188510f Author: Pieter Hintjens Date: Thu Aug 19 14:31:04 2010 +0200 Fixed git URL in README README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7aba2d10338727b030c3a9ff4ec34f7086ea5023 Author: Martin Sustrik Date: Wed Aug 18 12:00:26 2010 +0200 documentation leftover from v2.0.6 cleaned in zmq(7) doc/zmq.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit de0173754cc82f6c08875a892892f043a804554c Author: Pieter Hintjens Date: Wed Aug 11 21:12:10 2010 +0200 Removed wip zmq_deviced from master doc/Makefile.am | 2 +- doc/zmq.txt | 4 +- doc/zmq_deviced.txt | 145 --------------------------------------------------- 3 files changed, 2 insertions(+), 149 deletions(-) commit 5be54b912029381736ee8b8798f95cc9a2544a70 Author: Pieter Hintjens Date: Wed Aug 11 17:05:19 2010 +0200 46 - Devices vulnerable to invalid messages http://github.com/zeromq/zeromq2/issues#issue/46 Invalid messages are now discarded silently, instead of causing an assertion failure. src/xrep.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e74d350068e8a7d2becbd791f19e2c1ef20afae5 Author: Pieter Hintjens Date: Wed Aug 11 17:00:12 2010 +0200 Fixed (un)signed type errors in get/setsockopt manual doc/zmq_getsockopt.txt | 10 +++++----- doc/zmq_setsockopt.txt | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit a12f446c4c160e6fb969c35ff01578e5f0965ecc Author: Pieter Hintjens Date: Tue Aug 10 12:36:56 2010 +0200 Modified zmq_tcp(7) to emphasize wildcard interfaces doc/zmq_tcp.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b6cdd369e328ceca2c46758d92ad8ea6a1f59cd7 Author: Pieter Hintjens Date: Sun Aug 8 11:43:32 2010 +0200 Added error checking (EFAULT) for null arguments * Fixed zmq_term, zmq_socket, zmq_close, zmq_setsockopt, * zmq_getsockopt, zmq_bind, zmq_connect, zmq_send, * zmq_recv, zmq_poll, zmq_device, zmq_stopwatch_stop * Updated Reference Manual for these methods doc/zmq_bind.txt | 2 ++ doc/zmq_close.txt | 3 ++- doc/zmq_connect.txt | 2 ++ doc/zmq_device.txt | 13 ++++++++-- doc/zmq_getsockopt.txt | 2 ++ doc/zmq_poll.txt | 2 ++ doc/zmq_recv.txt | 2 ++ doc/zmq_send.txt | 2 ++ doc/zmq_setsockopt.txt | 2 ++ doc/zmq_socket.txt | 3 ++- doc/zmq_term.txt | 3 ++- src/zmq.cpp | 63 ++++++++++++++++++++++++++++++++++++------------ 12 files changed, 79 insertions(+), 20 deletions(-) commit 677b3d906acc97c26855bdc31126492878ad6292 Author: Pieter Hintjens Date: Sat Aug 7 20:55:07 2010 +0200 Added not-null assertions on pointer arguments in C API functions * zmq_term * zmq_socket * zmq_close * zmq_setsockopt * zmq_getsockopt * zmq_bind * zmq_connect * zmq_send * zmq_recv * zmq_poll * zmq_device * zmq_stopwatch_stop src/zmq.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b579aa9510fe6897735ba2aae5db399ef89ad573 Merge: 6d35e82 2100a91 Author: Martin Lucina Date: Fri Aug 6 12:01:40 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 6d35e82db4178b936b33c2eaa6a9f4a2b597e2f3 Author: Martin Lucina Date: Fri Aug 6 12:00:57 2010 +0200 Fix uninitialized use of nbytes in signaler fix src/signaler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2100a9133312f7feecd22c4f809c8f3912c93274 Merge: 78e9ee8 16b43e6 Author: Pieter Hintjens Date: Fri Aug 6 11:09:29 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 16b43e657b44902b3b45fbb01228c813cf27ad39 Merge: 9ac2ff4 96bcc9e Author: Martin Lucina Date: Thu Aug 5 23:41:49 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 9ac2ff449ccfb71cb1f3c9d7b2cf67c440539228 Author: Martin Lucina Date: Thu Aug 5 23:40:30 2010 +0200 zmq::signaler_t: Restart syscalls on EINTR This patch restarts the send() or recv() inside zmq::signaler_t if the call fails due to EINTR. src/signaler.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 78e9ee84bf0e89eeb7134771b1f501ea0f9ccd9d Author: Pieter Hintjens Date: Thu Aug 5 18:49:49 2010 +0200 Fixed MSVC project for PULL/PUSH builds/msvc/libzmq/libzmq.vcproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 96bcc9e6cf73781c31042278eb960c0363a78805 Author: Pieter Hintjens Date: Wed Aug 4 17:06:38 2010 +0200 Small improvements to zmq_device(3) page * Clarified broker model and proxy model * Added example of proxy model doc/zmq_device.txt | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit 13f3481e127a6b2390e847af6b01ee88f1b4ae61 Author: Pieter Hintjens Date: Wed Aug 4 16:05:25 2010 +0200 Further cleanups on reference manual - fixed unwrapped text in new man pages - fixed over-long lines in older pages, where possible - removed reference to old standalong devices from index page - added refernce to new zmq_device[3] documented from index page - some minor spelling corrections doc/zmq.txt | 22 +++++++------------ doc/zmq_bind.txt | 13 +++++++---- doc/zmq_connect.txt | 13 +++++++---- doc/zmq_device.txt | 56 +++++++++++++++++++++++++++++++++++++----------- doc/zmq_deviced.txt | 50 ++++++++++++++++++++++++++++++------------ doc/zmq_getsockopt.txt | 2 +- doc/zmq_pgm.txt | 4 ++-- doc/zmq_poll.txt | 4 ++-- doc/zmq_setsockopt.txt | 2 +- doc/zmq_tcp.txt | 11 +++++----- 10 files changed, 117 insertions(+), 60 deletions(-) commit 6ff193999d96487f7aa7e578980ab5554e61d8dc Author: Pieter Hintjens Date: Wed Aug 4 15:07:15 2010 +0200 Removed empty man pages for old standalone devices doc/asciidoc.conf | 2 +- doc/zmq_forwarder.txt | 29 ----------------------------- doc/zmq_queue.txt | 29 ----------------------------- doc/zmq_streamer.txt | 29 ----------------------------- 4 files changed, 1 insertion(+), 88 deletions(-) commit c51de31f2fd31f782e419bfac2fb8d40d689f3e3 Author: Pieter Hintjens Date: Wed Aug 4 14:56:58 2010 +0200 Reverting 'clean' change to Makefile doc/Makefile.am | 2 -- 1 file changed, 2 deletions(-) commit 77a3c36ff1f11215229a4efdb821a3cb83a9d6fc Author: Pieter Hintjens Date: Wed Aug 4 14:43:33 2010 +0200 Various changes to documentation project: * Added documentation for zmq_deviced, which we're developing * Created consistent page footer in documentation template * Page footer notes doc authors and copyright statement doc/asciidoc.conf | 15 ++++++ doc/zmq.txt | 19 ------- doc/zmq_bind.txt | 9 +--- doc/zmq_close.txt | 4 -- doc/zmq_connect.txt | 4 -- doc/zmq_cpp.txt | 4 -- doc/zmq_deviced.txt | 123 +++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_errno.txt | 4 -- doc/zmq_forwarder.txt | 4 -- doc/zmq_getsockopt.txt | 4 -- doc/zmq_init.txt | 4 -- doc/zmq_inproc.txt | 4 -- doc/zmq_ipc.txt | 4 -- doc/zmq_msg_close.txt | 4 -- doc/zmq_msg_copy.txt | 4 -- doc/zmq_msg_data.txt | 4 -- doc/zmq_msg_init.txt | 4 -- doc/zmq_msg_init_data.txt | 4 -- doc/zmq_msg_init_size.txt | 4 -- doc/zmq_msg_move.txt | 4 -- doc/zmq_msg_size.txt | 4 -- doc/zmq_pgm.txt | 5 +- doc/zmq_poll.txt | 4 -- doc/zmq_queue.txt | 4 -- doc/zmq_recv.txt | 4 -- doc/zmq_send.txt | 4 -- doc/zmq_setsockopt.txt | 4 -- doc/zmq_socket.txt | 31 ++++++------ doc/zmq_streamer.txt | 4 -- doc/zmq_strerror.txt | 4 -- doc/zmq_tcp.txt | 4 -- doc/zmq_term.txt | 5 -- doc/zmq_version.txt | 4 -- 33 files changed, 156 insertions(+), 155 deletions(-) commit 6cd90304476c1c6873d67068009def63e520b848 Author: Pieter Hintjens Date: Wed Aug 4 14:42:21 2010 +0200 Added clean target that deletes generated man pages doc/Makefile.am | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f575f252c99c99d3622f313d6bbad6635197a1e4 Author: Pieter Hintjens Date: Wed Aug 4 14:41:43 2010 +0200 Added man page for the zmq_device method doc/zmq_device.txt | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 11a410b65827a3958fb5f417c29e95c1953a0b42 Author: Pieter Hintjens Date: Wed Aug 4 14:38:56 2010 +0200 Renamed ZMQ_UPSTREAM to ZMQ_PULL, and ZMQ_DOWNSTREAM to ZMQ_PUSH. Left the old definitions as aliases, to be removed in release 3.0. Also renamed the source files implementing these two socket types. This change does not break existing applications nor bindings, but allows us to fix the documentation and user guide now, rather than keeping the old (confusing) names. include/zmq.h | 61 ++++++++++++++++--------------- src/Makefile.am | 8 ++--- src/app_thread.cpp | 12 +++---- src/downstream.cpp | 101 ---------------------------------------------------- src/downstream.hpp | 61 ------------------------------- src/pull.cpp | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/pull.hpp | 62 ++++++++++++++++++++++++++++++++ src/push.cpp | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/push.hpp | 61 +++++++++++++++++++++++++++++++ src/upstream.cpp | 98 -------------------------------------------------- src/upstream.hpp | 62 -------------------------------- 11 files changed, 364 insertions(+), 361 deletions(-) commit 544b36da68729daffefa8f40d2efed5945851a01 Author: Martin Lucina Date: Fri Jul 30 16:49:06 2010 +0200 XREQ: Correct behaviour on hitting ZMQ_HWM This reverts part of commit 84e0c7991a9b316ed571533abc628cc1175750a3 to get correct ZMQ_HWM semantics with XREQ sockets: When sending a message to an XREQ socket, the underlying pipe is selected in a round-robin fashion. If an underlying pipe is full it is skipped. If there are no underlying pipes, or all underlying pipes are full then zmq_send() shall block or return EAGAIN, depending on whether or not the call is blocking. Messages are never dropped. src/xreq.cpp | 27 +++------------------------ src/xreq.hpp | 3 --- 2 files changed, 3 insertions(+), 27 deletions(-) commit 66470b2c55d74fb137211f4264bbfc5e3f454534 Author: Martin Hurton Date: Mon Jul 26 12:24:00 2010 +0200 perf: fix typo perf/local_thr.cpp | 2 +- perf/remote_thr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 10533a560b4af1d3dae63c87c737e25bbdb78998 Author: Martin Hurton Date: Wed Jul 14 18:31:17 2010 +0200 pipe: check_read() should check for message delimiter src/pipe.cpp | 27 ++++++++++++++++++++++----- src/pipe.hpp | 3 +++ src/ypipe.hpp | 11 +++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) commit e1c596b37eef2c2c72c605d7bf4a5c97050add6b Author: Martin Hurton Date: Sat Jul 24 16:57:13 2010 +0200 Make sure lwm > 0 when hwm > 0 src/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b1a6a4bea1cebe860769f82702410f6c1d0ab1b Author: Martin Lucina Date: Wed Jul 21 17:33:40 2010 +0200 Issue 42 - getaddrinfo() fails src/ip.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit aedf3f808befd8cf32a16e34b907c60c79eabfd7 Author: Martin Sustrik Date: Mon Jul 19 08:38:24 2010 +0200 EHOSTUNREACH is a valid return value from recv() src/tcp_socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 269904361b565efa54a106e3eda96091320439bd Author: Martin Sustrik Date: Tue Jul 13 11:46:56 2010 +0200 minor comment clarification src/tcp_connecter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit da49e5a4dd4602bf893193a5e6e64af54695b51c Author: Martin Sustrik Date: Tue Jul 13 07:57:29 2010 +0200 devices exit in case of context termination src/forwarder.cpp | 15 +++++++++++++-- src/queue.cpp | 42 +++++++++++++++++++++++++++++++++++------- src/streamer.cpp | 15 +++++++++++++-- 3 files changed, 61 insertions(+), 11 deletions(-) commit ca057c7db8dcb2384e2498c938f3d83f64b78a7d Author: Martin Hurton Date: Sat Jul 10 22:57:47 2010 +0200 Fix identity generation for transient inproc connections src/socket_base.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f61c87ac527e2a75cabbce4ea4c5f916f4532e7 Author: Martin Hurton Date: Wed Jul 7 17:15:32 2010 +0200 issue 40 - nbytes != -1 (tcp_socket.cpp:216) src/tcp_socket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fd707fedc59124ed627780efed081acf33f455d2 Author: Martin Hurton Date: Tue Jul 6 22:47:07 2010 +0200 issue 38 - Assertion failed: fetched (xrep.cpp:196) src/xrep.cpp | 20 ++++++++++++-------- src/xrep.hpp | 6 ++++++ 2 files changed, 18 insertions(+), 8 deletions(-) commit 805af8241d7450fe1e60174739a78325677897f6 Author: Martin Lucina Date: Wed Jun 30 16:23:07 2010 +0200 asciidoc.conf was missing from distribution tarball doc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ab65324195ad70205514d465b03d851a6de051c Author: Pieter Hintjens Date: Tue Jun 29 21:08:41 2010 +0200 Prevent socket reuse by second bind, on win32 src/tcp_listener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79a3d07c8587e840548791efc314b0184c584881 Author: Martin Sustrik Date: Tue Jun 29 07:45:11 2010 +0200 MSVC build fixed src/msg_store.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit ba91644fdb48cec97edc6965c4ca7ab564a3513f Author: Martin Sustrik Date: Sat Jun 26 20:11:40 2010 +0200 msg_store added to MSVC build builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ src/msg_store.cpp | 2 ++ 2 files changed, 10 insertions(+) commit 1dda8a2aaabd3b7705b0ecd67d6d9737d1978946 Author: Pieter Hintjens Date: Fri Jun 25 18:35:42 2010 +0200 Used more expressive variable names src/msg_store.cpp | 73 +++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 41 deletions(-) commit fca2e8e8cc30bcd134839f6d0f5f9963323dad2b Author: Martin Hurton Date: Mon Jun 21 15:06:51 2010 +0200 Add SWAP support src/Makefile.am | 2 + src/msg_store.cpp | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/msg_store.hpp | 114 +++++++++++++++++++ src/pipe.cpp | 114 +++++++++++++++---- src/pipe.hpp | 29 +++-- src/session.cpp | 4 +- src/socket_base.cpp | 8 +- 7 files changed, 545 insertions(+), 39 deletions(-) commit 10c28c1fc2f06c93e12a7c60f79a315cec7c5a52 Author: Martin Hurton Date: Sat Jun 19 20:46:16 2010 +0200 Revive reader on pipe termination src/pipe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c3913bb19fa95e7decaa7967e2469dc428e46b0 Author: Martin Hurton Date: Sat Jun 19 19:46:35 2010 +0200 fix double free error in PAIR socket src/pair.cpp | 3 +++ 1 file changed, 3 insertions(+) commit cff7ba2315c0f62fa3679afa24ecea88da38a365 Author: Martin Sustrik Date: Thu Jun 17 17:09:51 2010 +0200 Windows build fixed builds/msvc/c_local_lat/c_local_lat.vcproj | 4 ---- builds/msvc/c_local_thr/c_local_thr.vcproj | 4 ---- builds/msvc/c_remote_lat/c_remote_lat.vcproj | 4 ---- builds/msvc/c_remote_thr/c_remote_thr.vcproj | 4 ---- include/zmq_utils.h | 8 ++++++++ src/zmq.cpp | 1 + 6 files changed, 9 insertions(+), 16 deletions(-) commit 7f01e9970d211235fc8057de6dc41ba8ceafe795 Author: Martin Sustrik Date: Thu Jun 17 16:51:53 2010 +0200 stopwatch returned to libzmq include/zmq.h | 2 ++ include/zmq_utils.h | 49 +++++++++++++++++++++++++++++ perf/Makefile.am | 9 +++--- perf/helpers.cpp | 86 --------------------------------------------------- perf/helpers.h | 40 ------------------------ perf/local_lat.cpp | 4 +-- perf/local_thr.cpp | 6 ++-- perf/remote_lat.cpp | 6 ++-- perf/remote_thr.cpp | 4 +-- src/Makefile.am | 2 +- src/zmq.cpp | 63 +++++++++++++++++++++++++++++++++++++ 11 files changed, 129 insertions(+), 142 deletions(-) commit 4777fe4010572d381a2ad8eb63df2fc5fb7e6642 Author: Martin Hurton Date: Thu Jun 17 12:45:14 2010 +0200 pipe: fix bug in rollback() method The msgs_written variable keeps track how many complete messages have been written so far. The rollback operation drops all fragments of the last incomplete message so it shouldn't change this variable at all. src/pipe.cpp | 1 - 1 file changed, 1 deletion(-) commit 9151de38959a21829d4ab60324d6750d2e1a4357 Author: Martin Sustrik Date: Thu Jun 17 11:01:18 2010 +0200 generate identity for transient inproc connections src/socket_base.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 341e8a267309179bbb8249845e7efb14faf93d4d Author: Martin Sustrik Date: Tue Jun 15 14:01:44 2010 +0200 test commit AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 9858447fad3260cb16b1f2e56a14cfe3db737a36 Author: Martin Sustrik Date: Tue Jun 15 08:01:43 2010 +0200 getsockopt documentation fixed doc/zmq_getsockopt.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ac90b7e0ba497bfec09d7a69a2e01dc6d94a9c9a Author: Brian Buchanan Date: Fri Jun 11 08:03:34 2010 +0200 issue 35 - ZMQ_RCVMORE sometimes erroneously returns false AUTHORS | 1 + src/socket_base.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 5ee355d1880bc7391c199ea29adc620ceb0d96f1 Author: Martin Sustrik Date: Fri Jun 11 07:02:36 2010 +0200 if connect asserts, exact error is reported src/tcp_connecter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 27877d73ea7dd972a773c7e960706130daaf5925 Author: Martin Sustrik Date: Fri Jun 11 06:55:30 2010 +0200 EHOSTUNREACH is acceptable outcome from connect src/tcp_connecter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c818b14bbd261aa836400e9dfb4848117dd2edb6 Author: Piotr Trojanek Date: Thu Jun 10 12:57:42 2010 +0200 clearing thread info structure src/ctx.cpp | 1 + 1 file changed, 1 insertion(+) commit 74a3907be285891d90b82e2d315d03141a398752 Author: Martin Sustrik Date: Thu Jun 10 12:36:27 2010 +0200 couple of ICC warnings fixed src/encoder.hpp | 2 +- src/uuid.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 8782b4d696da7b1527f69e819d75d691bc3df105 Author: Piotr Trojanek Date: Thu Jun 10 07:34:11 2010 +0200 -lcrypto added to linking flags for QNX configure.in | 1 + 1 file changed, 1 insertion(+) commit 76e0153d4f3ef1d5fef1a9b926e0e8e3ab2d9685 Author: Martin Sustrik Date: Thu Jun 10 07:21:05 2010 +0200 issue 33 - missing virtual destructors src/decoder.hpp | 4 +++- src/encoder.hpp | 2 ++ src/yarray_item.hpp | 4 +++- src/ypipe.hpp | 6 ++++++ 4 files changed, 14 insertions(+), 2 deletions(-) commit d329c55da9c503e82831e940b0fc8dc9e5479975 Author: Martin Sustrik Date: Thu Jun 10 07:12:00 2010 +0200 issue 31 - Assertion failed: err == ECONNREFUSED || err == ETIMEDOUT (tcp_connecter.cpp:296) src/tcp_connecter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 604f7475ec1d19df416156879db3ddd3c90d5a13 Author: Martin Sustrik Date: Wed Jun 9 17:49:08 2010 +0200 issue 32 - poll_t poller broken src/poll.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit 7a29e8594fb539e37b9d08982b1f491b0794b7d2 Author: Martin Sustrik Date: Wed Jun 9 17:07:45 2010 +0200 Piotr Trojanek added to AUTHORS file AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 751b60a18d028d9859394c7abe960cb1c42e605e Author: Piotr Trojanek Date: Wed Jun 9 17:06:32 2010 +0200 extra ';' inside a struct or union -- clang warnings fixed foreign/xmlParser/xmlParser.hpp | 2 +- src/i_poll_events.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 240fc33f65c6cd9f1ed0a511daf4ad00ff37f163 Author: Martin Sustrik Date: Mon Jun 7 20:23:48 2010 +0200 minor comment clarification src/tcp_connecter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 784e73a7c84f2c0a454f4a9ef69586755482a9d5 Merge: ce53d02 8f51a10 Author: Martin Sustrik Date: Mon Jun 7 09:03:56 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ce53d02e0580755055245cc1050f1dd3a26a3f22 Author: Martin Sustrik Date: Mon Jun 7 09:03:40 2010 +0200 C++ docs for zmq::poll function improved doc/zmq_cpp.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 8f51a10918d54e24818b863a9e3d530a00de21b5 Author: Martin Lucina Date: Fri Jun 4 19:30:47 2010 +0200 Update ChangeLog for v2.0.7 ChangeLog | 848 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 848 insertions(+) commit 5c97ff9a2eb3e55007fd90b5c3a1c433de7bc60c Author: Martin Lucina Date: Fri Jun 4 19:27:55 2010 +0200 More NEWS for 2.0.7 NEWS | 9 +++++++++ 1 file changed, 9 insertions(+) commit e8a9614aaeb45fc619eed2983f93edb744b4cef4 Author: Martin Lucina Date: Fri Jun 4 19:20:37 2010 +0200 Update NEWS for 2.0.7 release NEWS | 54 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 15 deletions(-) commit 9b8f902d72438752b00d4c1bb3887c40423777e0 Author: Martin Sustrik Date: Fri Jun 4 18:49:55 2010 +0200 initial version of 2.0.7 NEWS NEWS | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit baf659fde5136c20f879ef713ec3effc34854ba6 Author: Martin Lucina Date: Fri Jun 4 17:12:51 2010 +0200 Move news from ChangeLog into NEWS ChangeLog | 397 +----------------------------------------------------------- NEWS | 398 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 400 insertions(+), 395 deletions(-) commit 94dfe1368ac1cd4a456c86b8fc800d7c3911cfd3 Author: Martin Lucina Date: Fri Jun 4 17:02:16 2010 +0200 Fix MINGW build Mingw seems to define NOMINMAX, so don't redefine it if already defined src/windows.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cf048bb1f8a665370d9e39aee2a7363327911b08 Author: Martin Sustrik Date: Fri Jun 4 16:29:36 2010 +0200 platform.hpp for MSVC contains only very basic stuff builds/msvc/platform.hpp | 29 ----------------------------- perf/helpers.cpp | 4 +++- src/encoder.hpp | 5 +++++ src/prefix_tree.cpp | 5 +++++ src/uuid.cpp | 1 - src/uuid.hpp | 1 + src/windows.hpp | 4 ++++ src/zmq_engine.cpp | 6 +++++- 8 files changed, 23 insertions(+), 32 deletions(-) commit 927993863eda325c66fc678810eeadd0c744cdf2 Author: Martin Sustrik Date: Fri Jun 4 15:47:22 2010 +0200 MSVC build fixed builds/msvc/c_local_lat/c_local_lat.vcproj | 4 ++++ builds/msvc/c_local_thr/c_local_thr.vcproj | 4 ++++ builds/msvc/c_remote_lat/c_remote_lat.vcproj | 4 ++++ builds/msvc/c_remote_thr/c_remote_thr.vcproj | 4 ++++ foreign/xmlParser/xmlParser.cpp | 2 +- perf/helpers.cpp | 4 +--- 6 files changed, 18 insertions(+), 4 deletions(-) commit 621d7415b3cdee1f79787e2961f113b00d237615 Author: Martin Lucina Date: Fri Jun 4 15:35:14 2010 +0200 Fix Solaris/NetBSD breakage in atomic_ptr.hpp src/atomic_ptr.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67ca7dcbe6b072b74a112ce4df4529cda82c0f13 Author: Martin Sustrik Date: Fri Jun 4 15:24:06 2010 +0200 obsolete API elements removed - this commit breaks backward compatibility devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- devices/zmq_queue/zmq_queue.cpp | 2 +- devices/zmq_streamer/zmq_streamer.cpp | 2 +- include/zmq.h | 11 +---------- include/zmq.hpp | 4 ++-- perf/local_lat.cpp | 2 +- perf/local_thr.cpp | 2 +- perf/remote_lat.cpp | 2 +- perf/remote_thr.cpp | 2 +- src/zmq.cpp | 4 +--- 10 files changed, 11 insertions(+), 22 deletions(-) commit d844a90690af357988b1c5ba027c740d4182d753 Author: Martin Lucina Date: Fri Jun 4 15:00:31 2010 +0200 zmqd: Removing for now, not ready for 2.0.7 Makefile.am | 4 +- configure.in | 2 +- zmqd/Makefile.am | 8 -- zmqd/zmqd.cpp | 364 ------------------------------------------------------ 4 files changed, 3 insertions(+), 375 deletions(-) commit 606c77368cccd2a277437b5de8764772295fdf89 Author: Martin Lucina Date: Fri Jun 4 14:48:49 2010 +0200 Move perf helper functions to perf/helpers.cpp include/zmq.h | 17 ---------- perf/Makefile.am | 9 +++--- perf/helpers.cpp | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++ perf/helpers.h | 40 ++++++++++++++++++++++++ perf/local_lat.cpp | 3 +- perf/local_thr.cpp | 5 +-- perf/remote_lat.cpp | 5 +-- perf/remote_thr.cpp | 3 +- src/zmq.cpp | 58 ---------------------------------- 9 files changed, 141 insertions(+), 85 deletions(-) commit 05b4a7ae787760d5c24e048612b786fa0283854a Author: Martin Lucina Date: Fri Jun 4 13:58:49 2010 +0200 Remove PGM examples from build configure.in | 9 ----- perf/Makefile.am | 112 +----------------------------------------------------- 2 files changed, 1 insertion(+), 120 deletions(-) commit 4d65d7a5a98cbb95430a5b02706ab87d3fa0f56c Author: Martin Lucina Date: Fri Jun 4 13:53:40 2010 +0200 Documentation: zmq_tcp(7) update for 2.0.7 Document MORE bit in flags field doc/zmq_tcp.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 7fc15c21a17cfa58e60e4a513360cb12b542a570 Author: Martin Lucina Date: Thu Jun 3 14:36:44 2010 +0200 Documentation: zmq_cpp(7) update for 2.0.7 doc/zmq_cpp.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 10f4bf3f35ab3da05fe5ca8a28cd131e3781249f Author: Martin Lucina Date: Thu Jun 3 14:15:05 2010 +0200 Documentation: Cosmetic changes doc/zmq_getsockopt.txt | 10 ++++++++++ doc/zmq_setsockopt.txt | 11 +++++++++++ 2 files changed, 21 insertions(+) commit 8076fd1a3abece7dc91c2b2309dd0ecba57e882f Author: Martin Lucina Date: Thu Jun 3 14:08:36 2010 +0200 Documentation: zmq_errno(3) doc/Makefile.am | 2 +- doc/zmq.txt | 9 ++++++--- doc/zmq_errno.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 4 deletions(-) commit 7c9b09bc511236c8cc5f6cea7623a8b98fedf302 Author: Martin Lucina Date: Wed Jun 2 18:36:34 2010 +0200 Documentation: Flow control, zmq_socket(3) Mostly Flow control and additions to zmq_socket(3) Removed/changed lots of text regarding message queues More fixes for 2.0.7 changes doc/zmq.txt | 18 ++--- doc/zmq_getsockopt.txt | 23 ++++--- doc/zmq_poll.txt | 28 ++++---- doc/zmq_recv.txt | 22 +++---- doc/zmq_send.txt | 9 ++- doc/zmq_setsockopt.txt | 25 +++---- doc/zmq_socket.txt | 172 ++++++++++++++++++++++++++++++++++++++++-------- 7 files changed, 205 insertions(+), 92 deletions(-) commit 9d00d300b0d6b45d2954792540cc95a0c3fb6a01 Author: Martin Lucina Date: Tue Jun 1 22:22:50 2010 +0200 Documentation: zmq_init() API changes for 2.0.7 doc/zmq_init.txt | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit 8ba1d3c8ed32b39bb1133330d496587d96020e7e Author: Martin Lucina Date: Tue Jun 1 22:22:29 2010 +0200 Documentation: zmq_term() and ETERM for 2.0.7 doc/zmq_bind.txt | 2 +- doc/zmq_connect.txt | 2 +- doc/zmq_getsockopt.txt | 1 - doc/zmq_poll.txt | 6 ++---- doc/zmq_setsockopt.txt | 1 - doc/zmq_term.txt | 20 +++++++++++++++++--- 6 files changed, 21 insertions(+), 11 deletions(-) commit 74a03dfd7dbb762be5d50eca4df214f8825ad44a Merge: 99e6179 8a77135 Author: Martin Lucina Date: Tue Jun 1 21:49:50 2010 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit 8a771350795dc4f9aae6a89534f1391d7b63b10c Author: Martin Sustrik Date: Tue Jun 1 10:42:55 2010 +0200 Pieter Hintjens added to 'authors' section AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b0716661e99a2b55151650ec94cd5fd268d0334 Author: Pieter Hintjens Date: Tue Jun 1 10:40:12 2010 +0200 multiple vulnerabilities in xml paerser fixed foreign/xmlParser/xmlParser.cpp | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) commit 99e6179edd9e3552fcdb7f4fce3306cd174f3359 Author: Martin Lucina Date: Mon May 31 17:24:50 2010 +0200 Documentation updates The option_value parameter for zmq_getsockopt is in and out. doc/zmq_getsockopt.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b4f3e0acd72de97bc5ef46ea74d9cd7ed7f9efc2 Author: Martin Lucina Date: Mon May 31 17:21:51 2010 +0200 Documentation updates Clarify multi-part messages doc/zmq_recv.txt | 16 ++++++++-------- doc/zmq_send.txt | 13 ++++++------- 2 files changed, 14 insertions(+), 15 deletions(-) commit 7bbe754cb4987669d4273ec37f5f50d29b9931df Author: Martin Lucina Date: Mon May 31 17:21:12 2010 +0200 Documentation updates Clarify pipeline and exclusive pair patterns doc/zmq_socket.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 8a4df431de872623c761fdeb291748d3d153b8d1 Author: Martin Lucina Date: Mon May 31 14:18:51 2010 +0200 Documentation updates Add getsockopt to Makefile.am doc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfbaf4f9668f0493649d6ba1328cced64e5340b0 Author: Martin Lucina Date: Mon May 31 14:18:37 2010 +0200 Documentation updates Multi-part messages doc/zmq_recv.txt | 5 +++-- doc/zmq_send.txt | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) commit 0fa73b039462c1754d407de85306904e9b0c73be Author: Martin Lucina Date: Mon May 31 14:13:41 2010 +0200 Documentation updates Add getsockopt to index doc/zmq.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb9ff1e77977c6199c0a0439f4dd35fa39f3bd3c Author: Martin Lucina Date: Mon May 31 14:12:27 2010 +0200 Documentation updates Multi-part messages doc/zmq_getsockopt.txt | 17 +++++++++++++++++ doc/zmq_recv.txt | 37 ++++++++++++++++++++++++++++++++++++- doc/zmq_send.txt | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 85 insertions(+), 2 deletions(-) commit 8becacf82c950af951f477e3dc3f7ac79e110fc1 Author: Martin Lucina Date: Mon May 31 12:53:40 2010 +0200 Documentation updates Add zmq_getsockopt(3), clean up zmq_setsockopt(3). doc/zmq_getsockopt.txt | 209 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_setsockopt.txt | 62 +++++++------- 2 files changed, 241 insertions(+), 30 deletions(-) commit be6019abd1ac6fe11c9c51dbadf9c72b37349c2a Author: Martin Sustrik Date: Mon May 31 09:28:36 2010 +0200 issue 28. - SNDMORE/ RCVMORE is dropping every other message src/req.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2e9be56a4059cf230f6aa92eb1c71db5f1200b8e Author: Martin Sustrik Date: Mon May 31 06:17:58 2010 +0200 memory leak in REQ socket fixed src/req.cpp | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) commit 3bb60da0d085b1089ddec4617fcd40f2cda88567 Merge: 04fcd4d da37c45 Author: Martin Sustrik Date: Mon May 31 06:11:42 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 04fcd4d55b3b01e75d1d0d547987841811a2d610 Author: Martin Sustrik Date: Mon May 31 06:11:20 2010 +0200 memory leak in REP socket fixed src/rep.cpp | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) commit da37c45b0c7200eea96118952e671972b71df4ce Author: Martin Lucina Date: Fri May 28 01:38:43 2010 +0200 Clarify zmq_bind/zmq_connect Use the term 'endpoint' correctly, and drop the nonsense about local/remote addresses which doesn't clearly explain what is going on doc/zmq_bind.txt | 28 +++++++++++++++------------- doc/zmq_connect.txt | 26 ++++++++++++++------------ 2 files changed, 29 insertions(+), 25 deletions(-) commit 74f1a4a579d3b09b3420092d9f076827be31c4e7 Author: Martin Lucina Date: Fri May 28 00:55:04 2010 +0200 RPM packaging cleanups - ditch -utils package - add descriptions from Debian packaging builds/redhat/zeromq.spec | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) commit b4cc7b97ecaf743f3259f9df7d687558892b8a72 Author: Mikko Koppanen Date: Fri Apr 16 10:26:22 2010 +0100 dist-hook for copying zeromq.spec to top-level Makefile.am | 2 ++ 1 file changed, 2 insertions(+) commit 8bd3f743f50a61355b6cf18046d59c7d0289836b Author: Mikko Koppanen Date: Fri Apr 16 00:01:13 2010 +0100 Import redhat packaging builds/redhat/zeromq.spec | 137 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) commit 5219e4ce8f9aa082c5f91e248a9f66639c69727d Author: Martin Lucina Date: Fri May 28 00:49:13 2010 +0200 Clarify socket types in documentation, reinstate ZMQ_PAIR doc/zmq.txt | 4 +-- doc/zmq_setsockopt.txt | 14 ++++---- doc/zmq_socket.txt | 91 +++++++++++++++++++++++++++++------------------- 3 files changed, 65 insertions(+), 44 deletions(-) commit 8408ae066dce123fc93e4f53dbadb1f60b7f2e8a Author: Martin Sustrik Date: Tue May 25 15:03:57 2010 +0200 LWM is computed rather than explicitly specified by user doc/zmq_setsockopt.txt | 15 --------------- include/zmq.h | 1 + src/config.hpp | 5 ++++- src/options.cpp | 18 ------------------ src/options.hpp | 1 - src/pipe.cpp | 35 ++++++++++++++++++++++++++++++++--- src/pipe.hpp | 4 +++- src/session.cpp | 6 ++---- src/socket_base.cpp | 12 ++++-------- 9 files changed, 46 insertions(+), 51 deletions(-) commit f34a468a263c7b4013a267297ee7f121e12dfb9d Author: Martin Sustrik Date: Tue May 25 10:57:54 2010 +0200 coding style fixed in zmqd zmqd/zmqd.cpp | 426 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 211 insertions(+), 215 deletions(-) commit 7773fdddfb357145cb15faaa5228fb3b2d0f6f78 Merge: 091e92a 89783c3 Author: Martin Sustrik Date: Thu May 20 18:02:34 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 091e92a11dec353e674cbacbf2455a48bdb4e01d Author: Martin Sustrik Date: Thu May 20 18:01:58 2010 +0200 Pieter Hintjens added to AUTHORS file AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 89783c37d2b8a7b5519eab7922b460449aa0bf3f Author: Martin Sustrik Date: Wed May 19 06:31:57 2010 +0200 incomplete messages can be stored in ypipe src/pipe.cpp | 10 ++++------ src/ypipe.hpp | 46 ++++++++++++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 24 deletions(-) commit f40ce4e500d32b4240395e09e0ce3359734f0189 Author: Jon Dyte Date: Sat May 15 12:37:45 2010 +0200 single 0MQ daemon (zmqd) - initial version Makefile.am | 4 +- configure.in | 2 +- zmqd/Makefile.am | 8 ++ zmqd/zmqd.cpp | 368 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 379 insertions(+), 3 deletions(-) commit 6705a3d5807542ee2ed8a1ef6e3d9f769e5d5a93 Author: Steven McCoy Date: Thu May 13 12:43:58 2010 +0200 some more sanity checks in pgm_socket src/pgm_socket.cpp | 1 + 1 file changed, 1 insertion(+) commit ff9d3985556aa58a5d120a3eb72867c7ebea924d Merge: 56262d7 f6c1c97 Author: Martin Sustrik Date: Thu May 13 12:41:39 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 56262d7ba79a9ba19fc1b89fdc07bca3894062f2 Author: Steven McCoy Date: Thu May 13 12:41:20 2010 +0200 some more sanity checks in pgm_socket src/pgm_socket.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit f6c1c972428f15356af09d6922910ef44d1f6cb3 Merge: 52ef3f3 127cb89 Author: Martin Lucina Date: Wed May 12 16:49:49 2010 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit 52ef3f3f2c6f3ba1717b2e729556df713c022636 Author: Martin Lucina Date: Wed May 12 16:46:59 2010 +0200 Revert commit 7cb076e, atomic ops cleanup Reverted to using atomic.h on NetBSD Removed GNU builtins (see http://lists.zeromq.org/pipermail/zeromq-dev/2010-May/003485.html) Removed SPARC native atomic ops as they are untested and have been commented out for years Add "memory" to asm clobber for X86 atomic_counter::sub() src/atomic_counter.hpp | 65 ++++++++---------------------------------------- src/atomic_ptr.hpp | 58 +++++++----------------------------------- 2 files changed, 19 insertions(+), 104 deletions(-) commit 127cb89ac1271bf85798294d450509b7c23019bd Author: Martin Sustrik Date: Wed May 12 16:46:07 2010 +0200 MAINTAINERS file added MAINTAINERS | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 8e5ac100c95e02ef60aa827b4199002f324617ed Merge: 714a8d5 9fbb914 Author: Martin Sustrik Date: Wed May 12 12:45:38 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 714a8d50a03e773320a02247847c58020c96e867 Author: Brett Cameron Date: Wed May 12 12:45:12 2010 +0200 fixes for OpenVMS src/signaler.cpp | 1 + src/tcp_connecter.cpp | 19 ++++++++++++++++--- src/tcp_listener.cpp | 31 +++++++++++++++++++++++++++---- src/uuid.cpp | 29 +++++++++++++++++++++++++++++ src/uuid.hpp | 11 ++++++++++- 5 files changed, 83 insertions(+), 8 deletions(-) commit 9fbb9141a8895ac83e8051ac568223a9e57a278d Author: Martin Lucina Date: Mon May 10 16:39:09 2010 +0200 Update historic include paths devices/zmq_forwarder/Makefile.am | 2 +- devices/zmq_queue/Makefile.am | 2 +- devices/zmq_streamer/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9d16a415cbfd33f89d2f5afd96ed7cd34a21a634 Author: Martin Lucina Date: Mon May 10 16:32:10 2010 +0200 OpenPGM build flags cleanup Removed various exotic -Wxxx flags in the OpenPGM build to get us to what is actually required and reasonable; added in -fno-strict-aliasing since OpenPGM generates lots of warnings about dereferencing typed-punned pointers; removed the OpenPGM extra flags from libzmq_la_CXXFLAGS and left them only in libzmq_la_CFLAGS so that our code is not built with the OpenPGM extra flags. src/Makefile.am | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) commit 2cf9f04a460473ea10e901e68e66596583d0d286 Author: Martin Lucina Date: Mon May 10 16:24:53 2010 +0200 Update OpenPGM to version 2.1.26 configure.in | 2 +- foreign/openpgm/libpgm-2.0.24.tar.gz | Bin 407110 -> 0 bytes foreign/openpgm/libpgm-2.1.26.tar.gz | Bin 0 -> 413863 bytes src/Makefile.am | 2 ++ 4 files changed, 3 insertions(+), 1 deletion(-) commit a25414e55caa975185ac6534c40bb601e5c38a9a Author: Martin Sustrik Date: Sun May 9 16:59:15 2010 +0200 Fix in zmq_poll (Windows version) src/zmq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d33c43913dd640853cec75ce21080c2b33d8526 Author: Martin Sustrik Date: Fri May 7 21:53:55 2010 +0200 caution about zmq_msg_init_* functions added to the docs doc/zmq_msg_init.txt | 4 ++++ doc/zmq_msg_init_data.txt | 4 ++++ doc/zmq_msg_init_size.txt | 4 ++++ 3 files changed, 12 insertions(+) commit 4a3b857c4cf35261751d562ad7e4acc5ecf58be0 Author: Martin Sustrik Date: Fri May 7 11:08:50 2010 +0200 commands not processed immediatelly in some scenarios; fixed src/app_thread.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 36b044a0d5a9918841839edf12767b31bfec36a0 Author: Martin Sustrik Date: Fri May 7 09:21:15 2010 +0200 ZMQ_PAIR socket removed from the documentation as it is unfinished yet doc/zmq_socket.txt | 13 ------------- 1 file changed, 13 deletions(-) commit f60d891b2309cdc6f2cc1507a238cec85e4aa9e7 Author: Martin Sustrik Date: Thu May 6 10:33:01 2010 +0200 Issue 23. zmq_init() crashes on illegal numbers src/zmq.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 64c58662b7f491f2a3c8cb684f27ea1d5c549552 Author: Martin Sustrik Date: Wed May 5 14:33:02 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 835e893e54598ff474067cc68b787440baf6b05c Author: Martin Sustrik Date: Wed May 5 14:24:54 2010 +0200 dispatcher_t class renamed to ctx_t src/Makefile.am | 4 +- src/app_thread.cpp | 10 +- src/app_thread.hpp | 2 +- src/ctx.cpp | 316 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/ctx.hpp | 156 +++++++++++++++++++++++++ src/dispatcher.cpp | 316 --------------------------------------------------- src/dispatcher.hpp | 153 ------------------------- src/io_thread.cpp | 6 +- src/io_thread.hpp | 2 +- src/object.cpp | 28 ++--- src/object.hpp | 10 +- src/socket_base.cpp | 11 +- src/zmq.cpp | 17 ++- src/zmq_encoder.cpp | 2 +- 14 files changed, 518 insertions(+), 515 deletions(-) commit 10f5334f2891b187ce57f38186cf977406097ab0 Merge: 44dd005 3f5465a Author: Martin Sustrik Date: Wed May 5 13:03:56 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 44dd005ff05431b05a8e04858a23784b252da870 Author: Martin Sustrik Date: Wed May 5 13:03:26 2010 +0200 number of application threads to use 0MQ sockets is unlimited; app_threads parameter in zmq_init is unused and obsolete src/config.hpp | 4 ++++ src/dispatcher.cpp | 53 +++++++++++++++++++++++++++++----------------------- src/dispatcher.hpp | 15 +++------------ src/zmq.cpp | 6 ++++-- 4 files changed, 41 insertions(+), 37 deletions(-) commit 3f5465ada1b465ac0e360d0416b8f42b0fddfab0 Author: Martin Sustrik Date: Tue May 4 10:37:10 2010 +0200 Windows port fixed src/signaler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 235ed3a3dcffb7c658cbc9253eae9de54db24533 Author: Martin Sustrik Date: Tue May 4 10:22:16 2010 +0200 signaler transports commands per se rather than one-bit signals src/app_thread.cpp | 20 ++--- src/config.hpp | 5 -- src/dispatcher.cpp | 71 +++++++---------- src/dispatcher.hpp | 30 ++----- src/io_thread.cpp | 17 ++-- src/object.cpp | 6 +- src/pipe.hpp | 2 +- src/signaler.cpp | 224 ++++++++++++++++++++-------------------------------- src/signaler.hpp | 45 +++-------- src/ypipe.hpp | 83 +++++-------------- 10 files changed, 174 insertions(+), 329 deletions(-) commit 8b9bd05726c3df56d7f437889abccba3cbbffdee Author: Martin Sustrik Date: Mon May 3 16:21:36 2010 +0200 thread ID and dispatcher made private in object_t src/app_thread.cpp | 6 +++--- src/io_thread.cpp | 2 +- src/object.hpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 84e0c7991a9b316ed571533abc628cc1175750a3 Author: Martin Sustrik Date: Sun May 2 20:59:07 2010 +0200 queue device fixed src/queue.cpp | 86 ++++++++++++++++++++++++++++----------------------------- src/xreq.cpp | 27 ++++++++++++++++-- src/xreq.hpp | 3 ++ 3 files changed, 70 insertions(+), 46 deletions(-) commit 4a6bac1deaedb3c111c7e28b2933ed98367cb193 Merge: acfd0f8 beb4da3 Author: Martin Sustrik Date: Fri Apr 30 04:54:10 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit acfd0f8ca2d15111f35ae0034ed3ce130c96b910 Author: Martin Sustrik Date: Fri Apr 30 04:53:41 2010 +0200 prefix in XREP recv'd message misses MORE flag src/xrep.cpp | 1 + 1 file changed, 1 insertion(+) commit beb4da3c28cff501a33de34cec95ca110cd3084e Author: Martin Sustrik Date: Thu Apr 29 20:53:46 2010 +0200 windows port fixed builds/msvc/libzmq/libzmq.vcproj | 34 +++++----------------------------- src/signaler.cpp | 4 +--- 2 files changed, 6 insertions(+), 32 deletions(-) commit ae93ed318a450d6d763a5f629d478467f7362b07 Author: Martin Sustrik Date: Thu Apr 29 20:34:48 2010 +0200 signaler rewritten in such a way that any number (>64) of threads can be used src/app_thread.cpp | 25 +++---- src/app_thread.hpp | 2 +- src/config.hpp | 4 ++ src/dispatcher.cpp | 16 ++--- src/dispatcher.hpp | 10 +-- src/io_thread.cpp | 30 ++++---- src/io_thread.hpp | 2 +- src/object.cpp | 13 ++-- src/object.hpp | 9 +-- src/signaler.cpp | 200 +++++++++++++++++++++++++++++++--------------------- src/signaler.hpp | 24 +++++-- src/zmq.cpp | 2 +- 12 files changed, 190 insertions(+), 147 deletions(-) commit 1ffc6dd41f2e2ce45c67f3fe08780c5a09cf667d Author: Martin Sustrik Date: Thu Apr 29 18:03:54 2010 +0200 eventfd-style signaling removed configure.in | 26 ------------------ src/signaler.cpp | 78 +----------------------------------------------------- src/signaler.hpp | 6 ----- 3 files changed, 1 insertion(+), 109 deletions(-) commit 37128b7b1aeed9ad2bf6816560b85b5f94dd5bec Author: Martin Sustrik Date: Thu Apr 29 17:31:57 2010 +0200 fd_signaler_t renamed to signaler_t src/Makefile.am | 4 +- src/app_thread.cpp | 3 +- src/app_thread.hpp | 6 +- src/dispatcher.hpp | 4 +- src/fd_signaler.cpp | 432 --------------------------------------------------- src/fd_signaler.hpp | 80 ---------- src/io_thread.cpp | 2 +- src/io_thread.hpp | 6 +- src/signaler.cpp | 432 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/signaler.hpp | 80 ++++++++++ 10 files changed, 524 insertions(+), 525 deletions(-) commit c193fd146661b39027c5e3fa0776dcdf8c6af5e2 Author: Martin Sustrik Date: Thu Apr 29 17:20:23 2010 +0200 lock-free polling removed; ZMQ_POLL flag removed doc/zmq_init.txt | 8 +- include/zmq.h | 1 + src/Makefile.am | 5 - src/app_thread.cpp | 22 +--- src/app_thread.hpp | 8 +- src/atomic_bitmap.hpp | 310 ---------------------------------------------- src/dispatcher.cpp | 7 +- src/dispatcher.hpp | 6 +- src/fd_signaler.hpp | 3 +- src/i_signaler.hpp | 55 -------- src/io_thread.cpp | 6 +- src/io_thread.hpp | 5 +- src/object.cpp | 1 - src/queue.cpp | 5 +- src/simple_semaphore.hpp | 242 ------------------------------------ src/ypollset.cpp | 65 ---------- src/ypollset.hpp | 69 ----------- src/zmq.cpp | 11 +- 18 files changed, 28 insertions(+), 801 deletions(-) commit 7cb076e56a18cb76c49f17bd34bc73c11e01b705 Author: Steven McCoy Date: Thu Apr 29 11:36:13 2010 +0200 Defer NetBSD atomic ops to GCC builtins. Revert Sun atomic ops #define. src/atomic_bitmap.hpp | 72 ++++++++++++++++++++++++++++++++---------------- src/atomic_counter.hpp | 42 ++++++++++++++++++---------- src/atomic_ptr.hpp | 25 +++++++++++------ 3 files changed, 92 insertions(+), 47 deletions(-) commit ad6fa9d0d4f1cf29ce63998d7efe337b1a784ef6 Author: Martin Sustrik Date: Tue Apr 27 17:36:00 2010 +0200 initial version of multi-hop REQ/REP src/rep.cpp | 97 +++++++++++++++++++---------- src/req.cpp | 28 ++++++++- src/xrep.cpp | 195 +++++++++++++++++++++++++++++++++++++++++++++++----------- src/xrep.hpp | 35 +++++++++-- 4 files changed, 280 insertions(+), 75 deletions(-) commit 1ad6ade0ed465030716ce720077f3aa31e6cd136 Author: Martin Sustrik Date: Mon Apr 26 16:58:49 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit beffee92a8ec9e14cca21e5901970c4d03967c3d Author: Martin Sustrik Date: Mon Apr 26 16:51:05 2010 +0200 P2P renamed to PAIR doc/zmq_socket.txt | 8 +-- include/zmq.h | 4 +- src/Makefile.am | 4 +- src/app_thread.cpp | 6 +-- src/p2p.cpp | 139 ---------------------------------------------------- src/p2p.hpp | 63 ------------------------ src/pair.cpp | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/pair.hpp | 63 ++++++++++++++++++++++++ 8 files changed, 214 insertions(+), 212 deletions(-) commit 7d9603d722c9c2752dccd0c51f470e68d0e0c48c Author: Jon Dyte Date: Sun Apr 25 15:04:23 2010 +0200 Bug in zmq_queue fixed devices/zmq_queue/zmq_queue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d524c4e15d3cfa21f265d2c21e8a76ac97bfee2d Author: Martin Sustrik Date: Fri Apr 16 09:53:09 2010 +0200 fix of documentation typo doc/zmq_setsockopt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c33941be9d564733c15fe0466906fdf0bbd46b8 Merge: ea18d30 370cde0 Author: Martin Sustrik Date: Thu Apr 15 07:32:49 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ea18d30c209cb4e3f0dd0bc5e4380345e81b6fb6 Author: Martin Sustrik Date: Thu Apr 15 07:32:25 2010 +0200 atomic_ptr fix of Win64 include/zmq.h | 2 +- src/atomic_ptr.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 370cde09226d8a1b87eeac306fe97d64b4ea63a3 Author: Martin Sustrik Date: Mon Apr 12 17:00:11 2010 +0200 win build fixed builds/msvc/libzmq/libzmq.vcproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0024d290765f53428ff78eddc5a4bc675a13c6a7 Author: Martin Lucina Date: Mon Apr 12 16:49:13 2010 +0200 Build fixes for cross compiling and Win32 configure.in | 27 ++++++++++++++++++--------- foreign/xmlParser/xmlParser.cpp | 2 +- include/zmq.h | 14 ++++++++------ src/Makefile.am | 2 +- 4 files changed, 28 insertions(+), 17 deletions(-) commit 34964769399825e45b3efd02e642af97355707ef Author: Martin Sustrik Date: Mon Apr 12 10:05:24 2010 +0200 MSVC perf build fixed builds/msvc/c_local_lat/c_local_lat.vcproj | 2 +- builds/msvc/c_local_thr/c_local_thr.vcproj | 2 +- builds/msvc/c_remote_lat/c_remote_lat.vcproj | 2 +- builds/msvc/c_remote_thr/c_remote_thr.vcproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 7668e7976dc6c3e18a314d991381f29f5cbcc6ef Author: Martin Sustrik Date: Mon Apr 12 09:57:34 2010 +0200 zmq_poll returns ETERM in case of context termination doc/zmq_socket.txt | 3 --- src/zmq.cpp | 11 +++++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) commit 3236cb1a54316206d14a0f925dfa79d5b35f70fc Author: Martin Sustrik Date: Mon Apr 12 09:25:04 2010 +0200 ETERM is accounted for in the documentation doc/zmq_bind.txt | 2 ++ doc/zmq_connect.txt | 2 ++ doc/zmq_poll.txt | 3 ++- doc/zmq_recv.txt | 2 ++ doc/zmq_send.txt | 2 ++ doc/zmq_setsockopt.txt | 3 +++ doc/zmq_socket.txt | 3 +++ 7 files changed, 16 insertions(+), 1 deletion(-) commit fba28c7c0cddd7c54fe45b38fc38ac6fe5a48438 Author: Martin Sustrik Date: Sun Apr 11 16:36:27 2010 +0200 issue 1 - Change zmq_term semantics include/zmq.h | 1 + src/app_thread.cpp | 25 ++++++++++++++++++++++--- src/app_thread.hpp | 18 ++++++++++++++++-- src/dispatcher.cpp | 7 +++++++ src/socket_base.cpp | 50 +++++++++++++++++++++++++++++++++++++++++++------- src/zmq.cpp | 2 ++ 6 files changed, 91 insertions(+), 12 deletions(-) commit dff79d778db46bebe1e3b0cbd28b328972b9adb8 Author: Martin Sustrik Date: Sun Apr 11 14:20:00 2010 +0200 version number bumped to 2.0.7 for MSVC build builds/msvc/platform.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cf076510a39c8eb60b1ec2f28aa895b9fb6eaae Author: Martin Sustrik Date: Sun Apr 11 14:00:40 2010 +0200 C-style comments in zmq.h include/zmq.h | 128 +++++++++++++++++++++++++-------------------------------- 1 file changed, 57 insertions(+), 71 deletions(-) commit 00cf3ceb8da8cb58b343cb75798a042588f09752 Author: Martin Sustrik Date: Sun Apr 11 10:26:47 2010 +0200 multi-part message functionality available via ZMQ_SNDMORE and ZMQ_RCVMORE include/zmq.h | 3 +++ src/socket_base.cpp | 27 ++++++++++++++++++++++----- src/socket_base.hpp | 3 +++ 3 files changed, 28 insertions(+), 5 deletions(-) commit 6fea42258348c8489d2cd64ca0e92981148134f8 Author: Martin Sustrik Date: Sun Apr 11 07:59:03 2010 +0200 getsockopt added to c++ binding include/zmq.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) commit b668387d917cd80c5d4b9631bc0008b6a014c083 Author: Martin Lucina Date: Sat Apr 10 17:04:33 2010 +0200 Remove -Wxxx gcc-isms from subdir Makefiles configure.in | 6 +++--- devices/zmq_forwarder/Makefile.am | 1 - devices/zmq_queue/Makefile.am | 1 - devices/zmq_streamer/Makefile.am | 1 - perf/Makefile.am | 4 ---- 5 files changed, 3 insertions(+), 10 deletions(-) commit f6fa41dd7b3677d0f7441db83cbd6c8a0283a499 Author: Martin Lucina Date: Sat Apr 10 16:51:22 2010 +0200 Compile perf tests with the C++ compiler This lets us build the binaries in a portable fashion w/o having to worry about how to link with the C++ runtime. configure.in | 7 --- perf/Makefile.am | 8 +-- perf/local_lat.c | 106 --------------------------------------- perf/local_lat.cpp | 106 +++++++++++++++++++++++++++++++++++++++ perf/local_thr.c | 136 --------------------------------------------------- perf/local_thr.cpp | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++ perf/remote_lat.c | 119 -------------------------------------------- perf/remote_lat.cpp | 119 ++++++++++++++++++++++++++++++++++++++++++++ perf/remote_thr.c | 98 ------------------------------------- perf/remote_thr.cpp | 98 +++++++++++++++++++++++++++++++++++++ 10 files changed, 463 insertions(+), 470 deletions(-) commit c214a24f06bb41885dfbd73e42acb6e043df05ef Author: Martin Sustrik Date: Sat Apr 10 16:27:07 2010 +0200 fix for Sun C++ 5.8 src/forwarder.cpp | 2 ++ src/queue.cpp | 2 ++ src/streamer.cpp | 2 ++ 3 files changed, 6 insertions(+) commit 770aedbd09fb1e11a4e4880da2603a517856c16c Author: Martin Lucina Date: Sat Apr 10 16:18:34 2010 +0200 Build fixes for Solaris and non-GNU compilers Compiling C++ code with -D_POSIX_SOURCE on Solaris is unsupported, so remove it. Isolate GCC-isms inside checks that we are actually using GCC/G++. Only check for -lstdc++ when on GCC and doing static linking. configure.in | 38 ++++++++++++++++++++++++++------------ src/Makefile.am | 2 +- 2 files changed, 27 insertions(+), 13 deletions(-) commit 1dc0380e29fecd70f6299243d81f67db850db616 Author: Martin Lucina Date: Sat Apr 10 13:28:45 2010 +0200 Debian packaging fixes suitable for 0MQ git Removed README.source, TODO.source since these are irrelevant to a generic git package. Fixed spelling in debian/copyright. Removed RFC check in debian/rules, again irrelevant to a generic git package. debian/README.source | 37 ------------------------------------- debian/TODO.source | 5 ----- debian/copyright | 2 +- debian/rules | 6 ------ 4 files changed, 1 insertion(+), 49 deletions(-) commit 8aa2acd0f8906b95232e765da805e3fab947b76b Author: Adrian von Bidder Date: Sat Apr 10 13:23:09 2010 +0200 Debian packaging update from Adrian von Bidder debian/README.Debian | 10 +- debian/README.source | 37 ++++++++ debian/TODO.source | 5 + debian/changelog | 24 ++++- debian/cl-zeromq.files | 7 -- debian/cl-zeromq.install | 6 -- debian/cl-zeromq.links | 1 - debian/control | 195 +++++++++++---------------------------- debian/copyright | 105 +++++++++++++++++++-- debian/dirs | 5 - debian/docs | 2 - debian/libzeromq-dev.files | 37 -------- debian/libzeromq-dev.install | 19 ---- debian/libzeromq-python.files | 1 - debian/libzeromq-python.install | 1 - debian/libzeromq-ruby.files | 1 - debian/libzeromq-ruby.install | 1 - debian/libzeromq0.files | 2 - debian/libzeromq0.install | 1 - debian/libzmq-dev.install | 5 + debian/libzmq-dev.manpages | 2 + debian/libzmq0.install | 1 + debian/libzmq0.manpages | 5 + debian/rules | 126 +++++++++---------------- debian/shlibs.local | 1 - debian/source/format | 1 + debian/source/options | 1 + debian/zeromq-bin.install | 3 + debian/zeromq-bin.manpages | 3 + debian/zeromq-examples.files | 2 - debian/zeromq-examples.install | 2 - debian/zeromq-perf.files | 10 -- debian/zeromq-perf.install | 10 -- debian/zeromq-utils.files | 6 -- debian/zeromq-utils.install | 6 -- 35 files changed, 283 insertions(+), 361 deletions(-) commit 1d28dc9059d0014314ad22d98ddb7c6f21c151e7 Author: Martin Lucina Date: Fri Apr 9 19:15:40 2010 +0200 Fix for Issue #14 Don't fail hard if an unreleased tarball is being built and asciidoc is not installed; instead just print a big fat warning configure.in | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 6ea76e95736152e83f977ad860f40a231cedb1ef Author: Martin Sustrik Date: Fri Apr 9 16:24:21 2010 +0200 version bumped to 2.0.7 configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 716f4ac8714d33d21f9853f58482e35c1e3ad934 Author: Martin Sustrik Date: Fri Apr 9 13:04:15 2010 +0200 zmq_getsockopt function added include/zmq.h | 2 + src/options.cpp | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++- src/options.hpp | 1 + src/socket_base.cpp | 7 ++++ src/socket_base.hpp | 4 +- src/zmq.cpp | 6 +++ 6 files changed, 122 insertions(+), 4 deletions(-) commit 027bb1d2a7c83c7c719f6bdc3100eb639019d2f0 Author: Martin Sustrik Date: Thu Apr 8 19:20:42 2010 +0200 issue 10 - zmq_strerror problem on Windows src/zmq.cpp | 4 ++++ 1 file changed, 4 insertions(+) commit 5cd9f74a70e2c8503c29aaca881c193a936b7b44 Author: Martin Sustrik Date: Thu Apr 8 19:04:32 2010 +0200 few fixed related to multi-part messages in REP socket src/rep.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 77cbd18e9c0480a6c26fd29de5d70569762108be Author: Martin Sustrik Date: Thu Apr 8 11:07:22 2010 +0200 issue 11 - Assertion failed: it != peers.end () (pgm_receiver.cpp:161) src/pgm_receiver.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 38e9103e0c82bcbb61a9c23ed3a4ace1c7420f95 Author: Martin Sustrik Date: Thu Apr 8 08:33:38 2010 +0200 issue 13 (Assertion failed: load.get () == 0 (epoll.cpp:49)) fixed src/object.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 0f7aab5212ef66f7e292fe4ca891660859972ec4 Merge: 745db9c b0250cc Author: Martin Sustrik Date: Wed Apr 7 11:54:34 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 745db9c574153160214470563bea3b53ab4c292a Author: Martin Sustrik Date: Wed Apr 7 11:54:09 2010 +0200 unitialised member in seesion_t class - fixed src/session.cpp | 1 + 1 file changed, 1 insertion(+) commit b0250cc89df8d6c3d3fff7c8edc17a09ceaaa107 Author: Martin Sustrik Date: Wed Apr 7 10:41:11 2010 +0200 Win32 build fixed builds/msvc/libzmq/libzmq.vcproj | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 065e4d00ff628097ce693ac7d9056fbcaf23d0bc Merge: edfd05d a7973a2 Author: Martin Sustrik Date: Wed Apr 7 08:20:24 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit edfd05df8ef58afc498795cb74906c07ee396f76 Author: Jon Dyte Date: Wed Apr 7 08:20:01 2010 +0200 devices can be created via API devices/zmq_forwarder/zmq_forwarder.cpp | 6 +- devices/zmq_queue/zmq_queue.cpp | 110 +------------------------------ devices/zmq_streamer/zmq_streamer.cpp | 6 +- include/zmq.h | 10 +++ include/zmq.hpp | 7 ++ src/Makefile.am | 6 ++ src/forwarder.cpp | 36 ++++++++++ src/forwarder.hpp | 31 +++++++++ src/queue.cpp | 98 +++++++++++++++++++++++++++ src/queue.hpp | 31 +++++++++ src/streamer.cpp | 36 ++++++++++ src/streamer.hpp | 31 +++++++++ src/zmq.cpp | 20 ++++++ 13 files changed, 309 insertions(+), 119 deletions(-) commit a7973a2c4997e2ff79126eb073dc675c574de917 Author: Martin Lucina Date: Tue Apr 6 15:23:13 2010 +0200 Documentation fixes doc/zmq_bind.txt | 6 +++--- doc/zmq_setsockopt.txt | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) commit 0777567e8911382ac42859f907730df023ebec26 Author: Martin Sustrik Date: Tue Apr 6 07:33:52 2010 +0200 ENODEV from zmq_bind error described doc/zmq_bind.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 37fd1a77a6927ae351e10fe8d5b68d0b0d525d22 Author: Martin Hurton Date: Wed Mar 31 15:15:16 2010 +0200 Handle full-pipe for REP sockets more gracefully src/rep.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 2f219d7c287cd518bc77b576e507d7a17c9535e9 Author: Martin Sustrik Date: Sat Mar 27 21:25:40 2010 +0100 ZMQ_TBC renamed to ZMQ_MORE include/zmq.h | 4 ++-- src/fq.cpp | 12 ++++++------ src/fq.hpp | 2 +- src/lb.cpp | 12 ++++++------ src/lb.hpp | 2 +- src/pipe.cpp | 6 +++--- src/pub.cpp | 2 +- src/rep.cpp | 22 +++++++++++----------- src/rep.hpp | 2 +- src/req.cpp | 20 ++++++++++---------- src/req.hpp | 2 +- src/session.cpp | 2 +- src/socket_base.cpp | 6 +++--- src/sub.cpp | 14 +++++++------- src/sub.hpp | 2 +- src/zmq_encoder.cpp | 6 +++--- 16 files changed, 58 insertions(+), 58 deletions(-) commit 842b4dd2e492459cbc0cc79ffdb34ddab8f0b528 Author: Martin Sustrik Date: Sat Mar 27 14:57:56 2010 +0100 muti-part message functionality available via API include/zmq.h | 1 + src/socket_base.cpp | 5 +++++ 2 files changed, 6 insertions(+) commit 8d8e0857be3d2ab941de443e436061ef82752c17 Author: Martin Sustrik Date: Sat Mar 27 14:50:35 2010 +0100 as advertised, zmq_flush and ZMQ_NOFLUSH were removed include/zmq.h | 2 -- src/zmq.cpp | 6 ------ 2 files changed, 8 deletions(-) commit 06538fc11790a0cf895c43d137a33febf97f3a28 Author: Martin Sustrik Date: Sat Mar 27 14:24:57 2010 +0100 multi-part messages work with REQ/REP sockets src/rep.cpp | 71 +++++++++++++++++++++++++++++++++++++++-------------------- src/rep.hpp | 9 ++++++-- src/req.cpp | 61 ++++++++++++++++++++++++++++++++------------------ src/req.hpp | 9 ++++++-- 4 files changed, 101 insertions(+), 49 deletions(-) commit bbfac783f91f6692b7f9c0aa5392ac955f7b49bf Author: Martin Sustrik Date: Sat Mar 27 09:43:49 2010 +0100 multi-part message work with UPSTREAM/DOWNSTREAM src/lb.cpp | 25 +++++++++++++++++++------ src/lb.hpp | 3 +++ 2 files changed, 22 insertions(+), 6 deletions(-) commit ed291b02516ac5c9fe01f328d505305d36fe6319 Author: Martin Sustrik Date: Sat Mar 27 09:24:38 2010 +0100 multi-part messages work with PUB/SUB src/fq.cpp | 31 +++++++++++++++++++++++++------ src/fq.hpp | 4 ++++ src/pipe.cpp | 10 ++++++++-- src/pub.cpp | 3 ++- src/sub.cpp | 27 +++++++++++++++++++++++++-- src/sub.hpp | 4 ++++ src/ypipe.hpp | 2 +- 7 files changed, 69 insertions(+), 12 deletions(-) commit 0b9897b141ae03ccd00132a638d030a2521cf5b3 Merge: 0a53ff7 783463a Author: Martin Sustrik Date: Fri Mar 26 12:15:47 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 783463ac49aeb2d1be57dc9b3669d508187415a8 Author: Martin Lucina Date: Thu Mar 25 17:31:18 2010 +0100 Clarify use of poll() with C++ API, fix typo doc/zmq_cpp.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c802a72a0b4aae06cd65158af3c65e65e0dfc2e0 Author: Vitaly Mayatskikh Date: Mon Mar 22 22:31:37 2010 +0100 configure does not mention xmlto when missing configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a53ff7b9f8a212793c540535c322bfaa93d3430 Merge: f031677 93bdb79 Author: Martin Sustrik Date: Sat Mar 20 19:51:29 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 93bdb792a92b9bd235c7be47a13febf429568301 Author: Martin Sustrik Date: Sat Mar 20 19:50:36 2010 +0100 PUB socket was blocking occassionally - fixed src/pub.cpp | 84 +++++++++++++++++++++++++++-------------------------------- src/pub.hpp | 17 ++++++------ 2 files changed, 47 insertions(+), 54 deletions(-) commit f031677100b41347e09932fc973040097a2187e4 Author: Martin Sustrik Date: Sat Mar 20 15:04:30 2010 +0100 rollback of half-processed messages in case of disconnection src/session.cpp | 27 ++++++++++++++++++++++++++- src/session.hpp | 4 ++++ 2 files changed, 30 insertions(+), 1 deletion(-) commit dfdaff5eba1e6980adb3326c119d2070d0ad42bb Author: Martin Sustrik Date: Sat Mar 20 10:58:59 2010 +0100 XREP-style prefixing/trimming messages removed src/i_engine.hpp | 10 ++-------- src/options.cpp | 3 +-- src/options.hpp | 3 --- src/pgm_receiver.cpp | 12 ------------ src/pgm_receiver.hpp | 2 -- src/pgm_sender.cpp | 12 ------------ src/pgm_sender.hpp | 2 -- src/session.cpp | 5 ----- src/xrep.cpp | 5 ++--- src/zmq_decoder.cpp | 48 +++++++----------------------------------------- src/zmq_decoder.hpp | 8 -------- src/zmq_encoder.cpp | 31 ++++--------------------------- src/zmq_encoder.hpp | 6 ------ src/zmq_engine.cpp | 10 ---------- src/zmq_engine.hpp | 2 -- src/zmq_init.cpp | 3 +-- 16 files changed, 17 insertions(+), 145 deletions(-) commit cbaf10978a8ffa98d98161aeec8d020c517b127b Author: Martin Sustrik Date: Fri Mar 19 09:14:26 2010 +0100 fixes for building with Sun CC src/dispatcher.cpp | 3 ++- src/tcp_listener.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit ae35a1644cd8f2441de73f1260c46bb0da6a1605 Author: Martin Sustrik Date: Tue Mar 16 19:02:50 2010 +0100 fix include paths in perf on Win32 perf/local_lat.c | 2 +- perf/local_thr.c | 2 +- perf/remote_lat.c | 2 +- perf/remote_thr.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 49a30d49f37148db1be105615668998c8fb8ea86 Author: Martin Sustrik Date: Tue Mar 16 17:49:39 2010 +0100 Update contributors for 2.0.6 AUTHORS | 96 ++++++++++++++++++++++++++++++++----------------------------- ChangeLog | 19 +++++++----- 2 files changed, 62 insertions(+), 53 deletions(-) commit fe18ce1abab2ef43f97ef6f2b093a69f42cb7103 Author: Martin Sustrik Date: Tue Mar 16 17:11:23 2010 +0100 ChangeLog for v2.0.6 ChangeLog | 1499 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1499 insertions(+) commit 38c942ae648115ac10320968eb4b5e235ef15674 Author: Martin Sustrik Date: Tue Mar 16 17:07:17 2010 +0100 Add Git location to README README | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6d5a9e96400025044af8172887ef99589c0d1eb1 Author: Martin Sustrik Date: Tue Mar 16 16:20:23 2010 +0100 Update README README | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) commit ad75d0213483f3c585ce144386623e64e65eca0d Author: Martin Sustrik Date: Tue Mar 16 15:48:16 2010 +0100 Add MSVC build files to distribution .gitignore | 12 ++++-------- Makefile.am | 2 +- builds/msvc/Makefile.am | 12 ++++++++++++ configure.in | 3 ++- 4 files changed, 19 insertions(+), 10 deletions(-) commit a9e0c3cd7e0c54f872749f387cf3d69b216bc613 Author: Martin Sustrik Date: Tue Mar 16 15:37:47 2010 +0100 Removing leftover MSVC builds builds/msvc/display/display.vcproj | 176 ------------------------------------ builds/msvc/prompt/prompt.vcproj | 176 ------------------------------------ 2 files changed, 352 deletions(-) commit 5472861179ff232c55e7a7021a93da5c680f2017 Merge: 8a3f974 8fcf6ff Author: Martin Sustrik Date: Tue Mar 16 15:24:57 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 8a3f97400a2b3ef2ec088a00868087b85cfd81b6 Author: Martin Sustrik Date: Tue Mar 16 15:23:55 2010 +0100 Clarify zmq_poll restrictions doc/zmq_poll.txt | 3 +++ 1 file changed, 3 insertions(+) commit 1705ec224745b935e13d8f18ef81bcbef45ff143 Author: Martin Lucina Date: Tue Mar 16 15:19:38 2010 +0100 C++ interface documentation updates doc/zmq_cpp.txt | 195 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 151 insertions(+), 44 deletions(-) commit 8fcf6ffb67aba2ff9f78f4ba327d29755f03535a Author: Martin Lucina Date: Mon Mar 15 15:47:17 2010 +0100 Cleanups to autogen.sh autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fceba036279a0e9bb39aebd862b70ad1bb5b3f40 Author: Martin Lucina Date: Mon Mar 15 15:45:38 2010 +0100 Cleanups to autogen.sh Use POSIX "command -v" construct to test for prerequisite commands Clarify error messages on failure autogen.sh | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit 61ad236e9543a569fe066872a5fda4fa40ea7591 Author: Martin Sustrik Date: Sat Mar 13 14:40:10 2010 +0100 ZMQ_NOFLUSH and zmq_flush obsoleted doc/Makefile.am | 2 +- doc/zmq.txt | 1 - doc/zmq_flush.txt | 55 --------------------------------------------------- doc/zmq_send.txt | 8 -------- doc/zmq_socket.txt | 1 - include/zmq.hpp | 7 ------- src/downstream.cpp | 10 ---------- src/downstream.hpp | 1 - src/lb.cpp | 3 +-- src/p2p.cpp | 10 +--------- src/p2p.hpp | 1 - src/pub.cpp | 17 +++------------- src/pub.hpp | 1 - src/rep.cpp | 6 ------ src/rep.hpp | 1 - src/req.cpp | 6 ------ src/req.hpp | 1 - src/socket_base.cpp | 5 ----- src/socket_base.hpp | 2 -- src/sub.cpp | 6 ------ src/sub.hpp | 1 - src/upstream.cpp | 6 ------ src/upstream.hpp | 1 - src/xrep.cpp | 6 ------ src/xrep.hpp | 1 - src/xreq.cpp | 7 ------- src/xreq.hpp | 1 - src/zmq.cpp | 3 ++- 28 files changed, 8 insertions(+), 162 deletions(-) commit c42343d3f027248514344aec9e3814dfe1047d59 Author: Martin Sustrik Date: Sat Mar 13 12:34:55 2010 +0100 pipe_t::rollback removes only unfinished message from the pipe rather than all unflushed messages src/pipe.cpp | 4 ++++ src/pipe.hpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit dcb983699e52bf2e075baaeef250bcd3c82e4846 Author: Martin Sustrik Date: Sat Mar 13 08:59:46 2010 +0100 zmq_queue implementation added devices/zmq_queue/zmq_queue.cpp | 114 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 109 insertions(+), 5 deletions(-) commit 22db38bf3d9c96a840af50300632d44fd01ed3a8 Author: unknown Date: Fri Mar 12 20:20:25 2010 +0100 MSVC build: C++ perf tests removed; all executables go into bin directory builds/msvc/c_local_lat/c_local_lat.vcproj | 8 +- builds/msvc/c_local_thr/c_local_thr.vcproj | 8 +- builds/msvc/c_remote_lat/c_remote_lat.vcproj | 8 +- builds/msvc/c_remote_thr/c_remote_thr.vcproj | 8 +- builds/msvc/cpp_local_lat/cpp_local_lat.vcproj | 176 ---------------------- builds/msvc/cpp_local_thr/cpp_local_thr.vcproj | 176 ---------------------- builds/msvc/cpp_remote_lat/cpp_remote_lat.vcproj | 176 ---------------------- builds/msvc/cpp_remote_thr/cpp_remote_thr.vcproj | 176 ---------------------- builds/msvc/msvc.sln | 44 +----- builds/msvc/zmq_forwarder/zmq_forwarder.vcproj | 2 + builds/msvc/zmq_queue/zmq_queue.vcproj | 2 + builds/msvc/zmq_streamer/zmq_streamer.vcproj | 2 + 12 files changed, 26 insertions(+), 760 deletions(-) commit c08a7f8896e8fdae8379d2fce552b360daaeadc8 Author: Martin Sustrik Date: Fri Mar 12 20:02:19 2010 +0100 C perf tests are built non-optionally; C++ perf tests removed Makefile.am | 6 +-- configure.in | 26 +-------- perf/Makefile.am | 131 ++++++++++++++++++++++++++++++++++++++++++++- perf/c/Makefile.am | 129 -------------------------------------------- perf/c/local_lat.c | 106 ------------------------------------ perf/c/local_thr.c | 136 ----------------------------------------------- perf/c/remote_lat.c | 119 ----------------------------------------- perf/c/remote_thr.c | 98 ---------------------------------- perf/cpp/Makefile.am | 20 ------- perf/cpp/local_lat.cpp | 52 ------------------ perf/cpp/local_thr.cpp | 71 ------------------------- perf/cpp/remote_lat.cpp | 63 ---------------------- perf/cpp/remote_thr.cpp | 54 ------------------- perf/local_lat.c | 106 ++++++++++++++++++++++++++++++++++++ perf/local_thr.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++ perf/remote_lat.c | 119 +++++++++++++++++++++++++++++++++++++++++ perf/remote_thr.c | 98 ++++++++++++++++++++++++++++++++++ 17 files changed, 590 insertions(+), 880 deletions(-) commit 1fbeba2fe3c3bd6046eea4d6432791194d4238f2 Author: Martin Sustrik Date: Fri Mar 12 19:05:56 2010 +0100 simplify configuration summary configure.in | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 66b67fbdf2b047ef7adb8ec018a6fe89dd9cbfca Author: Martin Sustrik Date: Fri Mar 12 18:58:29 2010 +0100 devices are built unconditionally configure.in | 34 ---------------------------------- devices/Makefile.am | 13 +------------ src/req.cpp | 2 +- 3 files changed, 2 insertions(+), 47 deletions(-) commit 430aa533347dcbca57857d318a6898f480967cba Author: Martin Sustrik Date: Fri Mar 12 18:42:38 2010 +0100 text concerning language bindings removed from configure configure.in | 3 --- 1 file changed, 3 deletions(-) commit 54df388aced3ae059009eec3df66c7dea717747b Author: unknown Date: Fri Mar 12 18:05:38 2010 +0100 Java binding removed from MSVC build builds/msvc/j_local_lat/j_local_lat.vcproj | 78 -------- builds/msvc/j_local_thr/j_local_thr.vcproj | 78 -------- builds/msvc/j_remote_lat/j_remote_lat.vcproj | 78 -------- builds/msvc/j_remote_thr/j_remote_thr.vcproj | 78 -------- builds/msvc/java/java.vcproj | 272 -------------------------- builds/msvc/msvc.sln | 45 ----- 6 files changed, 629 deletions(-) commit 6badd204d5686de8b2a6e8ee88da78260c0ff949 Author: Martin Hurton Date: Wed Mar 3 17:25:46 2010 +0100 Implement flow control for ZMQ_REP sockets src/rep.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 923609b0922c3bf07f16c8c99aba4fe98f08ef60 Author: Martin Hurton Date: Tue Mar 2 22:23:34 2010 +0100 Implement flow control for ZMQ_REQ sockets src/req.cpp | 98 ++++++++++++++++++++++++++++++++++++++++++++++------------- src/req.hpp | 3 ++ 2 files changed, 80 insertions(+), 21 deletions(-) commit 42e575cb6b62fe1e5d12d2e4fb5c6874d47eb57e Author: Martin Hurton Date: Tue Mar 2 12:41:33 2010 +0100 Implement flow control fox ZMQ_XREP sockets src/xrep.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e34184acc327ae4b085a1a50ff6502e2dc148522 Author: Martin Hurton Date: Tue Mar 2 11:15:50 2010 +0100 Implement flow control for ZMQ_XREQ sockets src/xreq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06d7a447378c8e9f0805c219deaf8e7e7ef1eeb0 Author: Martin Hurton Date: Tue Mar 2 10:48:30 2010 +0100 Implement flow control for ZMQ_PUB sockets src/pub.cpp | 34 ++++++++++++++++++++++++++-------- src/pub.hpp | 7 +++++++ 2 files changed, 33 insertions(+), 8 deletions(-) commit f9c84a1a689f4f64cfa45cb22d4f02ec246c7f93 Author: Martin Hurton Date: Mon Mar 1 17:21:23 2010 +0100 Implement flow control for ZMQ_DOWNSTREAM sockets src/downstream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d4f6b18cd57897cc0e77e474118e104a0d5cfc3 Author: Martin Hurton Date: Mon Mar 1 16:55:13 2010 +0100 Implement flow control for ZMQ_P2P sockets src/p2p.cpp | 21 +++++++++++++++------ src/p2p.hpp | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) commit f9521c6b6a35103c03b742a311a34d7b04da0b84 Author: Martin Hurton Date: Tue Mar 2 09:02:40 2010 +0100 PGM: implement flow control src/pgm_receiver.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- src/pgm_receiver.hpp | 9 +++++++++ 2 files changed, 55 insertions(+), 4 deletions(-) commit 61ee6fae536a8000be87b5aaf271f6519a3b7d3f Author: Martin Hurton Date: Mon Mar 1 10:13:26 2010 +0100 Implement flow control This commit introduces the necessary changes necessary for implementing flow control. None of the socket types implements the flow control yet. The code will crash when the flow control is enabled and the thw lwm is reached. The following commits will add flow-control support for individual socket types. src/command.hpp | 8 +++++++ src/downstream.cpp | 6 +++++- src/downstream.hpp | 1 + src/err.hpp | 6 ++++++ src/i_endpoint.hpp | 1 + src/i_engine.hpp | 2 ++ src/lb.cpp | 49 +++++++++++++++++++------------------------ src/lb.hpp | 1 - src/object.cpp | 19 +++++++++++++++++ src/object.hpp | 3 +++ src/options.cpp | 8 +++---- src/options.hpp | 4 ++-- src/p2p.cpp | 11 ++++++---- src/p2p.hpp | 1 + src/pgm_receiver.cpp | 5 +++++ src/pgm_receiver.hpp | 1 + src/pgm_sender.cpp | 5 +++++ src/pgm_sender.hpp | 1 + src/pipe.cpp | 57 ++++++++++++++++++++++++++++++++++++++++---------- src/pipe.hpp | 29 ++++++++++++++++--------- src/pub.cpp | 16 ++++++++++---- src/pub.hpp | 1 + src/rep.cpp | 10 +++++++-- src/rep.hpp | 1 + src/req.cpp | 11 ++++++---- src/req.hpp | 1 + src/session.cpp | 7 +++++++ src/session.hpp | 1 + src/socket_base.cpp | 5 +++++ src/socket_base.hpp | 2 ++ src/sub.cpp | 5 +++++ src/sub.hpp | 1 + src/upstream.cpp | 5 +++++ src/upstream.hpp | 1 + src/xrep.cpp | 8 ++++++- src/xrep.hpp | 1 + src/xreq.cpp | 6 +++++- src/xreq.hpp | 1 + src/zmq_engine.cpp | 17 ++++++++++----- src/zmq_engine.hpp | 1 + 40 files changed, 242 insertions(+), 77 deletions(-) commit 31d36104aa7caead6f299f0c5cb58a9fde7cf9b0 Author: Martin Lucina Date: Fri Mar 12 10:34:11 2010 +0100 devices/ build fixed devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- devices/zmq_queue/zmq_queue.cpp | 2 +- devices/zmq_streamer/zmq_streamer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 10bbe6af9900b4609cfcadc031dcf4dcb8ebfb3b Author: Martin Lucina Date: Thu Mar 11 20:43:51 2010 +0100 Cleanup .gitignore .gitignore | 6 ------ 1 file changed, 6 deletions(-) commit 27e2d08449ea52649e2e42b263f76fbd5d8382c5 Author: Martin Lucina Date: Thu Mar 11 20:33:27 2010 +0100 Restructure language bindings C and C++ headers moved from bindings/ to include/, bindings/ removed --with-c and --with-cpp options to configure removed, C and C++ now built and installed by default bindings/c/zmq.h | 249 --------------------------------------------- bindings/cpp/zmq.hpp | 266 ------------------------------------------------- configure.in | 32 +----- include/zmq.h | 249 +++++++++++++++++++++++++++++++++++++++++++++ include/zmq.hpp | 266 +++++++++++++++++++++++++++++++++++++++++++++++++ perf/Makefile.am | 10 +- perf/c/Makefile.am | 2 +- perf/cpp/Makefile.am | 2 +- src/Makefile.am | 12 +-- src/app_thread.cpp | 2 +- src/dispatcher.cpp | 2 +- src/downstream.cpp | 2 +- src/err.cpp | 2 +- src/fq.cpp | 2 +- src/i_inout.hpp | 2 +- src/io_thread.cpp | 2 +- src/lb.cpp | 2 +- src/msg_content.hpp | 2 +- src/options.cpp | 2 +- src/p2p.cpp | 2 +- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/pub.cpp | 2 +- src/rep.cpp | 2 +- src/req.cpp | 2 +- src/socket_base.cpp | 2 +- src/socket_base.hpp | 2 +- src/sub.cpp | 2 +- src/sub.hpp | 2 +- src/tcp_connecter.cpp | 2 +- src/tcp_listener.cpp | 2 +- src/upstream.cpp | 2 +- src/xrep.cpp | 2 +- src/xreq.cpp | 2 +- src/zmq.cpp | 2 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.hpp | 2 +- 37 files changed, 549 insertions(+), 595 deletions(-) commit 90944759b66771bbe399922eecedc5095fa2a509 Author: Martin Lucina Date: Thu Mar 11 20:12:55 2010 +0100 Removed Java binding from core distribution Makefile.am | 4 +- bindings/Makefile.am | 7 - bindings/java/Context.cpp | 112 ------------ bindings/java/Makefile.am | 72 -------- bindings/java/Poller.cpp | 126 ------------- bindings/java/Socket.cpp | 345 ------------------------------------ bindings/java/org/zmq/Context.java | 58 ------ bindings/java/org/zmq/Poller.java | 135 -------------- bindings/java/org/zmq/Socket.java | 134 -------------- configure.in | 73 +------- perf/Makefile.am | 8 +- perf/java/Makefile.am | 5 - perf/java/local_lat.java | 55 ------ perf/java/local_thr.java | 71 -------- perf/java/remote_lat.java | 60 ------- perf/java/remote_thr.java | 57 ------ 16 files changed, 9 insertions(+), 1313 deletions(-) commit 9fda070e4d66d538e3c709c6cb8934cbf4442c29 Author: Martin Lucina Date: Wed Mar 10 23:20:43 2010 +0100 Typeset literal correctly doc/zmq_pgm.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a1e0beaa2849a51ea659eba0f142ce340d2cc6d Author: Martin Lucina Date: Wed Mar 10 23:18:08 2010 +0100 Fixes to PGM wire format description doc/zmq_pgm.txt | 69 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 31 deletions(-) commit 5fef480aeb28424769d97c92f331d87f87b87c85 Author: Martin Lucina Date: Wed Mar 10 13:52:41 2010 +0100 Fixes to TCP wire format specification doc/zmq_tcp.txt | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) commit 8f90ae8dfdf5efbb6c8429897dc95cad621af00b Author: Martin Sustrik Date: Wed Mar 10 12:40:13 2010 +0100 wire formats in docs clarified doc/zmq_pgm.txt | 40 +++++++++++++++++++++++++++++++--------- doc/zmq_tcp.txt | 22 +++++++++++++--------- 2 files changed, 44 insertions(+), 18 deletions(-) commit 98801ebcaea1117ae596a3bae0653c3720a94359 Author: Martin Lucina Date: Wed Mar 10 12:19:39 2010 +0100 Documentation fixes doc/zmq.txt | 3 ++- doc/zmq_bind.txt | 4 ++-- doc/zmq_close.txt | 2 +- doc/zmq_connect.txt | 4 ++-- doc/zmq_flush.txt | 2 +- doc/zmq_msg_close.txt | 2 +- doc/zmq_msg_copy.txt | 2 +- doc/zmq_msg_init.txt | 2 +- doc/zmq_msg_init_data.txt | 2 +- doc/zmq_msg_init_size.txt | 2 +- doc/zmq_msg_move.txt | 2 +- doc/zmq_poll.txt | 13 +++++++------ doc/zmq_recv.txt | 2 +- doc/zmq_send.txt | 2 +- doc/zmq_setsockopt.txt | 18 ++++++++---------- doc/zmq_socket.txt | 7 ++++--- doc/zmq_term.txt | 2 +- 17 files changed, 36 insertions(+), 35 deletions(-) commit bc468b34513a0fd76e69e03f3f978abd7d8c3871 Author: Martin Lucina Date: Tue Mar 9 19:29:41 2010 +0100 Add missing section with zmq_version() doc/zmq.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit edebff902a9785ecdb3a27f6a78ac7cc68b38a56 Author: Martin Lucina Date: Tue Mar 9 18:58:59 2010 +0100 Add dependency for zmq_epgm.7 doc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca70b40383fd12ce866054dd87cecb3d732c8d9f Author: Martin Lucina Date: Tue Mar 9 18:53:42 2010 +0100 Hack, zmq_epgm.7 needs to be copied from zmq_pgm.7 doc/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) commit 1aee86408d575d6572b071d7564da7f006d1757e Author: Martin Lucina Date: Tue Mar 9 18:47:31 2010 +0100 Documentation rewrite doc/Makefile.am | 4 +- doc/asciidoc.conf | 8 ++ doc/zmq.txt | 227 +++++++++++++++++------------ doc/zmq_bind.txt | 60 +++++--- doc/zmq_close.txt | 37 +++-- doc/zmq_connect.txt | 60 +++++--- doc/zmq_epgm.txt | 1 + doc/zmq_flush.txt | 48 +++---- doc/zmq_forwarder.txt | 17 +-- doc/zmq_init.txt | 52 ++++--- doc/zmq_inproc.txt | 85 ++++++++--- doc/zmq_ipc.txt | 72 +++++++--- doc/zmq_java.txt | 27 ---- doc/zmq_msg_close.txt | 43 +++--- doc/zmq_msg_copy.txt | 46 +++--- doc/zmq_msg_data.txt | 32 ++--- doc/zmq_msg_init.txt | 29 ++-- doc/zmq_msg_init_data.txt | 51 ++++--- doc/zmq_msg_init_size.txt | 51 +++---- doc/zmq_msg_move.txt | 38 +++-- doc/zmq_msg_size.txt | 35 ++--- doc/zmq_pgm.txt | 174 +++++++++++++---------- doc/zmq_poll.txt | 122 +++++++++++----- doc/zmq_queue.txt | 17 +-- doc/zmq_recv.txt | 53 ++++--- doc/zmq_send.txt | 66 +++++---- doc/zmq_setsockopt.txt | 348 ++++++++++++++++++++++++++++++--------------- doc/zmq_socket.txt | 184 ++++++++++++------------ doc/zmq_streamer.txt | 17 +-- doc/zmq_strerror.txt | 25 ++-- doc/zmq_tcp.txt | 129 +++++++++++------ doc/zmq_term.txt | 33 ++--- doc/zmq_udp.txt | 56 -------- doc/zmq_version.txt | 23 +-- 34 files changed, 1297 insertions(+), 973 deletions(-) commit d790940fd06060c8a2c624b0e41e470ad31ae0d8 Author: Martin Sustrik Date: Tue Mar 9 18:14:49 2010 +0100 udp transport renamed to epgm configure.in | 4 ++-- src/socket_base.cpp | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) commit 5a776f5597cac632ca507e2d80ca0de064bba1d6 Author: Martin Sustrik Date: Tue Mar 9 17:34:28 2010 +0100 PGM late joiners would start receiving a complete message rather than a message part src/zmq_encoder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0f891e091cc46775226ee1fe28784876395a7b92 Author: Martin Sustrik Date: Tue Mar 9 17:24:42 2010 +0100 message flags from the wire are written to zmq_msg_t and vice versa src/zmq_decoder.cpp | 4 ++-- src/zmq_encoder.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 531c6af0d4df606ddef15da821dad20399b9480a Author: Martin Sustrik Date: Tue Mar 9 16:56:53 2010 +0100 message flags added to zmq_msg_t strcuture bindings/c/zmq.h | 14 +++++++++----- src/pipe.cpp | 2 +- src/pub.cpp | 4 ++-- src/zmq.cpp | 14 ++++++++------ 4 files changed, 20 insertions(+), 14 deletions(-) commit 96ccc1c5fceb56bd7ffc2e6bef9ddab5347d722b Author: Martin Sustrik Date: Tue Mar 9 15:10:44 2010 +0100 'flags' fields added to the wire format src/zmq_decoder.cpp | 40 +++++++++++++++++++++++++++++----------- src/zmq_decoder.hpp | 1 + src/zmq_encoder.cpp | 11 ++++++++--- src/zmq_encoder.hpp | 2 +- 4 files changed, 39 insertions(+), 15 deletions(-) commit e04e2cdbbaf351eb04164bdcd293fcb8fa22a9a4 Author: Martin Sustrik Date: Tue Mar 9 08:43:20 2010 +0100 rollback functionality added to pipe src/pipe.cpp | 13 +++++++++++++ src/pipe.hpp | 3 +++ src/ypipe.hpp | 11 +++++++++++ src/yqueue.hpp | 37 ++++++++++++++++++++++++++++++++++++- 4 files changed, 63 insertions(+), 1 deletion(-) commit 9481c69b0f60068f12aa26699588fed6a8faceec Author: Martin Sustrik Date: Sat Mar 6 16:32:19 2010 +0100 problem with NIC name resolution on OSX fixed src/ip.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 26b0aea24f9add0a1811e23f709d96b44b459571 Author: Martin Lucina Date: Wed Mar 3 17:01:08 2010 +0100 Win32 build fixes configure.in | 8 ++++---- src/Makefile.am | 4 ++++ src/ip.hpp | 10 +++++----- src/uuid.hpp | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) commit 352da8ae8775f057a7ec67a7bd3f2270ac1c4d0f Author: unknown Date: Wed Mar 3 15:47:21 2010 +0100 type mismatch in tcp_listener (win version) fixed src/tcp_listener.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14054ecce7d367d8e3d47f84f72d2fc748aec8e4 Author: Martin Hurton Date: Wed Mar 3 09:41:57 2010 +0100 Fix typo: zmq_close -> zmq_msg_close src/rep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 708298d798693a19ace9a4811a3760d8de0a5c1d Author: Martin Hurton Date: Wed Mar 3 00:08:11 2010 +0100 Fix possible lockups when reading from ZMQ_REP sockets src/rep.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 157a66fc42d46c79edc01f6feed8f482fb5d53f1 Author: unknown Date: Mon Mar 1 18:33:16 2010 +0100 polling on POSIX sockets returns POLLERR (win32) src/zmq.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 4e7158b67dcbbc307e76616a85aa34cc83ad6606 Author: Martin Sustrik Date: Mon Mar 1 17:40:39 2010 +0100 return POLLERR from polling on POSIX sockets (linux version) src/zmq.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 7442f53956e5d32d9c6a3543f8bef1664a773926 Merge: ea0a44c 83f85ea Author: Martin Sustrik Date: Sat Feb 27 14:18:21 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ea0a44c8a964cad4276ec216319d32e95e4a4bc0 Author: Martin Sustrik Date: Sat Feb 27 14:18:02 2010 +0100 Ruby binding removed bindings/Makefile.am | 8 +- bindings/ruby/Makefile.am | 11 -- bindings/ruby/extconf.rb | 28 ----- bindings/ruby/rbzmq.cpp | 288 --------------------------------------------- configure.in | 57 +-------- perf/Makefile.am | 8 +- perf/ruby/Makefile.am | 1 - perf/ruby/local_lat.rb | 41 ------- perf/ruby/local_thr.rb | 61 ---------- perf/ruby/remote_lat.rb | 53 --------- perf/ruby/remote_thr.rb | 45 ------- 11 files changed, 7 insertions(+), 594 deletions(-) commit 83f85ea51dee1fb2fcee22543a90361b860d6cb8 Author: unknown Date: Sat Feb 27 13:49:53 2010 +0100 ruby binding removed from msvc build builds/msvc/msvc.sln | 9 ------ builds/msvc/ruby/ruby.vcproj | 68 ------------------------------------------ 2 files changed, 77 deletions(-) commit 696ada883331359bee76b1ea996d8ac846624bea Author: unknown Date: Sat Feb 27 13:36:52 2010 +0100 python binding removed from nsvc build builds/msvc/msvc.sln | 8 -- builds/msvc/python/python.vcproj | 176 -------------------------------------- 2 files changed, 184 deletions(-) commit 45414b5444db0a1f7e325c7dce92fbe84667d093 Author: Martin Sustrik Date: Sat Feb 27 12:23:22 2010 +0100 python binding removed bindings/Makefile.am | 8 +- bindings/python/Makefile.am | 7 - bindings/python/pyzmq.cpp | 556 ------------------------------------------- bindings/python/setup.py.in | 14 -- configure.in | 65 +---- doc/Makefile.am | 2 +- doc/zmq.txt | 3 - doc/zmq_python.txt | 27 --- perf/Makefile.am | 9 +- perf/python/Makefile.am | 1 - perf/python/local_lat.py | 49 ---- perf/python/local_thr.py | 70 ------ perf/python/remote_lat.py | 61 ----- perf/python/remote_thr.py | 53 ----- 14 files changed, 11 insertions(+), 914 deletions(-) commit efefa069b2ce407a7da4328ab024c47920a76960 Author: Martin Lucina Date: Fri Feb 26 20:03:58 2010 +0100 Cygwin support configure.in | 7 +++++++ src/uuid.cpp | 3 ++- src/uuid.hpp | 6 ++++-- 3 files changed, 13 insertions(+), 3 deletions(-) commit deda7ca54a3c8f1ba735e8654ca87f8808606122 Author: Martin Sustrik Date: Fri Feb 26 17:28:09 2010 +0100 Java Poller patch .gitignore | 3 + bindings/java/Context.cpp | 106 ------------------------------------ bindings/java/Makefile.am | 22 ++++++-- bindings/java/org/zmq/Context.java | 18 ------ 4 files changed, 21 insertions(+), 128 deletions(-) commit 4a1a83887d6faf36cb01f1c69142e6aafafe5eba Author: unknown Date: Fri Feb 26 16:42:52 2010 +0100 Win32 build of Java binding fixed builds/msvc/java/java.vcproj | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) commit 4440b13c359dab2c1ba55e31c604ac093172d68e Author: Martin Sustrik Date: Fri Feb 26 15:55:36 2010 +0100 Poller object implemented in Java binding bindings/java/Poller.cpp | 126 ++++++++++++++++++++++++++++++++++ bindings/java/org/zmq/Poller.java | 135 +++++++++++++++++++++++++++++++++++++ 2 files changed, 261 insertions(+) commit 1c4daf79ce12da75acb8010c99b3c1d509a7a950 Author: Martin Sustrik Date: Fri Feb 26 14:28:20 2010 +0100 MIT license text added COPYING.LESSER | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 57e057c825156b6effd15c07ee302f4ccdd2561c Author: Martin Sustrik Date: Thu Feb 25 16:29:17 2010 +0100 1st version of Java poll added bindings/java/Context.cpp | 140 ++++++++++++++++++++++++++++++------ bindings/java/Socket.cpp | 89 +++++++++-------------- bindings/java/org/zmq/Context.java | 21 +++++- bindings/java/org/zmq/Socket.java | 5 +- 4 files changed, 173 insertions(+), 82 deletions(-) commit ed8fe68383ca94ca33a9919bc2ed5b5a5d62cab0 Author: Martin Sustrik Date: Wed Feb 24 17:27:31 2010 +0100 handle invalid PGM connection string decently src/pgm_socket.cpp | 6 ++++++ 1 file changed, 6 insertions(+) commit be51cfa419bb6c75eb24d241769a7c5543c432a7 Merge: 0b4172b b7f01f9 Author: Martin Sustrik Date: Wed Feb 24 16:19:53 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 0b4172b8689b60ce254c6823d69962bbdbd031d4 Author: Martin Sustrik Date: Wed Feb 24 16:19:14 2010 +0100 minor cast issues on cygwin fixed src/ip.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7f01f9071c26292c30517bac18dae92efaf3ffb Author: unknown Date: Wed Feb 24 15:33:03 2010 +0100 chat example removed from win build; missing fd_signaler_t::poll on win added builds/msvc/msvc.sln | 18 ------------------ src/fd_signaler.cpp | 26 +++++++++++++++++++------- 2 files changed, 19 insertions(+), 25 deletions(-) commit 476ebde6280a428e2dd8fee7c70670aa449831c9 Author: Martin Sustrik Date: Wed Feb 24 13:02:29 2010 +0100 use binary UUIDs instead of string representation to save some bytes src/uuid.cpp | 87 +++++++++++++++++++++++++++++++++++++++++++++++------- src/uuid.hpp | 22 +++++++++++--- src/zmq_init.cpp | 6 ++-- 3 files changed, 98 insertions(+), 17 deletions(-) commit cc5c30f5dc2d6490c0199709ceb2d86e3cc3895d Author: Martin Lucina Date: Wed Feb 24 12:09:24 2010 +0100 Fix: OpenPGM is now distributed as .tar.gz Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bba36e6ee6ecdee5f3ded30b9f11e7684393bfd2 Author: Martin Lucina Date: Wed Feb 24 12:07:24 2010 +0100 Disable IPv6 support The current IPv6 support is half-assed and breaks for too many people. Revert back to IPv4 only for now. src/ip.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 39b89619742cf4aed25a5b3ccc5ff6d23d9d15cf Author: Martin Lucina Date: Wed Feb 24 09:41:10 2010 +0100 Update OpenPGM to 2.0.24 (stable) .gitignore | 1 + configure.in | 16 ++++++++-------- foreign/openpgm/libpgm-2.0.23rc8.tar.bz2 | Bin 321822 -> 0 bytes foreign/openpgm/libpgm-2.0.24.tar.gz | Bin 0 -> 407110 bytes 4 files changed, 9 insertions(+), 8 deletions(-) commit ccd47f1ee8c9268b99478c6cce3d8b1aada62566 Author: Martin Sustrik Date: Wed Feb 24 09:17:05 2010 +0100 chat example moved to separate repo Makefile.am | 4 +-- configure.in | 13 +-------- examples/Makefile.am | 7 ----- examples/chat/Makefile.am | 11 -------- examples/chat/README | 42 ---------------------------- examples/chat/display.cpp | 50 --------------------------------- examples/chat/prompt.cpp | 67 --------------------------------------------- 7 files changed, 3 insertions(+), 191 deletions(-) commit 8980a985828579d03f031b18a1bebcd65eded417 Author: Martin Sustrik Date: Wed Feb 24 08:29:29 2010 +0100 zmq_error used from ruby binding bindings/ruby/rbzmq.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit 551fa104ffdb8c417b7d75ce70c463992e7d4652 Author: Martin Sustrik Date: Tue Feb 23 23:43:31 2010 +0100 zmq_errno used in C++ binding bindings/cpp/zmq.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 95329719cda2b941e422d06daad3a7ba4c4a8829 Author: Martin Sustrik Date: Tue Feb 23 23:37:05 2010 +0100 zmq_errno is exported from the DLL bindings/c/zmq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2441ef11a22170499d7ae12865dc98a61230f7ed Author: Martin Sustrik Date: Tue Feb 23 23:28:25 2010 +0100 zmq_errno helper function added bindings/c/zmq.h | 10 ++++++++++ src/zmq.cpp | 5 +++++ 2 files changed, 15 insertions(+) commit 2dd55605ea3956413cb25cab705ffdbdb2e00da5 Author: Martin Sustrik Date: Tue Feb 23 22:13:56 2010 +0100 recv fails after polling for IN on REQ socket src/req.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 025c9e173c58971993858ea66fb2eeaf08de195d Author: Martin Sustrik Date: Tue Feb 23 17:22:52 2010 +0100 execution disabled on certain source files; some comments on java binding; MSVC temp files added to .gitignore .gitignore | 9 +++++++++ bindings/java/org/zmq/Context.java | 2 ++ bindings/java/org/zmq/Socket.java | 2 ++ 3 files changed, 13 insertions(+) commit 71b4947f951f0120e4aadccb42f2452bb95dba06 Author: unknown Date: Tue Feb 23 12:02:55 2010 +0100 Win32 build fixed builds/msvc/libzmq/libzmq.vcproj | 4 ++++ 1 file changed, 4 insertions(+) commit 7c0df6ee02eb792c6afea7f047539840addb2f02 Author: Martin Sustrik Date: Tue Feb 23 11:52:33 2010 +0100 Java binding beautified, inline documentation added AUTHORS | 1 + bindings/java/Context.cpp | 106 ++++++++++++------- bindings/java/Socket.cpp | 197 +++++++++++++++++++++++++++--------- bindings/java/org/zmq/Context.java | 17 ++-- bindings/java/org/zmq/Socket.java | 59 +++++++---- 5 files changed, 267 insertions(+), 113 deletions(-) commit ef1b5974891a30b15299464859023a531c2328f8 Author: Martin Sustrik Date: Tue Feb 23 10:01:54 2010 +0100 minor fix in zmq_socket(3) man page doc/zmq_socket.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9a612ff3f74a3add607b054213d0f52e85cc426 Merge: f249555 61f0ef5 Author: Martin Sustrik Date: Mon Feb 22 18:19:51 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit f24955519ac0d3b0da5dd87fbb7bfc8cc1e24295 Author: Martin Sustrik Date: Mon Feb 22 18:19:26 2010 +0100 zmq_poll doesn't exit when infinite timeout is set and interrupt occurs src/zmq.cpp | 56 +++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 17 deletions(-) commit 61f0ef569b2f879b6b4e1f247253ceec08e774c7 Author: Martin Lucina Date: Mon Feb 22 18:16:40 2010 +0100 NetBSD: Check for and use atomic_ops(3) if available configure.in | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit 3a69cca386a895313729f418ee44443794feed0f Author: Martin Lucina Date: Mon Feb 22 16:42:13 2010 +0100 Fix $build_doc/$install_man check yet again configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1294c1d33a1c73218eb94bf18ceb9ae873d08891 Author: Martin Sustrik Date: Sun Feb 21 16:58:53 2010 +0100 typo in zmq_ipc(7) fixed doc/zmq_ipc.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff99d753ae30a7b5fef730fdcf1643e2928d9993 Author: malosek Date: Sat Feb 20 21:03:12 2010 +0100 Minor buid system tunning autogen.sh | 8 ++++++++ configure.in | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) commit 740e531fbb47ad324737c075251c674e9dced6f1 Author: Martin Sustrik Date: Sat Feb 20 09:11:30 2010 +0100 Aleksey Yeschenko added to the credit section of AUTHORS file AUTHORS | 1 + 1 file changed, 1 insertion(+) commit 57148b1fdeec0080b77ecfa837add9557226261c Author: Martin Lucina Date: Fri Feb 19 18:23:54 2010 +0100 Add missing check for install_man=yes Fixes git builds w/o asciidoc, bug introduced in 46824abe configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b86dcf81cc7b80267f334f4f26dfd319532ad25 Author: Martin Sustrik Date: Fri Feb 19 17:50:47 2010 +0100 build on cygwin enabled AUTHORS | 1 + configure.in | 3 +++ src/poller.hpp | 2 ++ 3 files changed, 6 insertions(+) commit 727054547f32680f7db098497c2d7b1a0b20e2d8 Author: Martin Sustrik Date: Fri Feb 19 17:02:07 2010 +0100 don't check for identity, if the connection is anonymous src/session.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit aff1f6621ae13083c7f15f7f1f808560254a2dcb Merge: 75f571c 2a79a94 Author: Martin Sustrik Date: Fri Feb 19 15:25:05 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 75f571c8844231f4172f131e1dd6ba2348eb54e5 Author: Martin Sustrik Date: Fri Feb 19 15:24:43 2010 +0100 Multi-hop REQ/REP, part XII., generate unique identities for anonymous connections doc/zmq_setsockopt.txt | 10 ++++++---- src/options.cpp | 9 +++++++++ src/session.cpp | 6 +++--- src/uuid.hpp | 6 +++--- src/zmq_encoder.cpp | 1 - src/zmq_engine.cpp | 4 +++- src/zmq_init.cpp | 40 ++++++++++++++++++++-------------------- 7 files changed, 44 insertions(+), 32 deletions(-) commit 2a79a943de417679c562cd4a917e1d1bc19b0d25 Author: Martin Lucina Date: Thu Feb 18 19:38:15 2010 +0100 Add NetBSD support configure.in | 13 +++++++++++++ src/atomic_bitmap.hpp | 16 ++++++++-------- src/atomic_counter.hpp | 14 +++++++------- src/atomic_ptr.hpp | 14 +++++++------- src/ip.cpp | 11 ++--------- src/ip.hpp | 10 ++++++++++ src/kqueue.cpp | 17 ++++++++++++++--- src/kqueue.hpp | 3 ++- src/poll.cpp | 3 ++- src/poll.hpp | 3 ++- src/poller.hpp | 2 ++ src/tcp_listener.cpp | 2 +- src/uuid.cpp | 2 +- src/uuid.hpp | 4 ++-- src/zmq.cpp | 6 ++++-- 15 files changed, 77 insertions(+), 43 deletions(-) commit 776b12633981fd95050e138daeeba00a65d9532b Author: Martin Lucina Date: Thu Feb 18 19:27:35 2010 +0100 Fix typo configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab27f84b14a317d78a9dd145ef5c82e0ef88f583 Author: Martin Lucina Date: Thu Feb 18 19:27:15 2010 +0100 libstdc++ depends on libm on some platforms configure.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 495f0d105f809a265c34aa9a0eb20af0dcdcf283 Author: Martin Lucina Date: Thu Feb 18 17:29:14 2010 +0100 Fix detection of libstdc++ We only care about libstdc++ when using GNU C++. Further, libstdc++ depends on libm on some platforms, fix this. configure.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 46824abeb2b016c51f406401d965816f71189aed Author: Martin Lucina Date: Thu Feb 18 17:25:49 2010 +0100 Never build docs from tarball releases This fixes the build_doc logic to work as advertised and never try to (re)build documentation when working with a tarball release. configure.in | 14 +++++++++++--- doc/Makefile.am | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) commit 8be491b7bdb8525eb37cebf355697c566a482e2d Author: Martin Lucina Date: Thu Feb 18 13:46:00 2010 +0100 Use feature test macros more conservatively It turns out that feature test macros are a complete mess, and defining _GNU_SOURCE and _POSIX_C_SOURCE together breaks some systems. So we try and define the appropriate "make everything visible" combination specific to each system instead. This may still break something, so people should test their platforms and speak up if so. configure.in | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit d008637bc42da3fca50e423c2df0736be2745ac7 Author: Martin Sustrik Date: Wed Feb 17 21:16:59 2010 +0100 one more attempt to fix the previous win32 problem src/socket_base.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit f97da5e6449b183ad3ebb9b0ba8c37ff3dc17387 Merge: e385319 41354bf Author: Martin Sustrik Date: Wed Feb 17 20:33:46 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit e385319e5aaff6deafddfb216b24f026b461caa6 Author: Martin Sustrik Date: Wed Feb 17 20:33:00 2010 +0100 recv returning -1 while errno=0 fixed src/socket_base.cpp | 2 ++ 1 file changed, 2 insertions(+) commit 41354bfa9820eb4495cf98342177d036df2a7dc7 Author: unknown Date: Wed Feb 17 20:16:19 2010 +0100 zmq_version fixed on Win32 platform builds/msvc/platform.hpp | 5 +++++ 1 file changed, 5 insertions(+) commit f745c96a9bcf930d10fe31de5f7b3e772cccfa83 Author: Martin Lucina Date: Wed Feb 17 15:40:26 2010 +0100 Add POSIX and GNU Feature Test Macros This should fix more exotic POSIX platforms such as HPUX which insist on having _POSIX_C_SOURCE defined to get proper threading behaviour. We also define _GNU_SOURCE so that we get any extensions on systems with glibc, e.g. eventfd. configure.in | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 9d8623b28f09f5a6db94c7d69ae264984ef1fbe3 Author: Martin Sustrik Date: Wed Feb 17 08:30:27 2010 +0100 ZMQII-76: Bug in how replies are handled when the REQ endpoint goes away src/rep.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 33cb20a747a2ca2c7b0487b023cfd6548ffe11e8 Author: Martin Sustrik Date: Tue Feb 16 23:31:17 2010 +0100 ZMQII-77: Put librbzmq symbols into ZMQ module AUTHORS | 1 + bindings/ruby/rbzmq.cpp | 75 ++++++++++++++++++++++++----------------------- perf/ruby/local_lat.rb | 4 +-- perf/ruby/local_thr.rb | 6 ++-- perf/ruby/remote_lat.rb | 4 +-- perf/ruby/remote_thr.rb | 4 +-- 6 files changed, 49 insertions(+), 45 deletions(-) commit 1e7878489dc5d3013b5e5858fe404ab6b4a6947a Author: Martin Sustrik Date: Tue Feb 16 23:02:59 2010 +0100 exconf.rb checks for libzmq.so installation AUTHORS | 1 + bindings/ruby/extconf.rb | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 8214d386c3f10dcc7f034a1159e82aa2d470829f Merge: 4190f64 96b2690 Author: Martin Sustrik Date: Tue Feb 16 22:20:09 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 4190f64d8cfc3950bc456ea7793db72130d05feb Author: Martin Sustrik Date: Tue Feb 16 22:19:33 2010 +0100 Special exception clause added to LGPL license COPYING.LESSER | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 96b2690716a811a4c782de0eccfb9affa398cfe4 Merge: 60ce5cc a2f9899 Author: Martin Lucina Date: Tue Feb 16 19:59:32 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit 60ce5cc82a48d5881cb493a5b6b3afba19bd0863 Author: Martin Lucina Date: Tue Feb 16 19:58:55 2010 +0100 PGM tarball should be removed on 'distclean', not 'clean' Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9caa319e279cd8cd367e0a64308b9e80c4ead3d Author: Martin Sustrik Date: Tue Feb 16 18:30:38 2010 +0100 Multi-hop REQ/REP, part XI., finalise the XREQ/XREP functionality src/downstream.cpp | 2 +- src/downstream.hpp | 3 ++- src/i_endpoint.hpp | 4 +++- src/i_engine.hpp | 9 +++++---- src/p2p.cpp | 2 +- src/p2p.hpp | 3 ++- src/pgm_receiver.cpp | 8 +++++++- src/pgm_receiver.hpp | 3 ++- src/pgm_sender.cpp | 8 +++++++- src/pgm_sender.hpp | 3 ++- src/pub.cpp | 2 +- src/pub.hpp | 3 ++- src/rep.cpp | 2 +- src/rep.hpp | 3 ++- src/req.cpp | 2 +- src/req.hpp | 3 ++- src/session.cpp | 7 ++++++- src/session.hpp | 3 ++- src/socket_base.cpp | 12 ++++++------ src/socket_base.hpp | 5 +++-- src/sub.cpp | 2 +- src/sub.hpp | 3 ++- src/upstream.cpp | 2 +- src/upstream.hpp | 3 ++- src/xrep.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++------ src/xrep.hpp | 10 +++++++++- src/xreq.cpp | 2 +- src/xreq.hpp | 3 ++- src/zmq_decoder.cpp | 48 +++++++++++++++++++++++++++++------------------ src/zmq_encoder.cpp | 15 +++++++++++---- src/zmq_engine.cpp | 8 ++++++-- src/zmq_engine.hpp | 3 ++- src/zmq_init.cpp | 6 +----- 33 files changed, 171 insertions(+), 72 deletions(-) commit 2ddce205350f11dacd8d8550f7d4e6e088c7fbcd Merge: 43620b3 a2f9899 Author: Martin Sustrik Date: Tue Feb 16 18:03:41 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit a2f9899f6a1fad3f9c73fc7599445bdde0b95ec4 Author: Martin Sustrik Date: Tue Feb 16 17:50:36 2010 +0100 missing COPYING file added .gitignore | 1 - COPYING | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_poll.txt | 3 +- 3 files changed, 676 insertions(+), 2 deletions(-) commit afb526f31a82b8697b5f7e73e50b14705a3a74b2 Author: Martin Lucina Date: Tue Feb 16 00:11:38 2010 +0100 Fix 'make dist' to work with no special magic bindings/java/Makefile.am | 13 +++++++------ perf/c/Makefile.am | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) commit 8e9b78af271ae54882abf3010260d1e80ddd70f2 Author: Martin Lucina Date: Mon Feb 15 23:59:35 2010 +0100 Correct path for pgm distclean Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit df0c18ca17aa0dcd0e9f3737666a794b943f0982 Author: Martin Lucina Date: Mon Feb 15 23:54:49 2010 +0100 Missed one instance of pgm2 Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b09eeeb2fac380da1e3455cdf97278850842e1c8 Author: Martin Lucina Date: Mon Feb 15 23:52:08 2010 +0100 Update gitignore .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 80c820d758aa65d71fbf4a24fd59d11de1f72fa5 Author: Martin Lucina Date: Mon Feb 15 23:51:05 2010 +0100 Cleaning up more PGM cruft Makefile.am | 3 +++ configure.in | 65 +++++++++++++++++++--------------------------------- perf/c/Makefile.am | 4 ++-- src/Makefile.am | 12 +++++++--- 4 files changed, 37 insertions(+), 47 deletions(-) commit 635e314643885ce8508ee64632bed7d6228fe8b6 Author: Martin Lucina Date: Mon Feb 15 23:09:57 2010 +0100 Clarify python.h messages configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55800cea8c63ea84bd99e4c660ef1fd17a353e32 Author: Martin Lucina Date: Mon Feb 15 23:02:24 2010 +0100 Fix typo configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5687661ba4a1ecf70e130047dc288cb6cff6f21a Author: Martin Lucina Date: Mon Feb 15 22:58:45 2010 +0100 Cleanup messages from configure.in configure.in | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 48a90cfb347bc983362ce2bc021591d513d6a5ec Author: Martin Lucina Date: Mon Feb 15 22:25:01 2010 +0100 Replace check for sparc with host_cpu configure.in | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit 0ded6c1973596436d7e5c54cfb89ada4d6c7473d Author: Martin Lucina Date: Mon Feb 15 22:17:18 2010 +0100 Multiple fixes to --with-pgm Disallow build --with-pgm on non-x86/AMB64 CPUs Check correctly for all dependencies required by --with-pgm Don't assume tar has -j Reorder --with-pgm checks configure.in | 70 +++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 28 deletions(-) commit 94c74d5c18183b49507d633c7b06713841cfcb03 Author: Martin Sustrik Date: Mon Feb 15 21:04:34 2010 +0100 Brian Granger added to credits list AUTHORS | 1 + 1 file changed, 1 insertion(+) commit f96f53c9687b5a032ef45ce42154a7f944492eec Author: Martin Sustrik Date: Mon Feb 15 21:03:11 2010 +0100 ZMQ_POLLERR placeholder added to zmq.h bindings/c/zmq.h | 1 + 1 file changed, 1 insertion(+) commit 5041b0bc0bce43e5b6d8b6c6264141d33f3c2a7c Author: Martin Sustrik Date: Mon Feb 15 20:35:00 2010 +0100 fixing the previous commit :( src/ip.cpp | 1 - 1 file changed, 1 deletion(-) commit 7778010d76e6da534307ca3f0a3506d3d7f0ec5d Author: Martin Sustrik Date: Mon Feb 15 19:58:47 2010 +0100 care taken of the fact that AI_NUMERICSERV is not defined on OSX 10.5 src/ip.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 817c89a78ea7b773046b010ca129fd1206e1c8f0 Author: malosek Date: Mon Feb 15 19:42:05 2010 +0100 removed first dummy run of PKG_CHECK_EXISTS configure.in | 5 ----- 1 file changed, 5 deletions(-) commit 43620b3d35e3f3a6e49046fdc0426651bf58dedb Author: Martin Sustrik Date: Sun Feb 14 13:34:48 2010 +0100 Multi-hop REQ/REP, part X., optional delayed creation of pipes during connect src/options.cpp | 1 + src/options.hpp | 6 ++++++ src/rep.cpp | 5 +++++ src/session.cpp | 48 +++++++++++++++++++++----------------------- src/socket_base.cpp | 55 ++++++++++++++++++++++++++++++++------------------- src/xrep.cpp | 4 ++++ 6 files changed, 74 insertions(+), 45 deletions(-) commit 4405250d93a2ad6eb3940c4bc4fe8ea32bd52f9e Author: Martin Sustrik Date: Sat Feb 13 15:30:03 2010 +0100 Multi-hop REQ/REP, part IX., pass the peer identity as far as socket_base_t src/command.cpp | 4 ++++ src/command.hpp | 2 ++ src/object.cpp | 28 ++++++++++++++++++++++++---- src/object.hpp | 4 ++-- src/options.cpp | 2 +- src/options.hpp | 5 ++--- src/pgm_socket.cpp | 7 +++++-- src/session.cpp | 2 +- src/socket_base.cpp | 5 +++-- src/socket_base.hpp | 3 ++- 10 files changed, 46 insertions(+), 16 deletions(-) commit f5ce81f2893ec0707c2f4346740878e68b51e13a Author: Martin Sustrik Date: Sat Feb 13 14:07:30 2010 +0100 Multi-hop REQ/REP, part VIII., new blob_t type used for holding identity src/Makefile.am | 1 + src/blob.hpp | 33 +++++++++++++++++++++++++++++++++ src/i_engine.hpp | 5 +++-- src/object.cpp | 19 +++++++++---------- src/object.hpp | 7 ++++--- src/pgm_receiver.cpp | 3 +-- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 3 +-- src/pgm_sender.hpp | 2 +- src/session.cpp | 32 +++++++++++--------------------- src/session.hpp | 13 +++++-------- src/socket_base.cpp | 24 ++++++++++-------------- src/socket_base.hpp | 14 ++++++-------- src/zmq_decoder.cpp | 34 +++++++++++++--------------------- src/zmq_decoder.hpp | 6 +++--- src/zmq_engine.cpp | 5 ++--- src/zmq_engine.hpp | 2 +- src/zmq_init.cpp | 17 ++++++----------- src/zmq_init.hpp | 5 ++--- 19 files changed, 113 insertions(+), 114 deletions(-) commit cdc2efe9b5f0d1f45065b1c32e5eabd7e9f78a12 Author: Martin Sustrik Date: Sat Feb 13 13:07:33 2010 +0100 Multi-hop REQ/REP, part VII., identity-related algorithms rewritten src/session.cpp | 114 +++++++++++++++++++++++++++++++-------------------- src/session.hpp | 10 +---- src/socket_base.cpp | 25 ++++++----- src/socket_base.hpp | 9 ++-- src/zmq_init.cpp | 4 +- 5 files changed, 93 insertions(+), 69 deletions(-) commit 923eacd28a725a6b32de588fe7a54dbe252d84aa Author: Martin Sustrik Date: Sat Feb 13 09:09:40 2010 +0100 Multi-hop REQ/REP, part VI., session 'name' renamed to 'peer_identity' src/session.cpp | 16 ++++++++-------- src/session.hpp | 14 +++++++++----- src/zmq_init.cpp | 7 ++++--- 3 files changed, 21 insertions(+), 16 deletions(-) commit 2e78e48503375a415d95ee8df80df9c065172abc Author: Martin Sustrik Date: Fri Feb 12 20:49:00 2010 +0100 Multi-hop REQ/REP, part V., peer identity is passed from init object to session src/command.cpp | 10 ++++++++++ src/command.hpp | 2 ++ src/object.cpp | 22 ++++++++++++++++++++-- src/object.hpp | 6 ++++-- src/session.cpp | 3 ++- src/session.hpp | 3 ++- src/zmq_init.cpp | 3 ++- 7 files changed, 42 insertions(+), 7 deletions(-) commit d8430f4b9a43bf8c99854298edc9f1bc35c0e8ec Author: Martin Sustrik Date: Fri Feb 12 20:03:02 2010 +0100 Multi-hop REQ/REP, part IV., add command deallocation mechanism src/Makefile.am | 1 + src/command.cpp | 24 ++++++++++++++++++++++++ src/command.hpp | 3 +++ src/dispatcher.cpp | 4 ++++ src/object.cpp | 18 +++++++++++------- 5 files changed, 43 insertions(+), 7 deletions(-) commit 313b5dfadd8753b341197cc109bce40e08856cf6 Author: Martin Sustrik Date: Fri Feb 12 19:42:35 2010 +0100 Multi-hop REQ/REP, part III., change 'type' in options to simple 'traceroute' flag src/downstream.cpp | 1 - src/options.cpp | 4 ++-- src/options.hpp | 6 +++--- src/p2p.cpp | 1 - src/pub.cpp | 1 - src/rep.cpp | 1 - src/req.cpp | 1 - src/sub.cpp | 1 - src/upstream.cpp | 1 - src/xrep.cpp | 5 ++++- src/xreq.cpp | 1 - src/zmq_init.cpp | 2 +- 12 files changed, 10 insertions(+), 15 deletions(-) commit 96e0442332fcc680ddafdcaa8fcbdc6acd992c76 Merge: 36a5763 dc8f4b1 Author: Martin Sustrik Date: Fri Feb 12 15:58:22 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 36a576370ccfed3c104850b5b95a6ed3870edbea Author: Martin Sustrik Date: Fri Feb 12 15:57:54 2010 +0100 Multi-hop REQ/REP, part I., tracerouting switched on on XREP socket src/i_engine.hpp | 8 ++++++++ src/pgm_receiver.cpp | 9 ++++++++- src/pgm_receiver.hpp | 1 + src/pgm_sender.cpp | 9 ++++++++- src/pgm_sender.hpp | 1 + src/zmq_decoder.cpp | 27 +++++++++++++-------------- src/zmq_decoder.hpp | 6 +++++- src/zmq_encoder.cpp | 13 +++++++++---- src/zmq_encoder.hpp | 8 ++++++-- src/zmq_engine.cpp | 11 +++++++++-- src/zmq_engine.hpp | 1 + src/zmq_init.cpp | 6 ++++++ 12 files changed, 75 insertions(+), 25 deletions(-) commit dc8f4b1b761103784b422b7604bc8f36d429d3f4 Author: Martin Hurton Date: Fri Feb 12 15:08:57 2010 +0100 Fix memory leak in bind() src/socket_base.cpp | 4 +++- src/zmq_listener.hpp | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 7b4cf2a4d040057f6f378cac2cd125513a859c1b Author: Martin Sustrik Date: Fri Feb 12 13:33:50 2010 +0100 Multi-hop REQ/REP, part I., socket type is known to all associated objects src/downstream.cpp | 1 + src/options.cpp | 1 + src/options.hpp | 3 +++ src/p2p.cpp | 1 + src/pub.cpp | 1 + src/rep.cpp | 1 + src/req.cpp | 1 + src/sub.cpp | 1 + src/upstream.cpp | 1 + src/xrep.cpp | 1 + src/xreq.cpp | 1 + 11 files changed, 13 insertions(+) commit cd7300fd4f25754f844b17a77685ec837ebecbbb Author: Martin Hurton Date: Fri Feb 12 12:12:49 2010 +0100 Resolve command starvation in recv() src/socket_base.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 7f7ac843d58b3d8a77f681fa4c35bd21726b6f31 Author: Martin Lucina Date: Thu Feb 11 17:51:47 2010 +0100 Next 0MQ release will be 2.0.6 As decided on the mailing list, there have been five 2.x releases to date, so the upcoming release will be numbered 2.0.6. configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de41c9da31246314bb2b0c55dfe3b2884d48df3b Merge: 30b967e 92d0147 Author: Martin Lucina Date: Thu Feb 11 17:51:08 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit 30b967e2a439ce76b1141d34fa3c8ee9f87a88a8 Author: Martin Lucina Date: Thu Feb 11 17:49:40 2010 +0100 Integrate version numbering into autoconf configure.in is now the master source for the package version number, this propagates to src/platform.hpp (for zmq_version) and doc/Makefile.am (for documentation generation) automagically. configure.in | 28 +++++++++++++++++++++++++++- doc/Makefile.am | 6 ++++-- doc/asciidoc.conf | 2 +- src/config.hpp | 5 ----- src/zmq.cpp | 6 +++--- 5 files changed, 35 insertions(+), 12 deletions(-) commit 92d0147b20f77cad5d20e257aec502f628e7889e Author: Martin Sustrik Date: Thu Feb 11 16:50:40 2010 +0100 python binding build with 2.4 version of python fixed bindings/python/pyzmq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 432fbd796bb4905fb19ceee802009b17e88e9256 Author: Martin Sustrik Date: Thu Feb 11 10:43:59 2010 +0100 ZMQII-72: Add zmq_version function (documentation) doc/Makefile.am | 4 ++-- doc/zmq_version.txt | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) commit bd9213e71222df66634d59581264ffe67210222c Author: Martin Sustrik Date: Thu Feb 11 10:29:33 2010 +0100 ZMQII-72: Add zmq_version function bindings/c/zmq.h | 6 ++++++ src/config.hpp | 4 ++++ src/zmq.cpp | 8 ++++++++ 3 files changed, 18 insertions(+) commit 7cab423fc20e46f54fa561e51b566cc8a63ca5c1 Merge: bc9b7f1 354efc5 Author: Martin Hurton Date: Wed Feb 10 17:14:21 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit bc9b7f1f54b9dcf754021f1f7eb766d71cc97f29 Author: Martin Hurton Date: Wed Feb 10 12:48:04 2010 +0100 lb: bugfix - never skip active pipe when sending msg src/lb.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 6b3c1798e7554dd1ce63b2ad137e327f3f32fcf1 Author: Martin Hurton Date: Wed Feb 10 12:47:34 2010 +0100 fq: bugfix - don't read msg from inactive pipe src/fq.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 354efc513fdb4096f8830e6c2e3e8f1311303e61 Author: Martin Lucina Date: Wed Feb 10 16:18:46 2010 +0100 Convert documentation to AsciiDoc .gitignore | 5 ++ Makefile.am | 8 +- configure.in | 19 ++++- doc/Makefile.am | 41 ++++++++++ doc/asciidoc.conf | 34 ++++++++ doc/zmq.txt | 175 ++++++++++++++++++++++++++++++++++++++++++ doc/zmq_bind.txt | 67 ++++++++++++++++ doc/zmq_close.txt | 52 +++++++++++++ doc/zmq_connect.txt | 63 +++++++++++++++ doc/zmq_cpp.txt | 89 +++++++++++++++++++++ doc/zmq_flush.txt | 59 ++++++++++++++ doc/zmq_forwarder.txt | 32 ++++++++ doc/zmq_init.txt | 61 +++++++++++++++ doc/zmq_inproc.txt | 50 ++++++++++++ doc/zmq_ipc.txt | 44 +++++++++++ doc/zmq_java.txt | 27 +++++++ doc/zmq_msg_close.txt | 53 +++++++++++++ doc/zmq_msg_copy.txt | 60 +++++++++++++++ doc/zmq_msg_data.txt | 50 ++++++++++++ doc/zmq_msg_init.txt | 54 +++++++++++++ doc/zmq_msg_init_data.txt | 67 ++++++++++++++++ doc/zmq_msg_init_size.txt | 61 +++++++++++++++ doc/zmq_msg_move.txt | 55 +++++++++++++ doc/zmq_msg_size.txt | 53 +++++++++++++ doc/zmq_pgm.txt | 106 +++++++++++++++++++++++++ doc/zmq_poll.txt | 85 ++++++++++++++++++++ doc/zmq_python.txt | 27 +++++++ doc/zmq_queue.txt | 32 ++++++++ doc/zmq_recv.txt | 66 ++++++++++++++++ doc/zmq_send.txt | 77 +++++++++++++++++++ doc/zmq_setsockopt.txt | 155 +++++++++++++++++++++++++++++++++++++ doc/zmq_socket.txt | 126 ++++++++++++++++++++++++++++++ doc/zmq_streamer.txt | 32 ++++++++ doc/zmq_strerror.txt | 50 ++++++++++++ doc/zmq_tcp.txt | 93 ++++++++++++++++++++++ doc/zmq_term.txt | 49 ++++++++++++ doc/zmq_udp.txt | 56 ++++++++++++++ man/Makefile.am | 22 ------ man/convert2html.sh | 55 ------------- man/convert2pdf.sh | 88 --------------------- man/man1/zmq_forwarder.1 | 11 --- man/man1/zmq_queue.1 | 11 --- man/man1/zmq_streamer.1 | 11 --- man/man3/zmq_bind.3 | 52 ------------- man/man3/zmq_close.3 | 30 -------- man/man3/zmq_connect.3 | 49 ------------ man/man3/zmq_flush.3 | 37 --------- man/man3/zmq_init.3 | 40 ---------- man/man3/zmq_msg_close.3 | 32 -------- man/man3/zmq_msg_copy.3 | 43 ----------- man/man3/zmq_msg_data.3 | 27 ------- man/man3/zmq_msg_init.3 | 33 -------- man/man3/zmq_msg_init_data.3 | 55 ------------- man/man3/zmq_msg_init_size.3 | 44 ----------- man/man3/zmq_msg_move.3 | 38 --------- man/man3/zmq_msg_size.3 | 30 -------- man/man3/zmq_poll.3 | 71 ----------------- man/man3/zmq_recv.3 | 52 ------------- man/man3/zmq_send.3 | 64 --------------- man/man3/zmq_setsockopt.3 | 137 --------------------------------- man/man3/zmq_socket.3 | 110 -------------------------- man/man3/zmq_strerror.3 | 27 ------- man/man3/zmq_term.3 | 25 ------ man/man7/zmq.7 | 151 ------------------------------------ man/man7/zmq_cl.7 | 124 ------------------------------ man/man7/zmq_cpp.7 | 103 ------------------------- man/man7/zmq_inproc.7 | 42 ---------- man/man7/zmq_ipc.7 | 34 -------- man/man7/zmq_java.7 | 9 --- man/man7/zmq_pgm.7 | 98 ----------------------- man/man7/zmq_python.7 | 9 --- man/man7/zmq_tcp.7 | 80 ------------------- man/man7/zmq_udp.7 | 45 ----------- 73 files changed, 2224 insertions(+), 1898 deletions(-) commit 2d44bf3644c8e12aa86c48e9da4df19bfa9ea703 Author: Martin Sustrik Date: Wed Feb 10 11:04:28 2010 +0100 ZMQII-69: Make 0MQ build on HP-UX src/fd_signaler.cpp | 4 ++-- src/tcp_connecter.cpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 8c25bab31d63bf5e2c4eec6d9084cf7d1c1e5dd3 Author: Martin Sustrik Date: Wed Feb 10 10:42:54 2010 +0100 ZMQII-70: zmq_poll on win32 fails with EINVAL src/zmq.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 8f86cac2f6721eec4b600383eb113f7fedf41ce1 Author: Martin Sustrik Date: Tue Feb 9 19:23:15 2010 +0100 ZMQII-69: Make 0MQ build on HP-UX src/fd_signaler.cpp | 78 +++++++++++++++++++++++++++++++++++++++++++++++++ src/ip.cpp | 4 +-- src/tcp_connecter.hpp | 9 +++++- 3 files changed, 87 insertions(+), 4 deletions(-) commit fd673ae231119682a242967551cfa034fa32791a Author: Martin Sustrik Date: Tue Feb 9 15:21:26 2010 +0100 couple of typos in the documentation fixed examples/chat/README | 2 +- man/man3/zmq_term.3 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6b2ca4e158c3394f5aba8f0f01ff1734423683f9 Author: Martin Sustrik Date: Tue Feb 9 15:15:44 2010 +0100 ZMQII-67: Build checks for python even if it's not needed configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c870ede7fdecaf1f952b01096e09cc03a7c7aef Author: Martin Sustrik Date: Tue Feb 9 09:08:37 2010 +0100 ZMQII-57: Shutdown OpenPGM library src/pgm_socket.cpp | 31 +------------------------------ src/zmq.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 31 deletions(-) commit 396e41a2a4b31f91ef4c4458d53be9e3a9b4bb92 Author: Martin Sustrik Date: Mon Feb 8 18:55:51 2010 +0100 minor change to README README | 2 -- 1 file changed, 2 deletions(-) commit 01533a5aefb49e23be95cab9cfa5ca32cd438d25 Author: Martin Sustrik Date: Mon Feb 8 18:37:48 2010 +0100 ZMQII-65: Two OS threads are mapped to the same app_thread_t src/app_thread.cpp | 23 +++------------ src/app_thread.hpp | 19 ------------- src/dispatcher.cpp | 79 +++++++++++++++++++++++++++++++++------------------- src/dispatcher.hpp | 29 ++++++++++++++----- 4 files changed, 76 insertions(+), 74 deletions(-) commit 7593d815ac57f2877480c5056b2f1aa65460f5c3 Author: Martin Sustrik Date: Mon Feb 8 10:34:12 2010 +0100 ZMQII-64: First message stuck in 0MQ in case of immediate disconnection src/zmq_engine.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 427bc3276aa236c8691fee7e634717d0579a3055 Author: Martin Sustrik Date: Sun Feb 7 16:24:14 2010 +0100 minor code cleanup src/socket_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0ee6b0c8ab8a5052a5e111dda24308dd00c0d62 Author: Martin Sustrik Date: Sun Feb 7 11:31:05 2010 +0100 ZMQII-62: zmq_close after sending message via P2P socket fails src/p2p.cpp | 5 +++++ 1 file changed, 5 insertions(+) commit bbaa494fb569d94c356ddecca7dbf249ffc217cf Author: Martin Sustrik Date: Sun Feb 7 09:14:43 2010 +0100 ZMQII-59: TCP server crashes sometimes when message is send and socket is closed immediately src/dispatcher.cpp | 23 +++++++++++++++++++++++ src/dispatcher.hpp | 16 ++-------------- src/object.cpp | 12 +++++------- 3 files changed, 30 insertions(+), 21 deletions(-) commit d21bf21a362cf6d20d8d060bb91ee2fdca1dd88b Author: Martin Sustrik Date: Fri Feb 5 13:00:49 2010 +0100 allow async connect on Win32 return WSAECONNABORTED src/tcp_connecter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0888fcd06f1c66ec3dfab744bfc24d1486737c7e Author: Martin Sustrik Date: Thu Feb 4 23:58:41 2010 +0100 yqueue_t uses malloc/free instead of new/delete src/yqueue.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 30076c4f7a5b0c70ef0c5a6574cac531bc996f5e Author: Martin Sustrik Date: Thu Feb 4 17:46:47 2010 +0100 ZMQII-58: TCP connecting asserts on Win32 (same fix for POSIX) src/tcp_connecter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c46b7ed1978ead346022577ff015b092f3257c84 Author: unknown Date: Thu Feb 4 17:40:04 2010 +0100 ZMQII-58: TCP connecting asserts on Win32 src/tcp_connecter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b86483acbe109566f4e0fb43266fdd98e7648d55 Author: Martin Sustrik Date: Thu Feb 4 14:50:59 2010 +0100 ZMQII-50: Document Ruby Bindings man/Makefile.am | 2 +- man/convert2html.sh | 1 - man/convert2pdf.sh | 2 -- man/man7/zmq_ruby.7 | 9 --------- 4 files changed, 1 insertion(+), 13 deletions(-) commit bc90231227a84f4b7dffe432a8efa70b75c19031 Author: Martin Sustrik Date: Thu Feb 4 09:39:57 2010 +0100 contrain interface name resolving in OpenPGM to IPv4 interfaces src/pgm_socket.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0f697fe2b460dfbec7481f6d535b95f6b4cc2eac Author: Martin Sustrik Date: Wed Feb 3 20:04:44 2010 +0100 ZMQII-56: Avoid allocation of chunk in yqueue.hpp by keeping a spare one AUTHORS | 1 + src/yqueue.hpp | 31 ++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) commit 72bbc92b70a67fab1dbba6fbd53f574944bdd8e4 Merge: 6502c16 4172fdd Author: Martin Lucina Date: Wed Feb 3 15:54:39 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit 6502c16a7fd878e61f0672a47e2cdb4d56ab0eb2 Author: Martin Lucina Date: Wed Feb 3 15:52:11 2010 +0100 Update OpenPGM to 2.0.23rc8 configure.in | 10 +++++----- foreign/openpgm/libpgm-2.0.21rc6.tar.bz2 | Bin 323697 -> 0 bytes foreign/openpgm/libpgm-2.0.23rc8.tar.bz2 | Bin 0 -> 321822 bytes src/Makefile.am | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) commit 4172fdd6970d4b42443442bf6633f9a9bd4c6f2b Author: unknown Date: Wed Feb 3 14:55:46 2010 +0100 Win32 build fixed builds/msvc/libzmq/libzmq.vcproj | 8 +++++ builds/msvc/msvc.sln | 9 +++++ builds/msvc/ruby/ruby.vcproj | 68 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) commit 7c25feb51bdbc9563cc65ff4829f761ef7231483 Author: Martin Sustrik Date: Wed Feb 3 13:06:34 2010 +0100 ZMQII-55: At most one PGM/UDP transport can be opened src/pgm_socket.cpp | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) commit 9cee8f9c3e22f1e880988271ab1c31c92827efde Author: Martin Sustrik Date: Tue Feb 2 15:11:25 2010 +0100 problem with PGM messages larger than 1 MTU fixed src/pgm_receiver.cpp | 104 ++++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 50 deletions(-) commit 27e47bdcc0358b84a57378e19359556e2dbcb50e Author: Martin Sustrik Date: Tue Feb 2 13:29:31 2010 +0100 ZMQII-54: Affinity isn't honoured src/dispatcher.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 5d16070ffcd426e81ea27520f6847d68e5e5af80 Author: Martin Sustrik Date: Tue Feb 2 08:46:35 2010 +0100 ZMQII-53: Memory leak when using invalid socket type src/dispatcher.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a1e70f29575994798df1d57314193782f6d9cdcb Author: Martin Sustrik Date: Tue Feb 2 08:27:38 2010 +0100 ZMQII-52: Asserion during reconnection src/zmq_init.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 528610ff55ef283b99cbcda007200a6b4092be59 Author: Martin Sustrik Date: Tue Feb 2 08:14:23 2010 +0100 typo in zmq_socket(3) man page fixed man/man3/zmq_socket.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00b9a5dedeb47efd78aea59b579a4b5befba743a Author: Martin Sustrik Date: Sun Jan 31 20:14:30 2010 +0100 ZMQII-51: Implement O(1) topic matching src/Makefile.am | 2 + src/prefix_tree.cpp | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/prefix_tree.hpp | 55 ++++++++++++++++ src/sub.cpp | 44 ++----------- src/sub.hpp | 13 ++-- 5 files changed, 242 insertions(+), 47 deletions(-) commit 70ea8e9d4b88a1ecb1c076eccc2e9bd872c2230c Author: Martin Sustrik Date: Sat Jan 30 13:40:50 2010 +0100 ZMQII-48: Implement P2P socket type src/p2p.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++++------------ src/p2p.hpp | 5 +++++ 2 files changed, 49 insertions(+), 12 deletions(-) commit eb47c1b064ec2f433d3889b7fd4a297a965166bb Merge: 2784f90 4d5e643 Author: Martin Sustrik Date: Fri Jan 29 08:39:36 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 2784f90d595a253e071244d440f78e667f6a957c Author: Martin Sustrik Date: Fri Jan 29 08:39:19 2010 +0100 moving debian directory to the root of the project debian/README.Debian | 6 ++ debian/changelog | 6 ++ debian/cl-zeromq.files | 7 ++ debian/cl-zeromq.install | 6 ++ debian/cl-zeromq.links | 1 + debian/compat | 1 + debian/control | 161 ++++++++++++++++++++++++++++++ debian/copyright | 18 ++++ debian/dirs | 5 + debian/docs | 2 + debian/libzeromq-dev.files | 37 +++++++ debian/libzeromq-dev.install | 19 ++++ debian/libzeromq-python.files | 1 + debian/libzeromq-python.install | 1 + debian/libzeromq-ruby.files | 1 + debian/libzeromq-ruby.install | 1 + debian/libzeromq0.files | 2 + debian/libzeromq0.install | 1 + debian/rules | 136 +++++++++++++++++++++++++ debian/shlibs.local | 1 + debian/zeromq-examples.files | 2 + debian/zeromq-examples.install | 2 + debian/zeromq-perf.files | 10 ++ debian/zeromq-perf.install | 10 ++ debian/zeromq-utils.files | 6 ++ debian/zeromq-utils.install | 6 ++ packages/debian/README.Debian | 6 -- packages/debian/changelog | 6 -- packages/debian/cl-zeromq.files | 7 -- packages/debian/cl-zeromq.install | 6 -- packages/debian/cl-zeromq.links | 1 - packages/debian/compat | 1 - packages/debian/control | 161 ------------------------------ packages/debian/copyright | 18 ---- packages/debian/dirs | 5 - packages/debian/docs | 2 - packages/debian/libzeromq-dev.files | 37 ------- packages/debian/libzeromq-dev.install | 19 ---- packages/debian/libzeromq-python.files | 1 - packages/debian/libzeromq-python.install | 1 - packages/debian/libzeromq-ruby.files | 1 - packages/debian/libzeromq-ruby.install | 1 - packages/debian/libzeromq0.files | 2 - packages/debian/libzeromq0.install | 1 - packages/debian/rules | 136 ------------------------- packages/debian/shlibs.local | 1 - packages/debian/zeromq-examples.files | 2 - packages/debian/zeromq-examples.install | 2 - packages/debian/zeromq-perf.files | 10 -- packages/debian/zeromq-perf.install | 10 -- packages/debian/zeromq-utils.files | 6 -- packages/debian/zeromq-utils.install | 6 -- 52 files changed, 449 insertions(+), 449 deletions(-) commit 4d5e643299e22b53120173319490957b98c0199e Author: malosek Date: Thu Jan 28 19:19:25 2010 +0100 patching libtool script moved at the end of configure configure.in | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 849095a042b8326f5789baa04d1dbb7ca36d4632 Merge: f17f0fa e5ff617 Author: Martin Sustrik Date: Thu Jan 28 12:45:37 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit f17f0fa67bc5a373f3fc7964aaad4f08aa1dc761 Author: Martin Sustrik Date: Thu Jan 28 12:45:12 2010 +0100 CL binding ripped out of the tree .gitignore | 3 + bindings/Makefile.am | 8 +- bindings/cl/Makefile.am | 9 -- bindings/cl/meta.lisp | 59 ---------- bindings/cl/package.lisp | 108 ------------------- bindings/cl/zeromq-api.lisp | 180 ------------------------------- bindings/cl/zeromq.asd | 38 ------- bindings/cl/zeromq.lisp | 250 ------------------------------------------- configure.in | 21 ---- perf/Makefile.am | 2 +- perf/cl/Makefile.am | 2 - perf/cl/lat-parms.lisp | 22 ---- perf/cl/local-lat-poll.lisp | 43 -------- perf/cl/local-lat.lisp | 52 --------- perf/cl/local-thr.lisp | 54 ---------- perf/cl/remote-lat.lisp | 50 --------- perf/cl/remote-thr.lisp | 41 ------- perf/cl/thr-parms.lisp | 25 ----- 18 files changed, 6 insertions(+), 961 deletions(-) commit e5ff617c4e061d29c9a019efa2292fd09c87a71e Author: malosek Date: Wed Jan 27 20:58:40 2010 +0100 fixed OpenPGM compilation on mingw32 src/windows.hpp | 4 ++++ 1 file changed, 4 insertions(+) commit 8f57ff4634ae44cd998bc0b864a8987f241e2fce Author: malosek Date: Wed Jan 27 20:45:43 2010 +0100 fixed OpenPGM compilation on mingw32 perf/c/Makefile.am | 1 + src/Makefile.am | 1 + 2 files changed, 2 insertions(+) commit 2056c888d2567ab96c3539fd60bfb652e19df335 Author: malosek Date: Wed Jan 27 18:29:45 2010 +0100 changed version of the master branch back to dev configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b97e7a4f23f7add763ac6e0fc945c9a342a7d32 Author: malosek Date: Wed Jan 27 11:30:22 2010 +0100 libpgm updated to 2.6.21rc6 configure.in | 12 ++++++------ foreign/openpgm/libpgm-2.0.20rc5.tar.bz2 | Bin 316958 -> 0 bytes foreign/openpgm/libpgm-2.0.21rc6.tar.bz2 | Bin 0 -> 323697 bytes perf/c/Makefile.am | 6 ++++++ src/Makefile.am | 13 +++++++++++-- src/pgm_socket.cpp | 25 +++++++++++++++++++------ 6 files changed, 42 insertions(+), 14 deletions(-) commit 943125bd12dbf181f4dfce7babddf1af7bcb7e18 Author: Martin Sustrik Date: Wed Jan 27 08:47:01 2010 +0100 Hard-wired constant on OpenVMS replaced by symbolic constant src/fd_signaler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa27034db5d47f4630f464da53f63a0e62c34daa Author: unknown Date: Sun Jan 24 08:38:18 2010 +0100 IPv6 patch - part V. (win32) src/ip.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit adc5d7693d9279134c0494210b9d2b885e95d950 Author: Martin Sustrik Date: Sun Jan 24 08:19:02 2010 +0100 IPv6 patch - part IV. src/ip.cpp | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) commit fca9a2159a1fb963901d11dc6f734a622baa92d6 Merge: 079d327 454f43a Author: Martin Sustrik Date: Sat Jan 23 11:14:53 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 079d327670d9137d93f4dbe9eb6cfa6d4165b903 Author: Martin Sustrik Date: Sat Jan 23 11:14:30 2010 +0100 IPv6 patch - part III. src/ip.cpp | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) commit 454f43a45b2d453b53984387e8a8a50cad568f41 Author: unknown Date: Sat Jan 23 09:08:31 2010 +0100 IP address resolving on Win32 fixed src/ip.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit df4548aa76617314cb1a47e6d408cc663640cd70 Merge: 2634934 d762e1a Author: Martin Sustrik Date: Sat Jan 23 08:20:01 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 2634934999408124837afceaf577b75ed58116d7 Author: Martin Sustrik Date: Sat Jan 23 08:19:30 2010 +0100 IPv6 patch part 2/2 src/ip.cpp | 26 +++++++++++++++++++------- src/ip.hpp | 11 +++++++---- src/tcp_connecter.cpp | 17 ++++++++++------- src/tcp_connecter.hpp | 1 + src/tcp_listener.cpp | 11 ++++++----- src/tcp_listener.hpp | 1 + 6 files changed, 44 insertions(+), 23 deletions(-) commit 6aaf095dd259dc42d78cc7bd8c5a7f867eb23166 Author: Martin Sustrik Date: Fri Jan 22 16:32:48 2010 +0100 IPv6 support -part II. src/ip.cpp | 158 +++++++++++++++++++++++------------------------------------- 1 file changed, 60 insertions(+), 98 deletions(-) commit d762e1a9c976680dde2d2f38dac9f5861bd82dad Author: unknown Date: Fri Jan 22 13:29:46 2010 +0100 Win32 build fixed bindings/cpp/zmq.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 34d65e22c557671c74d6c51026b2434912966319 Author: Martin Sustrik Date: Fri Jan 22 13:13:52 2010 +0100 Tero Marttila's Ipv6 patch - part I. src/fd_signaler.cpp | 1 - src/ip.cpp | 24 ++++++++++++++---------- src/ip.hpp | 6 +++--- src/tcp_connecter.cpp | 17 +++++++++-------- src/tcp_connecter.hpp | 2 +- src/tcp_listener.cpp | 16 ++++++++-------- 6 files changed, 35 insertions(+), 31 deletions(-) commit 6edec4fe93c60693a5faee7e4e8821eac4f43d4d Author: Martin Sustrik Date: Fri Jan 22 11:38:17 2010 +0100 zmq_udp(7) man page fixed man/man7/zmq_udp.7 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 70601c243fa7e91f5cceaa80190d7b413940020b Author: Martin Sustrik Date: Fri Jan 22 11:21:28 2010 +0100 zmq_pgm(7) man page fixed man/man7/zmq_pgm.7 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d1e09578b275aca93c50cde078322a0348342c60 Author: unknown Date: Fri Jan 22 07:54:16 2010 +0100 Hardcoded loopback address removed from fd_signaler AUTHORS | 1 + src/fd_signaler.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit f4832faf29df6470bf59f1f1866c07fa4278a75b Author: Martin Sustrik Date: Thu Jan 21 16:30:42 2010 +0100 small fix to man pages to comply with lintian man/Makefile.am | 2 +- man/convert2html.sh | 1 + man/convert2pdf.sh | 2 ++ man/man7/zmq_cl.7 | 2 +- man/man7/zmq_cpp.7 | 2 +- man/man7/zmq_inproc.7 | 2 +- man/man7/zmq_ipc.7 | 2 +- man/man7/zmq_java.7 | 9 +++++++++ man/man7/zmq_pgm.7 | 2 +- man/man7/zmq_python.7 | 2 +- man/man7/zmq_ruby.7 | 2 +- man/man7/zmq_tcp.7 | 2 +- man/man7/zmq_udp.7 | 2 +- 13 files changed, 22 insertions(+), 10 deletions(-) commit b1b66df37c0b05ba05d9636234bad0cc02a1bd03 Author: Martin Sustrik Date: Thu Jan 21 12:07:42 2010 +0100 PGM man page improved man/man7/zmq_pgm.7 | 8 ++++++++ 1 file changed, 8 insertions(+) commit 66ef22993f22a0d47703c1203f57d95c4316bc70 Author: Martin Sustrik Date: Thu Jan 21 10:38:40 2010 +0100 zmq_close man page improved man/man3/zmq_close.3 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a008af6088ef1ad3baf1b9e6ae699cc07367efa3 Author: Martin Sustrik Date: Thu Jan 21 10:01:05 2010 +0100 Asko Kauppi added to the list of authors AUTHORS | 1 + 1 file changed, 1 insertion(+) commit f0757c003eb232247a460631276b40e4fc02f3c9 Author: Martin Sustrik Date: Thu Jan 21 09:58:49 2010 +0100 ZMQII-43: Race condition when writing to pipe src/session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a46ca75e5970733cfe135ecf77074b69fdda34f Author: Martin Sustrik Date: Wed Jan 20 09:22:41 2010 +0100 ZMQ-42: Building with ICC fails src/tcp_connecter.cpp | 1 + 1 file changed, 1 insertion(+) commit 111f0ff078372e8a0f5c0b98170d451d6561e85e Author: Martin Sustrik Date: Wed Jan 20 09:19:03 2010 +0100 ZMQII-41: Poll function in C++ binding doesn't convert errors to exceptions bindings/cpp/zmq.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6b0457fcaad3fa9a2e632b3799119c40da8dd6ca Author: Martin Sustrik Date: Tue Jan 19 12:48:38 2010 +0100 minor documentation patch man/man3/zmq_setsockopt.3 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7094edd6baf0d69c3879da7f16c7222388952931 Author: Martin Sustrik Date: Mon Jan 18 15:57:33 2010 +0100 error handling in C perf tests improved perf/c/local_lat.c | 51 ++++++++++++++++++++++++++++++++---------- perf/c/local_thr.c | 61 ++++++++++++++++++++++++++++++++++++++++----------- perf/c/remote_lat.c | 51 ++++++++++++++++++++++++++++++++---------- perf/c/remote_thr.c | 41 ++++++++++++++++++++++++++-------- 4 files changed, 160 insertions(+), 44 deletions(-) commit 4ceb83935062bb84fd5da702679a126d12aed8be Author: Martin Sustrik Date: Mon Jan 18 13:16:14 2010 +0100 typos in man pages fixed .gitignore | 13 +++++++++++++ man/man3/zmq_bind.3 | 2 +- man/man3/zmq_connect.3 | 2 +- man/man3/zmq_recv.3 | 2 +- man/man3/zmq_send.3 | 2 +- man/man3/zmq_socket.3 | 8 ++++---- man/man7/zmq.7 | 4 ++-- man/man7/zmq_cpp.7 | 2 +- man/man7/zmq_inproc.7 | 2 +- man/man7/zmq_ipc.7 | 8 ++++---- man/man7/zmq_pgm.7 | 10 +++++----- man/man7/zmq_tcp.7 | 4 ++-- man/man7/zmq_udp.7 | 12 ++++++------ 13 files changed, 42 insertions(+), 29 deletions(-) commit bddff50271b7c4c15c34d7a0aa1c04f3e3e3c107 Author: Martin Sustrik Date: Mon Jan 18 11:01:41 2010 +0100 ZMQII-40: wrong return code from recolve_ip_interface src/ip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55944729ed5527692b1ead17af553aa32c316781 Author: Martin Sustrik Date: Mon Jan 18 10:53:46 2010 +0100 ChangeLog modified for 2.0-beta2 version ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f40e3a6931fb6463c349ef765d99515edc569fd7 Author: Martin Sustrik Date: Sun Jan 17 17:49:34 2010 +0100 version number bumped configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51e012c446b500fe3dfb46b6475ebf018ecfeaa0 Author: Martin Sustrik Date: Sat Jan 16 09:39:44 2010 +0100 Solaris build fixed AUTHORS | 1 + src/ip.cpp | 2 +- src/tcp_connecter.cpp | 6 ++++-- src/tcp_listener.cpp | 7 +++---- 4 files changed, 9 insertions(+), 7 deletions(-) commit a507d16e13fdd6b13e1e69d0d305750995513a1f Author: unknown Date: Fri Jan 15 14:21:20 2010 +0100 Win32 build fixed src/tcp_connecter.cpp | 2 ++ src/tcp_listener.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 2bb57ac57ace37203c505ff17147210feca34d73 Author: Martin Sustrik Date: Fri Jan 15 14:11:39 2010 +0100 ZMQII-39: Implement IPC transport man/Makefile.am | 2 +- man/convert2html.sh | 1 + man/convert2pdf.sh | 2 + man/man7/zmq.7 | 3 + man/man7/zmq_inproc.7 | 3 +- man/man7/zmq_ipc.7 | 34 ++++++++++ man/man7/zmq_pgm.7 | 1 + man/man7/zmq_tcp.7 | 1 + man/man7/zmq_udp.7 | 1 + src/ip.cpp | 17 +++++ src/ip.hpp | 9 +++ src/socket_base.cpp | 23 +++++-- src/tcp_connecter.cpp | 117 +++++++++++++++++++++++----------- src/tcp_connecter.hpp | 4 +- src/tcp_listener.cpp | 166 ++++++++++++++++++++++++++++++++++--------------- src/tcp_listener.hpp | 10 ++- src/zmq_connecter.cpp | 10 +-- src/zmq_connecter.hpp | 7 ++- src/zmq_engine.cpp | 9 ++- src/zmq_engine.hpp | 6 +- src/zmq_init.cpp | 4 +- src/zmq_init.hpp | 3 +- src/zmq_listener.cpp | 6 +- src/zmq_listener.hpp | 4 +- 24 files changed, 323 insertions(+), 120 deletions(-) commit 56c369272c279224562d11b0a66590ac7826f4f3 Merge: b9b0124 b60342a Author: unknown Date: Thu Jan 14 15:50:54 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit b9b0124d553b30932d8b78fb774ae258fa0d0f4d Author: unknown Date: Thu Jan 14 15:50:12 2010 +0100 ZMQII-34: ensure that poll won't return POLLIN event when the message will be filtered out anyway (Win32) src/zmq.cpp | 54 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 17 deletions(-) commit b60342ae1a95dbb303705f5b89a94b33805a3841 Author: Martin Sustrik Date: Thu Jan 14 14:11:34 2010 +0100 man pages are more specific on NIC name issue man/man3/zmq_bind.3 | 12 ++++++++---- man/man3/zmq_connect.3 | 12 ++++++++---- man/man7/zmq_pgm.7 | 5 +++++ man/man7/zmq_tcp.7 | 5 +++++ man/man7/zmq_udp.7 | 5 +++++ 5 files changed, 31 insertions(+), 8 deletions(-) commit 067ba3b9f77a253d4ce58e05ef1fa7702c32b2a3 Author: Martin Sustrik Date: Wed Jan 13 19:21:23 2010 +0100 ZMQII-34: ensure that poll won't return POLLIN event when the message will be filtered out anyway (POSIX) src/socket_base.cpp | 4 +-- src/sub.cpp | 92 +++++++++++++++++++++++++++++++++++++-------------- src/sub.hpp | 10 ++++++ src/zmq.cpp | 50 ++++++++++++++++++---------- 4 files changed, 110 insertions(+), 46 deletions(-) commit 06105d164230800e8ea42ddd513e2f7fb27e6f2f Author: Martin Sustrik Date: Wed Jan 13 15:15:01 2010 +0100 transports man pages updated man/man7/zmq_inproc.7 | 34 +++++++++++++++++++++- man/man7/zmq_pgm.7 | 77 ++++++++++++++++++++++++++++++++++++++++++++++++- man/man7/zmq_tcp.7 | 5 ++++ man/man7/zmq_udp.7 | 32 +++++++++++++++++++- 4 files changed, 145 insertions(+), 3 deletions(-) commit 30a107e06d48ebbc7a635ba4fb21a24e385cf4e4 Author: Martin Sustrik Date: Wed Jan 13 13:35:13 2010 +0100 timeout parameter for zmq_poll added in cl binding bindings/cl/zeromq-api.lisp | 12 +++++++----- bindings/cl/zeromq.lisp | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) commit 20a8edcf5c2d9d5099d194e5a87c501d49c47328 Author: Martin Sustrik Date: Wed Jan 13 13:24:29 2010 +0100 ZMQII-38: Compiler complains about missing virtual constructors src/i_endpoint.hpp | 2 ++ src/i_inout.hpp | 2 ++ 2 files changed, 4 insertions(+) commit 76dbb4f3bb88f73bc40e3de72e258e321375cd2f Author: Martin Sustrik Date: Tue Jan 12 13:08:37 2010 +0100 zmq_tcp man page added man/man7/zmq_tcp.7 | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) commit bcd278a5a5fa9c08af6786c6f3c1ec5fa974fadf Author: Martin Sustrik Date: Tue Jan 12 08:14:55 2010 +0100 ZMQII-37: SIGSEGV when polling on REQ socket src/req.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c613b39faebe18af95cab07a7d5f687285c4655 Author: Martin Sustrik Date: Tue Jan 12 08:02:03 2010 +0100 script to convert man pages to html added man/convert2html.sh | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 72b2f07a707724b353e9733f60cb4bade9b43966 Author: Martin Sustrik Date: Mon Jan 11 07:47:19 2010 +0100 ZMQII-36: Chat example & forwarder broken because of changes subscribe semantics devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- examples/chat/display.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 65f450f22e311d9a9251d05f8fb902a8fa2afe54 Author: Martin Sustrik Date: Sun Jan 10 17:41:59 2010 +0100 minor man page fix man/man3/zmq_connect.3 | 2 -- 1 file changed, 2 deletions(-) commit bd07baf0281ddb5f332bd03b06038fc0ac048285 Author: Martin Sustrik Date: Sat Jan 9 22:24:59 2010 +0100 ZMQII-33: zmq_poll may exceed timeout if signal interrupts the waiting src/zmq.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e806615dd18e625b0b7fb1074cc4da5fda18529b Author: Martin Sustrik Date: Fri Jan 8 15:44:51 2010 +0100 ZMQII-31: memory leak in zmq_poll (on timeout) AUTHORS | 1 + src/zmq.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 9fc8827b8a8e9d842b85b7f7f9790fc0a2ef88f6 Merge: ddf5f75 e9a4ad3 Author: Martin Sustrik Date: Thu Jan 7 14:45:13 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ddf5f75549f01a0615ee3f49b6b5d53aefd8fbd2 Author: Martin Sustrik Date: Thu Jan 7 14:44:43 2010 +0100 zmq.cpp build probelm on non-linux platforms fixed man/man3/zmq_setsockopt.3 | 10 ++++------ src/zmq.cpp | 5 ++++- 2 files changed, 8 insertions(+), 7 deletions(-) commit e9a4ad38ce04ee21a7f81d5a36e3c58cf7138f5d Author: malosek Date: Wed Jan 6 20:10:27 2010 +0100 updated version to 2.0-beta1 in configure.in configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7546526e667b35c05c80515d651e950a771813e1 Author: Martin Sustrik Date: Wed Jan 6 19:42:15 2010 +0100 ChangeLog updated for 2.0-beta1 ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e21b33e9cfe12725de23bf2ef44967f53bcb2a10 Author: malosek Date: Tue Jan 5 18:34:27 2010 +0100 forced WINVER to 0x0501 for mingv32 build src/windows.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ef049efe2ec56bb0ff5395ba8cba6e1722922e43 Author: Martin Sustrik Date: Tue Jan 5 14:45:10 2010 +0100 perf tests modified to reflect change in subscription format perf/c/local_thr.c | 2 +- perf/cl/local-thr.lisp | 2 +- perf/cpp/local_thr.cpp | 2 +- perf/java/local_thr.java | 2 +- perf/python/local_thr.py | 2 +- perf/ruby/local_thr.rb | 2 +- src/zmq_engine.cpp | 8 +++++--- 7 files changed, 11 insertions(+), 9 deletions(-) commit 8d339e959694107df8f1666634a34f54ad76ae41 Author: malosek Date: Tue Jan 5 13:46:35 2010 +0100 Fixed newer autotools warningng about AC_CONFIG_MACRO_DIR Makefile.am | 2 ++ configure.in | 1 + 2 files changed, 3 insertions(+) commit 11fec367d1a13c3f0248f8542eb805b8d9571685 Author: malosek Date: Tue Jan 5 11:22:14 2010 +0100 added pending event fd handling by the pgm_sender src/pgm_sender.cpp | 9 ++++++++- src/pgm_sender.hpp | 1 + src/pgm_socket.cpp | 10 +++++++--- src/pgm_socket.hpp | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) commit 472ddf8de2c93f750831d52b5473cdbed1db51e8 Merge: d10c605 4f6baf4 Author: malosek Date: Tue Jan 5 11:05:03 2010 +0100 fixed failed merge with autogen.sh commit d10c605fa94a8fe8265785043aeef63983e07f3f Author: malosek Date: Tue Jan 5 10:51:54 2010 +0100 updated to libpgm-2.0.20rc5 configure.in | 10 +++++----- foreign/openpgm/libpgm-2.0.19rc4.tar.bz2 | Bin 317223 -> 0 bytes foreign/openpgm/libpgm-2.0.20rc5.tar.bz2 | Bin 0 -> 316958 bytes 3 files changed, 5 insertions(+), 5 deletions(-) commit 4f6baf4dde627656b63cc4e2acdb78a8577ba640 Author: Martin Sustrik Date: Tue Jan 5 08:29:35 2010 +0100 Copyrights transferred from FastMQ to iMatix autogen.sh | 7 +------ bindings/c/zmq.h | 2 +- bindings/cpp/zmq.hpp | 2 +- bindings/java/Context.cpp | 2 +- bindings/java/Socket.cpp | 2 +- bindings/java/org/zmq/Context.java | 2 +- bindings/java/org/zmq/Socket.java | 2 +- bindings/python/pyzmq.cpp | 2 +- bindings/ruby/extconf.rb | 2 +- bindings/ruby/rbzmq.cpp | 2 +- builds/msvc/platform.hpp | 2 +- devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- devices/zmq_queue/zmq_queue.cpp | 2 +- devices/zmq_streamer/zmq_streamer.cpp | 2 +- examples/chat/display.cpp | 2 +- examples/chat/prompt.cpp | 2 +- man/convert2pdf.sh | 2 +- man/man1/zmq_forwarder.1 | 2 +- man/man1/zmq_queue.1 | 2 +- man/man1/zmq_streamer.1 | 2 +- man/man3/zmq_bind.3 | 2 +- man/man3/zmq_close.3 | 2 +- man/man3/zmq_connect.3 | 2 +- man/man3/zmq_flush.3 | 2 +- man/man3/zmq_init.3 | 2 +- man/man3/zmq_msg_close.3 | 2 +- man/man3/zmq_msg_copy.3 | 2 +- man/man3/zmq_msg_data.3 | 2 +- man/man3/zmq_msg_init.3 | 2 +- man/man3/zmq_msg_init_data.3 | 2 +- man/man3/zmq_msg_init_size.3 | 2 +- man/man3/zmq_msg_move.3 | 2 +- man/man3/zmq_msg_size.3 | 2 +- man/man3/zmq_poll.3 | 2 +- man/man3/zmq_recv.3 | 2 +- man/man3/zmq_send.3 | 2 +- man/man3/zmq_setsockopt.3 | 2 +- man/man3/zmq_socket.3 | 2 +- man/man3/zmq_strerror.3 | 2 +- man/man3/zmq_term.3 | 2 +- man/man7/zmq.7 | 2 +- man/man7/zmq_cl.7 | 2 +- man/man7/zmq_cpp.7 | 2 +- man/man7/zmq_inproc.7 | 2 +- man/man7/zmq_pgm.7 | 2 +- man/man7/zmq_python.7 | 2 +- man/man7/zmq_ruby.7 | 2 +- man/man7/zmq_tcp.7 | 2 +- man/man7/zmq_udp.7 | 2 +- packages/debian/copyright | 2 +- perf/c/local_lat.c | 2 +- perf/c/local_thr.c | 2 +- perf/c/remote_lat.c | 2 +- perf/c/remote_thr.c | 2 +- perf/cpp/local_lat.cpp | 2 +- perf/cpp/local_thr.cpp | 2 +- perf/cpp/remote_lat.cpp | 2 +- perf/cpp/remote_thr.cpp | 2 +- perf/java/local_lat.java | 2 +- perf/java/local_thr.java | 2 +- perf/java/remote_lat.java | 2 +- perf/java/remote_thr.java | 2 +- perf/python/local_lat.py | 2 +- perf/python/local_thr.py | 2 +- perf/python/remote_lat.py | 2 +- perf/python/remote_thr.py | 2 +- perf/ruby/local_lat.rb | 2 +- perf/ruby/local_thr.rb | 2 +- perf/ruby/remote_lat.rb | 2 +- perf/ruby/remote_thr.rb | 2 +- src/app_thread.cpp | 2 +- src/app_thread.hpp | 2 +- src/atomic_bitmap.hpp | 2 +- src/atomic_counter.hpp | 2 +- src/atomic_ptr.hpp | 2 +- src/command.hpp | 2 +- src/config.hpp | 2 +- src/decoder.hpp | 2 +- src/devpoll.cpp | 2 +- src/devpoll.hpp | 2 +- src/dispatcher.cpp | 2 +- src/dispatcher.hpp | 2 +- src/downstream.cpp | 2 +- src/downstream.hpp | 2 +- src/encoder.hpp | 2 +- src/epoll.cpp | 2 +- src/epoll.hpp | 2 +- src/err.cpp | 2 +- src/err.hpp | 2 +- src/fd.hpp | 2 +- src/fd_signaler.cpp | 2 +- src/fd_signaler.hpp | 2 +- src/fq.cpp | 2 +- src/fq.hpp | 2 +- src/i_endpoint.hpp | 2 +- src/i_engine.hpp | 2 +- src/i_inout.hpp | 2 +- src/i_poll_events.hpp | 2 +- src/i_signaler.hpp | 2 +- src/io_object.cpp | 2 +- src/io_object.hpp | 2 +- src/io_thread.cpp | 2 +- src/io_thread.hpp | 2 +- src/ip.cpp | 2 +- src/ip.hpp | 2 +- src/kqueue.cpp | 2 +- src/kqueue.hpp | 2 +- src/lb.cpp | 2 +- src/lb.hpp | 2 +- src/likely.hpp | 2 +- src/msg_content.hpp | 2 +- src/mutex.hpp | 2 +- src/object.cpp | 2 +- src/object.hpp | 2 +- src/options.cpp | 2 +- src/options.hpp | 2 +- src/owned.cpp | 2 +- src/owned.hpp | 2 +- src/p2p.cpp | 2 +- src/p2p.hpp | 2 +- src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 2 +- src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 2 +- src/pgm_socket.hpp | 2 +- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/poll.cpp | 2 +- src/poll.hpp | 2 +- src/poller.hpp | 2 +- src/pub.cpp | 2 +- src/pub.hpp | 2 +- src/rep.cpp | 2 +- src/rep.hpp | 2 +- src/req.cpp | 2 +- src/req.hpp | 2 +- src/select.cpp | 2 +- src/select.hpp | 2 +- src/session.cpp | 2 +- src/session.hpp | 2 +- src/simple_semaphore.hpp | 2 +- src/socket_base.cpp | 2 +- src/socket_base.hpp | 2 +- src/stdint.hpp | 2 +- src/sub.cpp | 2 +- src/sub.hpp | 2 +- src/tcp_connecter.cpp | 2 +- src/tcp_connecter.hpp | 2 +- src/tcp_listener.cpp | 2 +- src/tcp_listener.hpp | 2 +- src/tcp_socket.cpp | 2 +- src/tcp_socket.hpp | 2 +- src/thread.cpp | 2 +- src/thread.hpp | 2 +- src/upstream.cpp | 2 +- src/upstream.hpp | 2 +- src/uuid.cpp | 2 +- src/uuid.hpp | 2 +- src/windows.hpp | 2 +- src/wire.hpp | 2 +- src/xrep.cpp | 2 +- src/xrep.hpp | 2 +- src/xreq.cpp | 2 +- src/xreq.hpp | 2 +- src/yarray.hpp | 2 +- src/yarray_item.hpp | 2 +- src/ypipe.hpp | 2 +- src/ypollset.cpp | 2 +- src/ypollset.hpp | 2 +- src/yqueue.hpp | 2 +- src/zmq.cpp | 2 +- src/zmq_connecter.cpp | 2 +- src/zmq_connecter.hpp | 2 +- src/zmq_decoder.cpp | 2 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.cpp | 2 +- src/zmq_encoder.hpp | 2 +- src/zmq_engine.cpp | 2 +- src/zmq_engine.hpp | 2 +- src/zmq_init.cpp | 2 +- src/zmq_init.hpp | 2 +- src/zmq_listener.cpp | 2 +- src/zmq_listener.hpp | 2 +- 184 files changed, 184 insertions(+), 189 deletions(-) commit bf01727f4b5d2e12daa5e4289c556fb3b7ade3f3 Author: malosek Date: Mon Jan 4 16:04:40 2010 +0100 updated to libpgm 2.0.19rc4 configure.in | 10 +++++----- foreign/openpgm/libpgm-2.0.18rc3.tar.bz2 | Bin 315989 -> 0 bytes foreign/openpgm/libpgm-2.0.19rc4.tar.bz2 | Bin 0 -> 317223 bytes 3 files changed, 5 insertions(+), 5 deletions(-) commit 1528edb963b2c9d292758f7704eeda336d358db2 Author: malosek Date: Mon Jan 4 16:03:49 2010 +0100 fixed autogen.sh complaining about existing config dir autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2b235db165e459f7f265993477dae0dc987125a Author: Martin Sustrik Date: Mon Jan 4 15:46:20 2010 +0100 ZMQII-29: Add timeout to zmq_poll function bindings/c/zmq.h | 2 +- bindings/cpp/zmq.hpp | 4 ++-- man/man3/zmq_poll.3 | 10 ++++++++-- src/zmq.cpp | 23 ++++++++++++++++++----- 4 files changed, 29 insertions(+), 10 deletions(-) commit 7884f4541aa6f95b76e0b2429baaf11108c543a1 Author: Martin Sustrik Date: Mon Jan 4 15:13:04 2010 +0100 problem with new version of autoreconf fixed autogen.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1b90e5f6f50ecb512b22f73850f763a9a009c483 Author: malosek Date: Thu Dec 31 16:53:00 2009 +0100 added missing likely.hpp file into the dist src/Makefile.am | 1 + 1 file changed, 1 insertion(+) commit 9bda63cd6378682af3b685dbbe0c47cdc4455295 Author: malosek Date: Thu Dec 31 16:35:04 2009 +0100 fixed minor gcc warning in src/pgm_receiver.cpp src/pgm_receiver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 819590c04cb24f1627b140883e4106bb8a6f62eb Author: malosek Date: Thu Dec 31 16:31:13 2009 +0100 libpgm updated to 2.0.18rc3 configure.in | 10 +++++----- foreign/openpgm/libpgm-2.0.17rc2.tar.bz2 | Bin 315051 -> 0 bytes foreign/openpgm/libpgm-2.0.18rc3.tar.bz2 | Bin 0 -> 315989 bytes 3 files changed, 5 insertions(+), 5 deletions(-) commit 9fadf0b218b66e8448a2356f124dc1bb10f1f81d Author: malosek Date: Thu Dec 31 16:18:45 2009 +0100 fixed minor gcc warning in src/pgm_socket.cpp src/pgm_socket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6da7903d0fc42356adbf4c43e04774a1b465632 Author: malosek Date: Thu Dec 31 15:47:44 2009 +0100 removed unused foreign/openpgm/create_custom_gsi_1.patch file Makefile.am | 1 - foreign/openpgm/create_custom_gsi_1.patch | 43 ----------------------------- 2 files changed, 44 deletions(-) commit 7cb02fb3e7cbe614caefbb5d9ab34936fba2724f Author: malosek Date: Thu Dec 31 15:44:42 2009 +0100 fixed make dist for non pgm configuration configure.in | 3 +++ 1 file changed, 3 insertions(+) commit 102077471c5863242b5e9a2e063e272edd5b48ea Author: Martin Sustrik Date: Tue Dec 29 16:50:28 2009 +0100 error in zmq_poll manpage fixed man/man3/zmq_poll.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9cebc86ed8eeff2cc5dde49807a4851b43d1232 Author: unknown Date: Tue Dec 29 16:42:56 2009 +0100 EINPROGRESS definition added on Win32 platform bindings/c/zmq.h | 3 +++ 1 file changed, 3 insertions(+) commit 23e5c3b342793ca871747b7d6681d445b34925bb Author: Martin Sustrik Date: Tue Dec 29 07:53:33 2009 +0100 polling on SUB socket fixed src/sub.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 72161fb075025410312c6735d681c3de9a36a4e5 Author: Martin Sustrik Date: Mon Dec 28 21:29:31 2009 +0100 format of subscriptions changed (no * needed anymore) src/socket_base.cpp | 11 ++++--- src/sub.cpp | 90 +++++++++++++++++++++------------------------------ src/sub.hpp | 9 ++---- src/zmq_engine.cpp | 7 ++-- 4 files changed, 51 insertions(+), 66 deletions(-) commit c97967ed4b70de700db38cc2661bbe43262bc029 Author: unknown Date: Mon Dec 28 16:20:21 2009 +0100 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 16 ++++------------ src/zmq_init.cpp | 1 + 2 files changed, 5 insertions(+), 12 deletions(-) commit 5852db451a76905336601c5ba3e4f33006f007fb Author: Martin Sustrik Date: Mon Dec 28 11:51:06 2009 +0100 PGM code cleanup src/pgm_receiver.cpp | 148 ++++++++++++++++------------------------- src/pgm_receiver.hpp | 13 ++-- src/pgm_sender.cpp | 94 ++++++++++---------------- src/pgm_sender.hpp | 16 +---- src/pgm_socket.cpp | 178 +++++++++++++++----------------------------------- src/pgm_socket.hpp | 37 ++--------- 6 files changed, 159 insertions(+), 327 deletions(-) commit aebff623f36efddc0de7a3192832b61802f8cec8 Author: Martin Sustrik Date: Wed Dec 23 19:37:56 2009 +0100 ZMQII-28: Bidirectional introduction on TCP connection establishment src/Makefile.am | 8 +- src/i_inout.hpp | 6 +- src/pgm_receiver.cpp | 3 +- src/pgm_receiver.hpp | 6 +- src/pgm_sender.cpp | 3 +- src/pgm_sender.hpp | 6 +- src/session.cpp | 54 +++++++++--- src/session.hpp | 24 ++++-- src/socket_base.cpp | 83 +++++++++++++------ src/socket_base.hpp | 27 +++--- src/zmq_connecter.cpp | 15 ++-- src/zmq_connecter.hpp | 8 +- src/zmq_connecter_init.cpp | 132 ------------------------------ src/zmq_connecter_init.hpp | 79 ------------------ src/zmq_engine.cpp | 2 +- src/zmq_init.cpp | 195 ++++++++++++++++++++++++++++++++++++++++++++ src/zmq_init.hpp | 89 ++++++++++++++++++++ src/zmq_listener.cpp | 6 +- src/zmq_listener_init.cpp | 137 ------------------------------- src/zmq_listener_init.hpp | 79 ------------------ 20 files changed, 445 insertions(+), 517 deletions(-) commit b3bd4c15fe869de4f5c530ecc5942968677a85c3 Author: Martin Sustrik Date: Tue Dec 22 09:01:01 2009 +0100 OpenPGM error handling fixed src/pgm_socket.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 7cf18a2aec8300099e3c3e236ac3cefa3be746d0 Author: Martin Sustrik Date: Mon Dec 21 20:45:52 2009 +0100 minor fixes src/app_thread.cpp | 4 ++-- src/object.hpp | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) commit 5a0674dfeccf0d80dc92e77a8630be280c71fb84 Author: Martin Sustrik Date: Mon Dec 21 18:50:24 2009 +0100 OpenPGM error handling improved bindings/python/pyzmq.cpp | 2 +- src/pgm_socket.cpp | 64 +++++++++++++++++++++++++++++++++++---------- src/pgm_socket.hpp | 12 ++++----- 3 files changed, 57 insertions(+), 21 deletions(-) commit 990a1e8686bdeb3472a27d00cb2436936a4d0d26 Author: Martin Sustrik Date: Fri Dec 18 16:01:58 2009 +0100 zmq_cl(7) man page added man/man7/zmq_cl.7 | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 118 insertions(+), 3 deletions(-) commit bad224251e97205abaf987e8e998bc14af32223c Author: Martin Sustrik Date: Fri Dec 18 15:46:21 2009 +0100 minor errors in zmq_cpp man page fixed man/man7/zmq_cpp.7 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d50c7daf9eafe36ca2df7210ff2e82487e85f842 Author: Martin Sustrik Date: Fri Dec 18 14:34:57 2009 +0100 hint parameter (zmq_free_fn) added to Lisp binding bindings/cl/zeromq.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1924cba88985a36cb1422efd2fb287292b41eb44 Author: Martin Sustrik Date: Fri Dec 18 14:33:22 2009 +0100 memory management in Lisp binding fixed bindings/cl/zeromq-api.lisp | 59 ++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 18 deletions(-) commit 86d68cbcbd24e6dfe6dd1ed230c7806408b70668 Author: Martin Sustrik Date: Fri Dec 18 14:19:28 2009 +0100 memory leaks related to OpenPGM errors fixed src/pgm_socket.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 500d32a540d762d30a59e952a4f2216d73e4654c Author: Martin Sustrik Date: Wed Dec 16 17:19:20 2009 +0100 examples & perf added to the Debian package packages/debian/control | 50 +++++++++++++++++++++++++++---- packages/debian/dirs | 3 ++ packages/debian/rules | 7 +++-- packages/debian/zeromq-examples.files | 2 ++ packages/debian/zeromq-examples.install | 2 ++ packages/debian/zeromq-perf.files | 10 +++++++ packages/debian/zeromq-perf.install | 10 +++++++ 7 files changed, 75 insertions(+), 9 deletions(-) commit 667d1a8280e2dedd7f3ccdbd39605263ba8e98d7 Author: Martin Sustrik Date: Wed Dec 16 15:20:14 2009 +0100 man page updated to match change in zmq_free_fn man/man3/zmq_msg_init_data.3 | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit ab5abf6c7ec7668c4a8373d87c491d22d0db144d Author: Martin Sustrik Date: Wed Dec 16 15:08:37 2009 +0100 hint parameter added to zmq_free function bindings/c/zmq.h | 4 ++-- bindings/cpp/zmq.hpp | 10 ++++++---- src/msg_content.hpp | 1 + src/zmq.cpp | 6 ++++-- 4 files changed, 13 insertions(+), 8 deletions(-) commit 02202ec30ecca9e538cc807ce86b54d822c823bd Author: Martin Sustrik Date: Wed Dec 16 14:54:11 2009 +0100 addition to CREDITS section of AUTHORS file AUTHORS | 2 ++ 1 file changed, 2 insertions(+) commit 5e77a1daa46f1b757b08f65895778f803575469c Author: Martin Sustrik Date: Wed Dec 16 14:43:50 2009 +0100 debian package added packages/debian/README.Debian | 6 ++ packages/debian/changelog | 6 ++ packages/debian/cl-zeromq.files | 7 ++ packages/debian/cl-zeromq.install | 6 ++ packages/debian/cl-zeromq.links | 1 + packages/debian/compat | 1 + packages/debian/control | 123 +++++++++++++++++++++++++++ packages/debian/copyright | 18 ++++ packages/debian/dirs | 2 + packages/debian/docs | 2 + packages/debian/libzeromq-dev.files | 37 ++++++++ packages/debian/libzeromq-dev.install | 19 +++++ packages/debian/libzeromq-python.files | 1 + packages/debian/libzeromq-python.install | 1 + packages/debian/libzeromq-ruby.files | 1 + packages/debian/libzeromq-ruby.install | 1 + packages/debian/libzeromq0.files | 2 + packages/debian/libzeromq0.install | 1 + packages/debian/rules | 135 ++++++++++++++++++++++++++++++ packages/debian/shlibs.local | 1 + packages/debian/zeromq-utils.files | 6 ++ packages/debian/zeromq-utils.install | 6 ++ 22 files changed, 383 insertions(+) commit 7479871cde46371c593f35c0ace3d9e984fddb1a Merge: 8aa0908 3e64083 Author: Martin Sustrik Date: Tue Dec 15 23:50:32 2009 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 8aa0908635f255e2d533539d5330b92b62dc88ba Author: Martin Sustrik Date: Tue Dec 15 23:49:55 2009 +0100 all news converted to nothrow variant src/app_thread.cpp | 23 ++++++++++++----------- src/dispatcher.cpp | 12 ++++++++---- src/epoll.cpp | 3 ++- src/io_thread.cpp | 4 +++- src/kqueue.cpp | 3 ++- src/pgm_receiver.cpp | 4 +++- src/pgm_socket.cpp | 2 ++ src/session.cpp | 8 ++++++-- src/socket_base.cpp | 33 +++++++++++++++++++++------------ src/tcp_listener.cpp | 1 - src/yqueue.hpp | 5 +++-- src/zmq.cpp | 4 ++-- src/zmq_connecter.cpp | 6 ++++-- src/zmq_connecter_init.cpp | 5 ++++- src/zmq_engine.cpp | 4 +++- src/zmq_listener.cpp | 6 ++++-- src/zmq_listener_init.cpp | 9 ++++++--- 17 files changed, 85 insertions(+), 47 deletions(-) commit 3e640836674872961f48efb4dc7badb20d736407 Author: unknown Date: Tue Dec 15 18:00:00 2009 +0100 win32 build fixed builds/msvc/libzmq/libzmq.vcproj | 16 ++++++++++++++++ src/zmq_listener_init.cpp | 1 + 2 files changed, 17 insertions(+) commit 2cef05d86976784f4bc1083cb0fa548e267ac132 Author: Martin Sustrik Date: Tue Dec 15 17:49:40 2009 +0100 reconnection mechanism added to tcp transport src/i_inout.hpp | 15 +++++++++++++-- src/io_object.hpp | 1 + src/io_thread.hpp | 1 + src/object.hpp | 5 +++-- src/session.cpp | 23 +++++++++++++++++++++-- src/session.hpp | 5 ++++- src/zmq_connecter.cpp | 10 +++++++--- src/zmq_connecter.hpp | 5 ++++- src/zmq_connecter_init.cpp | 36 +++++++++++++++++++++--------------- src/zmq_connecter_init.hpp | 11 +++++++---- src/zmq_engine.cpp | 23 ++++++++++++++++++++--- src/zmq_engine.hpp | 5 ++++- src/zmq_listener_init.cpp | 22 ++++++++++++++++++++-- src/zmq_listener_init.hpp | 5 ++++- 14 files changed, 130 insertions(+), 37 deletions(-) commit 14b112301e62af5115ab870d97ae448c2e3deddb Author: Martin Sustrik Date: Tue Dec 15 13:58:21 2009 +0100 handle error during connecting by eventual reconnection src/zmq_connecter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e49115224a7957b0e5d49326bc02ae6af186eaf9 Author: Martin Sustrik Date: Tue Dec 15 09:09:19 2009 +0100 zmq_encoder/decoder are able to add/trim prefixes from messages; fair queueing and load balancing algorithms factorised into separate classes src/Makefile.am | 4 ++ src/downstream.cpp | 34 +++------------- src/downstream.hpp | 10 ++--- src/fq.cpp | 106 +++++++++++++++++++++++++++++++++++++++++++++++ src/fq.hpp | 64 +++++++++++++++++++++++++++++ src/lb.cpp | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/lb.hpp | 63 ++++++++++++++++++++++++++++ src/pgm_receiver.cpp | 2 +- src/pgm_sender.cpp | 2 +- src/sub.cpp | 50 ++++------------------- src/sub.hpp | 21 +++------- src/upstream.cpp | 58 ++++---------------------- src/upstream.hpp | 14 ++----- src/xrep.cpp | 17 ++++---- src/xrep.hpp | 5 ++- src/xreq.cpp | 28 ++++++------- src/xreq.hpp | 8 +++- src/zmq_decoder.cpp | 40 ++++++++++++++---- src/zmq_decoder.hpp | 7 +++- src/zmq_encoder.cpp | 21 ++++++++-- src/zmq_encoder.hpp | 4 +- src/zmq_engine.cpp | 4 +- 22 files changed, 476 insertions(+), 197 deletions(-) commit bd792faa9d6c78c375dbc52c6d773e157335da36 Author: Martin Sustrik Date: Mon Dec 14 11:46:30 2009 +0100 ZMQ_SNDBUF and ZMQ_RCVBUF honoured in PGM transport src/pgm_socket.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 68488215da8e03a74ca4da6b822e4cfa3b71d73a Author: Martin Sustrik Date: Sun Dec 13 18:32:22 2009 +0100 Man pages for XREQ/XREP/zmq_queue updated man/Makefile.am | 2 +- man/convert2pdf.sh | 2 ++ man/man1/zmq_queue.1 | 11 +++++++++++ man/man3/zmq_socket.3 | 37 +++++++++++++++++++++++++++++++++++-- 4 files changed, 49 insertions(+), 3 deletions(-) commit 0637e06387ac0676e9595246eb60a6809664b01a Author: unknown Date: Sun Dec 13 14:59:25 2009 +0100 zmq_streamer & zmq_queue are built under MSVC builds/msvc/libzmq/libzmq.vcproj | 20 ++- builds/msvc/msvc.sln | 18 +++ builds/msvc/zmq_queue/zmq_queue.vcproj | 174 ++++++++++++++++++++++++++ builds/msvc/zmq_streamer/zmq_streamer.vcproj | 174 ++++++++++++++++++++++++++ src/xrep.cpp | 5 + src/xreq.cpp | 5 + 6 files changed, 394 insertions(+), 2 deletions(-) commit fa6bf24d8030b0e54fd25b167064482e4cf08a36 Author: Martin Sustrik Date: Sun Dec 13 14:45:23 2009 +0100 XREP & XREQ socket types added; zmq_queue device added bindings/c/zmq.h | 6 +- bindings/cl/zeromq.lisp | 6 +- bindings/java/org/zmq/Socket.java | 6 +- bindings/python/pyzmq.cpp | 6 ++ bindings/ruby/rbzmq.cpp | 2 + configure.in | 15 +++- devices/Makefile.am | 8 +- devices/zmq_forwarder/Makefile.am | 2 +- devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- devices/zmq_queue/Makefile.am | 9 +++ devices/zmq_queue/zmq_queue.cpp | 122 +++++++++++++++++++++++++++++++ devices/zmq_streamer/Makefile.am | 2 +- devices/zmq_streamer/zmq_streamer.cpp | 2 +- src/Makefile.am | 4 + src/app_thread.cpp | 8 ++ src/pgm_sender.cpp | 4 - src/xrep.cpp | 95 ++++++++++++++++++++++++ src/xrep.hpp | 57 +++++++++++++++ src/xreq.cpp | 95 ++++++++++++++++++++++++ src/xreq.hpp | 57 +++++++++++++++ 20 files changed, 490 insertions(+), 18 deletions(-) commit c43aded531014895973c283fdd82bb2e5e85c789 Author: Martin Sustrik Date: Sun Dec 13 11:27:43 2009 +0100 debug code removed from PGM engines src/pgm_receiver.cpp | 21 ------------ src/pgm_receiver.hpp | 10 +++--- src/pgm_sender.cpp | 33 ++---------------- src/pgm_socket.cpp | 92 +++++--------------------------------------------- src/pgm_socket.hpp | 24 +++++-------- 5 files changed, 24 insertions(+), 156 deletions(-) commit f4ac8d7a443bd1afb35634d1cccb79943cc316e0 Author: Martin Sustrik Date: Sun Dec 13 09:56:02 2009 +0100 OpenPGM v1 support removed Makefile.am | 4 +- configure.in | 134 ++----------------- foreign/openpgm/libpgm-1.2.14.tar.bz2 | Bin 280029 -> 0 bytes foreign/openpgm/lost_data_tsi.patch | 76 ----------- src/Makefile.am | 59 --------- src/pgm_receiver.cpp | 10 -- src/pgm_sender.cpp | 18 --- src/pgm_sender.hpp | 2 - src/pgm_socket.cpp | 226 +-------------------------------- src/pgm_socket.hpp | 16 --- 10 files changed, 18 insertions(+), 527 deletions(-) commit 73b765e4b497f6a505cbf88c524085fa0e58e59c Author: Martin Sustrik Date: Sun Dec 13 09:11:08 2009 +0100 PGM transport fixed src/encoder.hpp | 26 ++++--- src/pgm_receiver.cpp | 5 +- src/pgm_sender.cpp | 6 +- src/pgm_socket.cpp | 193 ++++++++++++++++++++------------------------------ src/pgm_socket.hpp | 5 +- src/zmq_engine.cpp | 4 +- 6 files changed, 105 insertions(+), 134 deletions(-) commit d5670f34baa0751a5b4567a28caea4e4fa208727 Author: Martin Sustrik Date: Fri Dec 11 22:29:04 2009 +0100 ZMQII-26: Use zero-copy for large messages (rx side) src/decoder.hpp | 87 +++++++++++++++++++++++++++++++++-------- src/encoder.hpp | 107 ++++++++++++++++++++++++++++++--------------------- src/zmq_decoder.cpp | 3 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.cpp | 3 +- src/zmq_encoder.hpp | 2 +- src/zmq_engine.cpp | 72 +++++++++++++++------------------- src/zmq_engine.hpp | 13 ++----- 8 files changed, 174 insertions(+), 115 deletions(-) commit 770178724f9493e99c832863031aef016f143e9f Author: Martin Sustrik Date: Thu Dec 10 21:34:40 2009 +0100 errors are never predicted in branch prediction (likely/unlikely macros added) src/atomic_counter.hpp | 1 - src/err.hpp | 91 +++++++++++++++++++++++++++++------------------- src/likely.hpp | 32 +++++++++++++++++ 3 files changed, 87 insertions(+), 37 deletions(-) commit d4fdc26efc6b21103e446f712a484af910a57f2f Author: unknown Date: Thu Dec 10 16:46:22 2009 +0100 zmq_poll implemented on Win32 platform bindings/c/zmq.h | 7 +++ src/zmq.cpp | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 125 insertions(+), 7 deletions(-) commit 986ab66b8f260614b2bd18f870ad98402c0f247a Author: unknown Date: Thu Dec 10 10:39:24 2009 +0100 ZMQII-27: Allow setting SNDBUF and RCVBUF size from 0MQ API (Win32) src/tcp_socket.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 8d58643655b653c520fcdcc2a89b5067788f32fc Author: unknown Date: Thu Dec 10 10:33:07 2009 +0100 MSVC build for chat example added builds/msvc/display/display.vcproj | 176 ++++++++++++++++++++++++++++++++++++ builds/msvc/msvc.sln | 18 ++++ builds/msvc/prompt/prompt.vcproj | 176 ++++++++++++++++++++++++++++++++++++ examples/chat/prompt.cpp | 5 + 4 files changed, 375 insertions(+) commit 2e39f892c353851fe90261db0a0875abab50539f Author: Martin Sustrik Date: Thu Dec 10 09:47:24 2009 +0100 ZMQII-27: Allow setting SNDBUF and RCVBUF size from 0MQ API (POSIX) bindings/c/zmq.h | 2 ++ bindings/cl/zeromq.lisp | 2 ++ bindings/java/org/zmq/Socket.java | 2 ++ bindings/python/pyzmq.cpp | 6 ++++++ bindings/ruby/rbzmq.cpp | 2 ++ man/man3/zmq_setsockopt.3 | 24 ++++++++++++++++++++++++ src/options.cpp | 18 ++++++++++++++++++ src/options.hpp | 3 +++ src/tcp_socket.cpp | 17 +++++++++++++++-- src/tcp_socket.hpp | 3 ++- src/zmq_connecter_init.cpp | 2 +- src/zmq_engine.cpp | 8 +++++--- src/zmq_engine.hpp | 5 ++++- src/zmq_listener_init.cpp | 2 +- 14 files changed, 87 insertions(+), 9 deletions(-) commit 72dacc35702a14ab0bb5a2650dffbb3bbda63175 Author: Martin Sustrik Date: Thu Dec 10 08:25:21 2009 +0100 zero-copy on tx side optimised to minimise number of user/kernel space transitions src/encoder.hpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 1c1dfb50f88002ce7a024f2d8980b968d3aee1ae Author: Martin Sustrik Date: Wed Dec 9 14:12:25 2009 +0100 zmq_cpp(7) man page filled in man/man7/zmq_cpp.7 | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 2 deletions(-) commit cab5a4a1596e5019c7fd306ad49aac67209b467c Author: Martin Sustrik Date: Wed Dec 9 09:19:16 2009 +0100 minor documentation updates examples/chat/README | 4 ++-- src/encoder.hpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit c98e29fb6e017a667452cd0a50536da691600353 Author: Martin Sustrik Date: Tue Dec 8 21:48:39 2009 +0100 README added to chat example examples/chat/README | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 902d4f2282f4ed59f942be6fa1013b20dd964536 Author: Martin Sustrik Date: Tue Dec 8 16:13:51 2009 +0100 minor fix of zero-copy on tx side src/encoder.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9be877c68503c35f9f72c8b92bd11454e4fcad97 Author: Martin Sustrik Date: Tue Dec 8 15:41:50 2009 +0100 ZMQII-26: Use zero-copy for large messages src/encoder.hpp | 28 +++++++++++++++++++++++----- src/zmq_engine.cpp | 21 +++++++++++++-------- src/zmq_engine.hpp | 12 ++++++++---- 3 files changed, 44 insertions(+), 17 deletions(-) commit bfef2fcd0ba590169ad46ea45da9d36dca1b5b97 Author: Martin Sustrik Date: Mon Dec 7 21:52:10 2009 +0100 autotools build system builds chat example now Makefile.am | 4 ++-- configure.in | 25 ++++++++++++++++++------- examples/Makefile.am | 7 +++++++ examples/chat/Makefile.am | 11 +++++++++++ 4 files changed, 38 insertions(+), 9 deletions(-) commit a08a72dd082e5e62f0d043c71ea7d9b6fb80b57e Author: Martin Sustrik Date: Mon Dec 7 21:06:54 2009 +0100 chat example added examples/chat/display.cpp | 50 ++++++++++++++++++++++++++++++++++++ examples/chat/prompt.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++++ src/fd_signaler.cpp | 2 +- 3 files changed, 113 insertions(+), 1 deletion(-) commit 82012667cca5249ba7aa16ac5880b86ac54f3e98 Author: Martin Sustrik Date: Mon Dec 7 17:28:43 2009 +0100 Deadlock on zmq_close src/fd_signaler.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9f495942736bfc1c1ef5f0b23d5a1bdab56d3757 Author: Martin Sustrik Date: Sat Dec 5 11:20:57 2009 +0100 C & C++ header files clean-up bindings/c/zmq.h | 257 ++++---------------------------------------------- bindings/cpp/zmq.hpp | 62 ++++++------ src/ypipe.hpp | 12 +-- 3 files changed, 53 insertions(+), 278 deletions(-) commit 356ce8fe917c1b3b645555bcd2ff0ff989c6829a Author: Martin Sustrik Date: Fri Dec 4 10:06:46 2009 +0100 man pages updated man/man1/zmq_forwarder.1 | 2 +- man/man1/zmq_streamer.1 | 2 +- man/man7/zmq.7 | 145 +++++++++++++++++++++++++++++++++++++++++++++- man/man7/zmq_cl.7 | 2 +- man/man7/zmq_cpp.7 | 3 +- man/man7/zmq_inproc.7 | 2 +- man/man7/zmq_pgm.7 | 2 +- man/man7/zmq_python.7 | 2 +- man/man7/zmq_ruby.7 | 2 +- man/man7/zmq_tcp.7 | 2 +- man/man7/zmq_udp.7 | 2 +- 11 files changed, 153 insertions(+), 13 deletions(-) commit 3e051e874ad03299cc9a9693cf8f20d6e37af329 Author: Martin Sustrik Date: Fri Dec 4 10:03:38 2009 +0100 Vitaly Mayatskikh added to authors section AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 721e37a371713ddb20c4dfcca253fe01f71a4af7 Author: Martin Sustrik Date: Fri Dec 4 10:02:25 2009 +0100 platform.hpp.in removed from the codebase src/platform.hpp.in | 234 --------------------------------------------------- 1 file changed, 234 deletions(-) commit 734aaa2dcbd130cfc5d8ef0bd31bd259117f6c0c Author: Martin Sustrik Date: Thu Dec 3 12:58:16 2009 +0100 placeholders for new man pages added man/Makefile.am | 9 ++++++--- man/convert2pdf.sh | 18 ++++++++++++++++++ man/man1/zmq_streamer.1 | 11 +++++++++++ man/man7/zmq_cl.7 | 9 +++++++++ man/man7/zmq_cpp.7 | 9 +++++++++ man/man7/zmq_inproc.7 | 9 +++++++++ man/man7/zmq_pgm.7 | 9 +++++++++ man/man7/zmq_python.7 | 9 +++++++++ man/man7/zmq_ruby.7 | 9 +++++++++ man/man7/zmq_tcp.7 | 9 +++++++++ man/man7/zmq_udp.7 | 9 +++++++++ 11 files changed, 107 insertions(+), 3 deletions(-) commit 6fcdc5fa69ea44d38e5505c23a6e9645efd35027 Author: Martin Sustrik Date: Thu Dec 3 10:14:07 2009 +0100 common lisp binding & perf tests added bindings/Makefile.am | 8 +- bindings/cl/Makefile.am | 9 ++ bindings/cl/meta.lisp | 59 +++++++++++ bindings/cl/package.lisp | 108 +++++++++++++++++++ bindings/cl/zeromq-api.lisp | 155 +++++++++++++++++++++++++++ bindings/cl/zeromq.asd | 38 +++++++ bindings/cl/zeromq.lisp | 244 +++++++++++++++++++++++++++++++++++++++++++ configure.in | 21 ++++ perf/Makefile.am | 2 +- perf/cl/Makefile.am | 2 + perf/cl/lat-parms.lisp | 22 ++++ perf/cl/local-lat-poll.lisp | 43 ++++++++ perf/cl/local-lat.lisp | 52 +++++++++ perf/cl/local-thr.lisp | 54 ++++++++++ perf/cl/remote-lat.lisp | 50 +++++++++ perf/cl/remote-thr.lisp | 41 ++++++++ perf/cl/thr-parms.lisp | 25 +++++ 17 files changed, 930 insertions(+), 3 deletions(-) commit 7146ef85e96551ce6f7b80d014463f246d09c878 Author: Martin Sustrik Date: Wed Dec 2 21:26:47 2009 +0100 seqnum mechanism automated src/dispatcher.cpp | 2 ++ src/object.cpp | 27 ++++++++++++++++++++------- src/object.hpp | 12 +++++++++--- src/owned.cpp | 26 ++++++++------------------ src/owned.hpp | 14 ++------------ src/session.cpp | 5 ----- src/socket_base.cpp | 12 ++++++------ src/socket_base.hpp | 1 + src/zmq_connecter.cpp | 1 - src/zmq_connecter_init.cpp | 4 ++-- src/zmq_listener.cpp | 2 -- src/zmq_listener_init.cpp | 6 ++++-- 12 files changed, 54 insertions(+), 58 deletions(-) commit cb84580bbced0b5d34ddcbac6e0aed5d0ad7cae6 Author: Martin Sustrik Date: Tue Dec 1 19:09:58 2009 +0100 harmless uninitialised memory read fixed src/yqueue.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9bd309bda6522dfdd514dd0c4edae04322c83ed1 Author: Martin Sustrik Date: Tue Dec 1 18:50:54 2009 +0100 annoying optimisation in 'bind' command removed src/command.hpp | 4 +--- src/object.cpp | 11 ++++------- src/object.hpp | 6 +++--- src/session.cpp | 5 ++--- src/socket_base.cpp | 13 +++---------- src/socket_base.hpp | 3 +-- 6 files changed, 14 insertions(+), 28 deletions(-) commit c04583ff6ca3c27de5628a61b6b6ce59fd13c9d9 Author: Martin Sustrik Date: Tue Dec 1 15:12:42 2009 +0100 minor code beautification src/pipe.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0d704fceee5e1bd0fe9438fa380452b69cd29114 Author: unknown Date: Tue Dec 1 14:58:00 2009 +0100 MSVC warnings fixed src/pipe.cpp | 32 ++++++++++++++++++++++++-------- src/pipe.hpp | 6 ++++-- 2 files changed, 28 insertions(+), 10 deletions(-) commit 9cff475af849897f669049fd7748f875fa1cd6c3 Author: malosek Date: Mon Nov 30 18:18:13 2009 +0100 added libpgm-2.0.17rc2 into the dist package Makefile.am | 4 ++-- configure.in | 21 +++++++++++++++------ foreign/openpgm/libpgm-2.0.17rc2.tar.bz2 | Bin 0 -> 315051 bytes 3 files changed, 17 insertions(+), 8 deletions(-) commit 82242f6a9e06d855ff2ac5616196a97868838a6c Author: malosek Date: Mon Nov 30 17:48:16 2009 +0100 minor formatting fix in zmq_init.3 man page man/man3/zmq_init.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c637bf292d0dc97be5c94c5c96a033c2d665576c Merge: 9ccf2b4 fa1641a Author: malosek Date: Mon Nov 30 16:45:36 2009 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 9ccf2b42cf932b4c29ea20cc9c6e3d5d8e7a62b4 Author: malosek Date: Mon Nov 30 16:45:18 2009 +0100 minor tweaks in pgm code src/pgm_sender.cpp | 4 ++++ src/pgm_socket.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit fa1641afc593be5926e558381861112b584e861a Author: malosek Date: Fri Nov 27 14:30:48 2009 +0100 msvc build fixed bindings/c/zmq.h | 3 +++ builds/msvc/libzmq/libzmq.vcproj | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) commit 19ce7c0e77f703ed2ec3b54685ddf4a6f2329ffe Author: Martin Sustrik Date: Thu Nov 26 12:41:50 2009 +0100 zmq_msg_data.3 referenced twice in Makefile.am - fixed AUTHORS | 1 + man/Makefile.am | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 8d85638f77ec0aa886170ba6bb49763ef165393b Author: Martin Sustrik Date: Thu Nov 26 12:01:26 2009 +0100 memory leak in message encoder fixed AUTHORS | 1 + perf/c/local_thr.c | 3 +++ src/session.cpp | 4 ---- src/zmq_decoder.cpp | 8 +++++++- src/zmq_encoder.cpp | 7 ++++++- src/zmq_listener_init.cpp | 1 - 6 files changed, 17 insertions(+), 7 deletions(-) commit 92aa9e94e21b652839faa3dda27c67571bad315d Author: Martin Sustrik Date: Wed Nov 25 08:55:03 2009 +0100 experimental code to use futexes instead of mutexes added to simple_semapthore_t src/simple_semaphore.hpp | 60 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 3 deletions(-) commit c98fd6bc3f2a49d7cb0b820a07354168c98f60b7 Author: Martin Sustrik Date: Tue Nov 24 11:23:10 2009 +0100 ZMQII-25: Implement streamed request/reply bindings/c/zmq.h | 6 ++ bindings/java/org/zmq/Socket.java | 2 + bindings/python/pyzmq.cpp | 6 ++ bindings/ruby/rbzmq.cpp | 2 + configure.in | 15 +++- devices/Makefile.am | 8 +- devices/zmq_forwarder/zmq_forwarder.cpp | 7 +- devices/zmq_streamer/Makefile.am | 9 ++ devices/zmq_streamer/zmq_streamer.cpp | 122 ++++++++++++++++++++++++++ man/man3/zmq_socket.3 | 9 ++ src/Makefile.am | 4 + src/app_thread.cpp | 14 ++- src/downstream.cpp | 131 ++++++++++++++++++++++++++++ src/downstream.hpp | 64 ++++++++++++++ src/p2p.hpp | 4 +- src/pub.hpp | 4 +- src/rep.cpp | 2 +- src/rep.hpp | 4 +- src/req.hpp | 4 +- src/sub.hpp | 4 +- src/upstream.cpp | 143 +++++++++++++++++++++++++++++++ src/upstream.hpp | 69 +++++++++++++++ 22 files changed, 612 insertions(+), 21 deletions(-) commit 5cd98bc575517ea72c435770a5313711484f7d34 Author: Martin Sustrik Date: Mon Nov 23 09:22:25 2009 +0100 the rest of man3 man pages filled in man/man3/zmq_msg_close.3 | 20 ++++++++++++++++ man/man3/zmq_msg_copy.3 | 31 ++++++++++++++++++++++++ man/man3/zmq_msg_data.3 | 15 ++++++++++++ man/man3/zmq_msg_init.3 | 21 +++++++++++++++++ man/man3/zmq_msg_init_data.3 | 33 ++++++++++++++++++++++++++ man/man3/zmq_msg_init_size.3 | 32 +++++++++++++++++++++++++ man/man3/zmq_msg_move.3 | 26 +++++++++++++++++++++ man/man3/zmq_msg_size.3 | 18 ++++++++++++++ man/man3/zmq_poll.3 | 53 ++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 249 insertions(+) commit e90ada0d044636201c57786307a49a52f9cf7643 Author: Martin Sustrik Date: Sun Nov 22 16:51:21 2009 +0100 more man pages filled in bindings/c/zmq.h | 2 +- man/man3/zmq_bind.3 | 36 ++++++++++++++++ man/man3/zmq_close.3 | 15 +++++++ man/man3/zmq_connect.3 | 37 +++++++++++++++- man/man3/zmq_flush.3 | 25 +++++++++++ man/man3/zmq_init.3 | 3 +- man/man3/zmq_recv.3 | 40 ++++++++++++++++++ man/man3/zmq_send.3 | 52 +++++++++++++++++++++++ man/man3/zmq_setsockopt.3 | 103 +++++++++++++++++++++++++++++++++++++++++++++ man/man3/zmq_socket.3 | 56 ++++++++++++++++++++++++ man/man3/zmq_term.3 | 2 + 11 files changed, 368 insertions(+), 3 deletions(-) commit 6602cce9af93539df8f1c43235e7e7130a3df60d Author: Martin Sustrik Date: Sun Nov 22 12:05:11 2009 +0100 zmq_init, zmq_term & zmq_strerror man pages added man/Makefile.am | 2 +- man/convert2pdf.sh | 2 ++ man/man3/zmq_init.3 | 26 ++++++++++++++++++++++++++ man/man3/zmq_strerror.3 | 27 +++++++++++++++++++++++++++ man/man3/zmq_term.3 | 11 +++++++++++ 5 files changed, 67 insertions(+), 1 deletion(-) commit ed5563f75285197aa0cdbe8a0dc6f80c5bb1f89c Author: Martin Sustrik Date: Sun Nov 22 10:25:53 2009 +0100 man pages (dummy) added for zmq_msg_* functions man/Makefile.am | 5 ++++- man/convert2pdf.sh | 16 ++++++++++++++++ man/man3/zmq_msg_close.3 | 12 ++++++++++++ man/man3/zmq_msg_copy.3 | 12 ++++++++++++ man/man3/zmq_msg_data.3 | 12 ++++++++++++ man/man3/zmq_msg_init.3 | 12 ++++++++++++ man/man3/zmq_msg_init_data.3 | 15 +++++++++++++++ man/man3/zmq_msg_init_size.3 | 12 ++++++++++++ man/man3/zmq_msg_move.3 | 12 ++++++++++++ man/man3/zmq_msg_size.3 | 12 ++++++++++++ 10 files changed, 119 insertions(+), 1 deletion(-) commit 55b64a02e7f3b1ce9e512240a9f9a337ead3b54c Author: Martin Sustrik Date: Sun Nov 22 08:47:06 2009 +0100 man pages - initial (dummy) version Makefile.am | 8 ++++++-- configure.in | 8 +++++++- man/Makefile.am | 16 +++++++++++++++ man/convert2pdf.sh | 48 +++++++++++++++++++++++++++++++++++++++++++++ man/man1/zmq_forwarder.1 | 11 +++++++++++ man/man3/zmq_bind.3 | 12 ++++++++++++ man/man3/zmq_close.3 | 12 ++++++++++++ man/man3/zmq_connect.3 | 12 ++++++++++++ man/man3/zmq_flush.3 | 12 ++++++++++++ man/man3/zmq_init.3 | 12 ++++++++++++ man/man3/zmq_poll.3 | 12 ++++++++++++ man/man3/zmq_recv.3 | 12 ++++++++++++ man/man3/zmq_send.3 | 12 ++++++++++++ man/man3/zmq_setsockopt.3 | 12 ++++++++++++ man/man3/zmq_socket.3 | 12 ++++++++++++ man/man3/zmq_term.3 | 12 ++++++++++++ man/man7/zmq.7 | 9 +++++++++ 17 files changed, 229 insertions(+), 3 deletions(-) commit c41daca3da6ffd033f93c3e24898414567f71eb3 Author: Martin Sustrik Date: Sat Nov 21 21:30:09 2009 +0100 race condition in inproc transport shutdown fixed src/command.hpp | 3 +++ src/object.cpp | 9 ++++++--- src/object.hpp | 6 +++--- src/session.cpp | 4 +++- src/socket_base.cpp | 16 ++++++++++++---- src/socket_base.hpp | 3 ++- 6 files changed, 29 insertions(+), 12 deletions(-) commit 64634605b3ccb90d582cfdf380535c89bf900a0e Author: Martin Sustrik Date: Sat Nov 21 21:13:29 2009 +0100 obsolete parameter removed from 'bind' command src/command.hpp | 1 - src/object.cpp | 9 +++------ src/object.hpp | 6 +++--- src/session.cpp | 2 +- src/socket_base.cpp | 6 ++---- src/socket_base.hpp | 3 +-- 6 files changed, 10 insertions(+), 17 deletions(-) commit 0e9ab2e8a3f5bc22f2c331c14236a2918a5512a8 Author: Martin Sustrik Date: Sat Nov 21 20:59:55 2009 +0100 inproc transport - initial commit src/dispatcher.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++++++ src/dispatcher.hpp | 12 ++++++++++ src/object.cpp | 15 +++++++++++++ src/object.hpp | 6 +++++ src/socket_base.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-- src/socket_base.hpp | 12 ++++++++++ src/zmq.cpp | 6 +++-- 7 files changed, 165 insertions(+), 4 deletions(-) commit 14f2fecdcd9732fe741c211138a4ba327816a937 Author: Martin Sustrik Date: Thu Nov 19 09:53:49 2009 +0100 ZMQII-24: SEGFAULT when anonymous session disconnects src/pipe.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c2e0661b0afb2f50f47e0275fa6603947f26d240 Author: Martin Sustrik Date: Thu Nov 19 08:06:52 2009 +0100 uninitialised variable in devpoll_t and kqueue_t src/devpoll.cpp | 3 ++- src/kqueue.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 26ca5ed8c62f8a88a32106a5c9e003712f4ca655 Author: Martin Sustrik Date: Sat Nov 14 18:57:04 2009 +0100 Fixing concurrency issue in rep.cpp resulting in broken connections with multiple requesters under heavy load. src/rep.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 84585a9561b5e3bd39baa8d49b889455362334ea Author: malosek Date: Wed Nov 4 18:59:19 2009 +0100 pgm_transport_recvmsgv in process_upstream returns PGM_IO_STATUS_RATE_LIMITED on busy sender src/pgm_socket.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c2cd7977f7a82e978d77b2d4d8e23d78f71e809c Author: malosek Date: Tue Nov 3 19:54:43 2009 +0100 update pgm_socket to recent openpgm2 src/pgm_socket.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 08b02a43ae21e833a04d274fb20ef3bbc73c0d09 Author: malosek Date: Tue Nov 3 14:11:53 2009 +0100 fixed get_sender_fds and get_receiver_fds for openpgm2 src/pgm_socket.cpp | 83 +++++++++++++++++++++++++++++++--------------------- src/pgm_socket.hpp | 2 +- 2 files changed, 51 insertions(+), 34 deletions(-) commit 7d672d3ab8c74371b58b293f807db74760b18155 Author: malosek Date: Tue Nov 3 14:06:25 2009 +0100 minor fixes for MSVC++ 2005 build src/app_thread.cpp | 3 +++ src/fd.hpp | 2 +- src/windows.hpp | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 7cbdcc954213b715ce83316538403bbce1fac99f Author: Martin Sustrik Date: Thu Oct 22 13:21:27 2009 +0200 ZMQII-21: Problem with fd_signaler_t::poll on socket close src/fd_signaler.cpp | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 55acf365ea76b908388ca9726232bde90242cdcb Author: Martin Sustrik Date: Tue Oct 20 18:44:17 2009 +0200 releasing python global lock when doing blocking operations bindings/python/pyzmq.cpp | 5 +++++ 1 file changed, 5 insertions(+) commit 8b08047cb08dd6ba7ae142007f82607183574ef6 Author: malosek Date: Mon Oct 19 19:00:04 2009 +0200 added --with-pgm2-examples configure option configure.in | 17 +++++++++ perf/c/Makefile.am | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++- src/Makefile.am | 4 +- 3 files changed, 123 insertions(+), 2 deletions(-) commit 71e455bfe5dd1df1220e9280e536be56238d2178 Author: malosek Date: Mon Oct 19 15:19:22 2009 +0200 ZMQII-19: add --disable-eventfd configure option configure.in | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit 50c7d12be6c10c294143491b479c50349a3c84a3 Author: malosek Date: Mon Oct 12 22:53:11 2009 +0200 added HAVE_LIBWS2_32 into platform.hpp.in src/platform.hpp.in | 3 +++ 1 file changed, 3 insertions(+) commit 0ce02058ebc35184b91399eee35d44ef01cd9e38 Author: malosek Date: Mon Oct 12 22:51:41 2009 +0200 updated 0MQ to recent OpenPGM2 rev.562 src/Makefile.am | 1 + src/pgm_socket.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit ea2f6558fd2a759b78364ded493c598f5ca5a2d3 Author: malosek Date: Mon Oct 12 22:50:01 2009 +0200 mingw fixed winsock linking issue configure.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7afc61ae7c4859fa1a6273e1964d378c00142746 Author: malosek Date: Tue Oct 6 12:57:24 2009 +0200 0MQ compilable on winXP mingw with --with-pgm2 option configure.in | 12 +++++++++--- src/Makefile.am | 53 ++++++++++++++++++++++++++++++++------------------ src/pgm_receiver.cpp | 5 +++++ src/pgm_receiver.hpp | 8 +++++++- src/pgm_sender.cpp | 6 ++++-- src/pgm_sender.hpp | 4 ++++ src/pgm_socket.cpp | 23 ++++++++++++++-------- src/pgm_socket.hpp | 13 +++++-------- src/platform.hpp.in | 3 +++ 9 files changed, 86 insertions(+), 41 deletions(-) commit ac83175ef0f0084f281a416785679f8b56f551b9 Author: malosek Date: Mon Oct 5 16:57:26 2009 +0200 updated to recent PGM2 changes foreign/openpgm/create_custom_gsi_1.patch | 2 +- src/pgm_socket.cpp | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) commit 3daeff2786ce1d6d8e58f0ad15e693f2c48c94f9 Author: malosek Date: Mon Oct 5 15:06:40 2009 +0200 mingw port configure.in | 13 ++++++++----- src/fd.hpp | 4 ++-- src/platform.hpp.in | 3 +++ src/uuid.hpp | 7 ++++++- src/windows.hpp | 6 ++++++ 5 files changed, 25 insertions(+), 8 deletions(-) commit de2e439a52e93a4cb17a19e9ef9cadfd5ebf2cea Author: malosek Date: Mon Oct 5 15:06:08 2009 +0200 1 minor change in xmlParser.cpp foreign/xmlParser/xmlParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14dc1f45cd1a328415db09ef1e06def6179dae00 Author: malosek Date: Mon Oct 5 12:28:34 2009 +0200 build system tuning - fixed make dist Makefile.am | 7 ++++--- configure.in | 15 +++++++++++---- src/Makefile.am | 11 ++++++----- 3 files changed, 21 insertions(+), 12 deletions(-) commit b0c97a5f8b88fca73338c1c173b446515e2ed366 Author: malosek Date: Mon Oct 5 10:37:49 2009 +0200 build system tuning Makefile.am | 1 + src/Makefile.am | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit d57ee0984ac3f8712063a7f83d7200be25ca5513 Merge: ff65e26 4efe236 Author: malosek Date: Mon Oct 5 10:22:31 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ff65e26ce7567ea6a907e566f8530f4988231d68 Author: malosek Date: Mon Oct 5 10:22:12 2009 +0200 create_custom_gsi.patch renamed to create_custom_gsi_1.patch configure.in | 4 +-- foreign/openpgm/create_custom_gsi.patch | 43 ----------------------------- foreign/openpgm/create_custom_gsi_1.patch | 43 +++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 45 deletions(-) commit e1b9fcd4b185cdcfd460a5d2ecb29d085856bb20 Author: malosek Date: Mon Oct 5 10:18:24 2009 +0200 moved pgm_create_custom_gsi into PGM1 and drop ssl dependency configure.in | 18 ++++++------- foreign/openpgm/create_custom_gsi.patch | 43 +++++++++++++++++++++++++++++++ foreign/openpgm/lost_data_tsi.patch | 4 +-- src/pgm_socket.cpp | 18 +------------ src/pgm_socket.hpp | 3 --- src/platform.hpp.in | 6 ----- 6 files changed, 54 insertions(+), 38 deletions(-) commit 4efe2366d7394e8969fc9aa64c50be6842d8455f Author: Martin Sustrik Date: Fri Oct 2 10:46:36 2009 +0200 poller is a concept now rather than virtualised class src/Makefile.am | 2 +- src/devpoll.cpp | 41 ++++++++++++-------------- src/devpoll.hpp | 13 +++++---- src/epoll.cpp | 16 +++++----- src/epoll.hpp | 14 ++++----- src/i_poller.hpp | 84 ----------------------------------------------------- src/io_object.cpp | 2 +- src/io_object.hpp | 6 ++-- src/io_thread.cpp | 41 ++------------------------ src/io_thread.hpp | 8 ++--- src/kqueue.cpp | 17 +++++------ src/kqueue.hpp | 13 +++++---- src/poll.cpp | 18 +++++------- src/poll.hpp | 13 +++++---- src/poller.hpp | 68 +++++++++++++++++++++++++++++++++++++++++++ src/select.cpp | 33 +++++++++------------ src/select.hpp | 13 +++++---- 17 files changed, 170 insertions(+), 232 deletions(-) commit 4a3b4dadead8fe2af65443d0be4cc8462b9aa597 Author: Martin Sustrik Date: Fri Oct 2 09:42:13 2009 +0200 ZMQII-9: Check and implement speculative reads & writes src/ypollset.cpp | 1 - src/zmq_engine.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 49a9ef5fcb661827ee174415b4608e609bd0a65b Author: unknown Date: Thu Oct 1 13:48:04 2009 +0200 windows error handling improved bindings/c/zmq.h | 12 ++++++++++++ src/err.cpp | 43 +++++++++++++++++++++++++++++++++++++++++-- src/err.hpp | 1 + src/tcp_connecter.cpp | 10 +++++----- src/tcp_listener.cpp | 17 ++++++++++++----- src/zmq.cpp | 8 ++++++++ 6 files changed, 79 insertions(+), 12 deletions(-) commit cc631c4c6649b0d67114db13386a949426e35dbf Author: Martin Sustrik Date: Thu Oct 1 10:56:17 2009 +0200 ZMQII-18: Implement I/O multiplexing (first approximation) bindings/c/zmq.h | 33 ++++++++++++++ bindings/cpp/zmq.hpp | 5 +++ src/fd_signaler.hpp | 2 - src/i_signaler.hpp | 6 +++ src/p2p.cpp | 11 +++++ src/p2p.hpp | 2 + src/pub.cpp | 11 +++++ src/pub.hpp | 2 + src/rep.cpp | 17 ++++++++ src/rep.hpp | 2 + src/req.cpp | 13 ++++++ src/req.hpp | 2 + src/socket_base.cpp | 15 +++++++ src/socket_base.hpp | 12 ++++++ src/sub.cpp | 13 ++++++ src/sub.hpp | 2 + src/ypollset.cpp | 6 +++ src/ypollset.hpp | 1 + src/zmq.cpp | 117 +++++++++++++++++++++++++++++++++++++++++++++++++- 19 files changed, 269 insertions(+), 3 deletions(-) commit f2ff2c6e5c4e244dea28e1ac6ec3f886b7ebc356 Author: Martin Sustrik Date: Wed Sep 30 10:08:35 2009 +0200 checking for available messages added to ypipe/pipe src/pipe.cpp | 11 +++++++++++ src/pipe.hpp | 3 +++ src/ypipe.hpp | 24 ++++++++++++++++-------- 3 files changed, 30 insertions(+), 8 deletions(-) commit 84d854a088d27b642355d4e835a2d93e405452ae Author: Martin Sustrik Date: Tue Sep 29 15:40:29 2009 +0200 documentation error in zmq.h fixed bindings/c/zmq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 64e68e748607473befbcf2d96590d45dc7bc98db Author: malosek Date: Tue Sep 29 13:56:19 2009 +0200 detecting data loss for PGM2 receiver src/pgm_receiver.cpp | 10 ++++++++++ src/pgm_socket.cpp | 40 ++++++++++++++++++++++++++++++++++------ 2 files changed, 44 insertions(+), 6 deletions(-) commit 39d915ded8ccb612ae1f9aaefcd93f349f4c8f4c Author: malosek Date: Mon Sep 28 18:06:06 2009 +0200 PGM2 sender src/pgm_receiver.cpp | 2 +- src/pgm_sender.cpp | 26 +++++++++++++-- src/pgm_sender.hpp | 3 ++ src/pgm_socket.cpp | 85 +++++++++++++++++++++++++++++++++++++++----------- src/pgm_socket.hpp | 8 +++-- 5 files changed, 100 insertions(+), 24 deletions(-) commit cf6cc0128ff4d26e0059f399bbb8342ce259b996 Author: malosek Date: Fri Sep 25 17:50:12 2009 +0200 pgm2 receiver working (partly) src/Makefile.am | 3 +- src/pgm_socket.cpp | 161 +++++++++++++++++++++++++++++++++++---------------- src/pgm_socket.hpp | 14 ++++- src/socket_base.cpp | 4 +- 4 files changed, 129 insertions(+), 53 deletions(-) commit 72c5c5fff42fc0b4c9d1eaaaebe9d6e1dd8824f2 Author: malosek Date: Thu Sep 24 16:23:49 2009 +0200 --with-pgm2 compilable configure.in | 10 +++--- src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 2 +- src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 91 +++++++++++++++++++++++++++++++++++++++++++------- src/pgm_socket.hpp | 9 +---- 7 files changed, 89 insertions(+), 29 deletions(-) commit 33afdcd1adccd19ebd9f4ec9cc6d23a37975d135 Author: malosek Date: Thu Sep 24 12:43:35 2009 +0200 added --with-pgm2 into build system configure.in | 116 +++++++++++++++++++++++++++++++++++++++++--------- src/Makefile.am | 89 ++++++++++++++++++++++++++++++++++++-- src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 2 +- src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 2 +- src/pgm_socket.hpp | 2 +- src/platform.hpp.in | 8 +++- src/socket_base.cpp | 4 +- 10 files changed, 196 insertions(+), 33 deletions(-) commit 5aee5fd0cfc6351e843de1540eafa4e757066edc Author: malosek Date: Wed Sep 23 12:14:44 2009 +0200 Updated libzmq.vcproj file builds/msvc/libzmq/libzmq.vcproj | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 27d8627cb5d8c91df2f09ecc1272e84be4fe3c80 Author: malosek Date: Wed Sep 23 11:31:03 2009 +0200 Updated changelog for alpha3 release ChangeLog | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit b0a1a16fc2a84afa0eb2715f680297caef521b54 Merge: 088a2db 2521130 Author: Martin Sustrik Date: Wed Sep 23 10:23:53 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 088a2db6746488c1ce4a73c357caaece50bbdf60 Author: Martin Sustrik Date: Wed Sep 23 10:22:54 2009 +0200 ZMQII-16: Change "struct zmq_msg_t" to "zmq_msg_t" in C binding bindings/c/zmq.h | 24 ++++++++++++------------ perf/c/local_lat.c | 2 +- perf/c/local_thr.c | 2 +- perf/c/remote_lat.c | 2 +- perf/c/remote_thr.c | 2 +- src/p2p.cpp | 4 ++-- src/p2p.hpp | 4 ++-- src/pipe.cpp | 2 +- src/pipe.hpp | 4 ++-- src/pub.cpp | 4 ++-- src/pub.hpp | 4 ++-- src/rep.cpp | 4 ++-- src/rep.hpp | 4 ++-- src/req.cpp | 4 ++-- src/req.hpp | 4 ++-- src/socket_base.hpp | 10 ++++++---- src/sub.cpp | 4 ++-- src/sub.hpp | 6 +++--- 18 files changed, 46 insertions(+), 44 deletions(-) commit 25211307696752acc17e91783aa662dc9e423b21 Author: malosek Date: Wed Sep 23 10:22:39 2009 +0200 ZMQII-14: Change default for ZMQ_MCAST_LOOP to true src/options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85cbd7f83c10c70da8fa44fe7673143703f9710d Author: malosek Date: Tue Sep 22 15:12:51 2009 +0200 added PGM bus functionality Makefile.am | 1 + configure.in | 20 +++- foreign/openpgm/lost_data_tsi.patch | 76 +++++++++++++++ src/pgm_receiver.cpp | 176 ++++++++++++++++++----------------- src/pgm_receiver.hpp | 37 +++++--- src/pgm_socket.cpp | 159 ++++++++----------------------- src/pgm_socket.hpp | 19 ++-- src/platform.hpp.in | 6 ++ 8 files changed, 265 insertions(+), 229 deletions(-) commit 3bd8f83f6d412221e4673ceb90b8ca7fa74ff2f1 Author: Martin Sustrik Date: Tue Sep 22 13:00:05 2009 +0200 language bindings use zmq_strerror instead of strerror bindings/cpp/zmq.hpp | 9 +-------- bindings/java/Context.cpp | 12 +++--------- bindings/java/Socket.cpp | 11 ++--------- bindings/python/pyzmq.cpp | 20 ++++++++++---------- bindings/ruby/rbzmq.cpp | 18 +++++++++--------- 5 files changed, 25 insertions(+), 45 deletions(-) commit a0db7f6b811e687eda452a7de9f5db112f715544 Author: Martin Sustrik Date: Tue Sep 22 12:08:18 2009 +0200 POSIX error codes unsupported on win platform faked bindings/c/zmq.h | 16 +++++++++++++--- src/zmq.cpp | 13 +++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) commit e136d923b7060ef64d44264f88e49057e6638f31 Author: Martin Sustrik Date: Tue Sep 22 11:52:35 2009 +0200 ZMQ-specific error codes added bindings/c/zmq.h | 34 +++++++++++++++++++++++++++++----- src/dispatcher.cpp | 2 +- src/err.cpp | 5 +++++ src/pub.cpp | 2 +- src/rep.cpp | 6 +++--- src/req.cpp | 8 ++++---- src/socket_base.cpp | 10 +++++----- src/sub.cpp | 4 ++-- src/zmq.cpp | 15 +++++++++++++++ 9 files changed, 65 insertions(+), 21 deletions(-) commit cc8136896d30890efb24aadc2d3058652aa43d45 Author: Martin Sustrik Date: Tue Sep 22 10:57:46 2009 +0200 documentation in zmq.h improved bindings/c/zmq.h | 283 ++++++++++++++++++++++++++++++++++++-------------- bindings/cpp/zmq.hpp | 13 --- src/zmq.cpp | 28 +---- 3 files changed, 208 insertions(+), 116 deletions(-) commit e6ca5da1815023e90306914dab101eeef4b6f199 Author: Martin Sustrik Date: Tue Sep 22 08:30:15 2009 +0200 Windows build fixed src/fd_signaler.cpp | 31 ++++++++++++++++--------------- src/p2p.cpp | 3 +++ src/rep.cpp | 2 ++ 3 files changed, 21 insertions(+), 15 deletions(-) commit b15f695976d21300beabc3e0ecef87c1a0b4dc4c Author: Martin Sustrik Date: Mon Sep 21 17:20:13 2009 +0200 different fixes to req/rep src/dispatcher.cpp | 8 ++++---- src/fd_signaler.cpp | 22 +++++++++++----------- src/options.cpp | 4 +++- src/options.hpp | 5 +++++ src/p2p.cpp | 14 +++----------- src/p2p.hpp | 2 -- src/pub.cpp | 14 +++----------- src/pub.hpp | 2 -- src/rep.cpp | 14 +++----------- src/rep.hpp | 2 -- src/req.cpp | 14 +++----------- src/req.hpp | 2 -- src/session.cpp | 36 ++++++++++++++++++++++++------------ src/socket_base.cpp | 40 +++++++++++++--------------------------- src/socket_base.hpp | 13 ++++--------- src/sub.cpp | 14 +++----------- src/sub.hpp | 2 -- 17 files changed, 79 insertions(+), 129 deletions(-) commit cb1b6fe32cbf3c7cf5961bb4156f2de743693a3a Author: Martin Sustrik Date: Mon Sep 21 14:39:59 2009 +0200 initial version of req/rep sockets src/Makefile.am | 8 + src/app_thread.cpp | 20 ++- src/app_thread.hpp | 3 +- src/i_endpoint.hpp | 7 +- src/options.cpp | 80 +++++++++ src/options.hpp | 3 + src/p2p.cpp | 92 +++++++++++ src/p2p.hpp | 56 +++++++ src/pipe.cpp | 28 +--- src/pipe.hpp | 19 +-- src/pub.cpp | 129 ++++++++++++++- src/pub.hpp | 24 ++- src/rep.cpp | 204 +++++++++++++++++++++++ src/rep.hpp | 79 +++++++++ src/req.cpp | 206 +++++++++++++++++++++++ src/req.hpp | 84 ++++++++++ src/session.cpp | 49 +++--- src/session.hpp | 6 +- src/socket_base.cpp | 460 ++++++++++++++------------------------------------- src/socket_base.hpp | 77 ++++----- src/sub.cpp | 88 +++++++++- src/sub.hpp | 38 ++++- src/yarray.hpp | 110 ++++++++++++ src/yarray_item.hpp | 62 +++++++ 24 files changed, 1460 insertions(+), 472 deletions(-) commit 7668b246fc3cf4a2a3b3ee9b1283ad8a4b12ac4f Author: Martin Sustrik Date: Sun Sep 20 12:03:14 2009 +0200 ZMQ_POLL option forces fd_signaler to be used in app_thread src/app_thread.cpp | 18 +++++++++++++++--- src/app_thread.hpp | 5 ++--- src/fd_signaler.cpp | 39 ++++++++++++++++++++++++--------------- src/fd_signaler.hpp | 3 --- src/i_signaler.hpp | 4 ++-- src/ypollset.cpp | 4 ++++ src/ypollset.hpp | 2 +- 7 files changed, 48 insertions(+), 27 deletions(-) commit 495a2228cd08a29946f9e9ce2e0721e789203e35 Author: Martin Sustrik Date: Sun Sep 20 10:58:00 2009 +0200 MSVC warnings removed src/fd_signaler.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit f99b8fc921bc0e6aa55276d8c55e43c9d7f4375a Author: Martin Sustrik Date: Sun Sep 20 10:47:27 2009 +0200 receiving side of signaler virtualised src/app_thread.cpp | 4 ++-- src/fd_signaler.cpp | 55 +++++++++++++++++++++++++++++++++++++++------------ src/fd_signaler.hpp | 12 +++-------- src/i_signaler.hpp | 11 +++++++++++ src/io_thread.cpp | 4 ++-- src/ypollset.cpp | 8 ++++---- src/ypollset.hpp | 18 ++++++----------- 7 files changed, 70 insertions(+), 42 deletions(-) commit 50a8b9ea0c4a819073b46449dee8fc839b837ae5 Author: Martin Sustrik Date: Sun Sep 20 10:14:21 2009 +0200 'flags' parameter added to zmq_init bindings/c/zmq.h | 6 +++++- bindings/cpp/zmq.hpp | 4 ++-- bindings/java/Context.cpp | 4 ++-- bindings/java/org/zmq/Context.java | 8 +++++--- bindings/python/pyzmq.cpp | 13 ++++++++----- bindings/ruby/rbzmq.cpp | 11 +++++++---- perf/c/local_lat.c | 2 +- perf/c/local_thr.c | 2 +- perf/c/remote_lat.c | 2 +- perf/c/remote_thr.c | 2 +- perf/java/local_lat.java | 2 +- perf/java/local_thr.java | 2 +- perf/java/remote_lat.java | 2 +- perf/java/remote_thr.java | 2 +- perf/ruby/local_lat.rb | 2 +- perf/ruby/local_thr.rb | 2 +- perf/ruby/remote_lat.rb | 2 +- perf/ruby/remote_thr.rb | 2 +- src/app_thread.cpp | 3 ++- src/app_thread.hpp | 3 ++- src/dispatcher.cpp | 8 +++++--- src/dispatcher.hpp | 2 +- src/fd_signaler.cpp | 6 ++++++ src/io_thread.cpp | 3 ++- src/io_thread.hpp | 3 ++- src/zmq.cpp | 8 ++++---- 26 files changed, 65 insertions(+), 41 deletions(-) commit edecf75b611cf0e6b1c2658846cff013434edad4 Author: Martin Sustrik Date: Thu Sep 17 12:29:32 2009 +0200 python binding checks ctx argument type bindings/python/pyzmq.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 8cdf75327d847c464415ab32554d155febcf7c5e Author: Martin Sustrik Date: Thu Sep 17 11:44:39 2009 +0200 ChangeLog updated ChangeLog | 336 ++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 175 insertions(+), 161 deletions(-) commit dffbdbb60c5d5caf01d13063a3d1babab0411338 Author: malosek Date: Thu Sep 17 11:31:28 2009 +0200 fixed compiler warning cast from uint64 to bool in socket_base.cpp src/socket_base.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 1bd6d5e0f6a6013b2d43abb2a82f0027a92fcc96 Author: malosek Date: Thu Sep 17 11:26:39 2009 +0200 fixed missing xmlParser in dist package Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2be152967c90834bf02ab84e39980281d3f05002 Author: malosek Date: Thu Sep 17 10:49:02 2009 +0200 java binding Makefile.am cleanup bindings/java/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cff6eb43766ddbbc894237c1ffffc824ca3c79b6 Author: malosek Date: Thu Sep 17 10:29:02 2009 +0200 msvc directory moved into builds dir bindings/java/Socket.cpp | 2 +- builds/msvc/c_local_lat/c_local_lat.vcproj | 176 +++++++ builds/msvc/c_local_thr/c_local_thr.vcproj | 176 +++++++ builds/msvc/c_remote_lat/c_remote_lat.vcproj | 176 +++++++ builds/msvc/c_remote_thr/c_remote_thr.vcproj | 176 +++++++ builds/msvc/cpp_local_lat/cpp_local_lat.vcproj | 176 +++++++ builds/msvc/cpp_local_thr/cpp_local_thr.vcproj | 176 +++++++ builds/msvc/cpp_remote_lat/cpp_remote_lat.vcproj | 176 +++++++ builds/msvc/cpp_remote_thr/cpp_remote_thr.vcproj | 176 +++++++ builds/msvc/j_local_lat/j_local_lat.vcproj | 78 +++ builds/msvc/j_local_thr/j_local_thr.vcproj | 78 +++ builds/msvc/j_remote_lat/j_remote_lat.vcproj | 78 +++ builds/msvc/j_remote_thr/j_remote_thr.vcproj | 78 +++ builds/msvc/java/java.vcproj | 244 ++++++++++ builds/msvc/libzmq/libzmq.vcproj | 562 ++++++++++++++++++++++ builds/msvc/msvc.sln | 154 ++++++ builds/msvc/platform.hpp | 59 +++ builds/msvc/python/python.vcproj | 176 +++++++ builds/msvc/zmq_forwarder/zmq_forwarder.vcproj | 174 +++++++ msvc/c_local_lat/c_local_lat.vcproj | 176 ------- msvc/c_local_thr/c_local_thr.vcproj | 176 ------- msvc/c_remote_lat/c_remote_lat.vcproj | 176 ------- msvc/c_remote_thr/c_remote_thr.vcproj | 176 ------- msvc/cpp_local_lat/cpp_local_lat.vcproj | 176 ------- msvc/cpp_local_thr/cpp_local_thr.vcproj | 176 ------- msvc/cpp_remote_lat/cpp_remote_lat.vcproj | 176 ------- msvc/cpp_remote_thr/cpp_remote_thr.vcproj | 176 ------- msvc/j_local_lat/j_local_lat.vcproj | 78 --- msvc/j_local_thr/j_local_thr.vcproj | 78 --- msvc/j_remote_lat/j_remote_lat.vcproj | 78 --- msvc/j_remote_thr/j_remote_thr.vcproj | 78 --- msvc/java/java.vcproj | 244 ---------- msvc/libzmq/libzmq.vcproj | 538 --------------------- msvc/msvc.sln | 154 ------ msvc/platform.hpp | 59 --- msvc/python/python.vcproj | 176 ------- msvc/zmq_forwarder/zmq_forwarder.vcproj | 174 ------- 37 files changed, 3090 insertions(+), 3066 deletions(-) commit 3ebe9932f9c208966f8cb97d631d26df0367c151 Merge: 1a65504 d16b3bc Author: malosek Date: Wed Sep 16 17:07:15 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 1a655045951c29edda0b616640b9dac507cda164 Author: malosek Date: Wed Sep 16 17:06:59 2009 +0200 ruby directory moved into bindings dir Makefile.am | 9 +- bindings/Makefile.am | 8 +- bindings/ruby/Makefile.am | 11 ++ bindings/ruby/extconf.rb | 24 ++++ bindings/ruby/rbzmq.cpp | 277 +++++++++++++++++++++++++++++++++++++++++++++ configure.in | 2 +- ruby/Makefile.am | 11 -- ruby/extconf.rb | 24 ---- ruby/rbzmq.cpp | 277 --------------------------------------------- 9 files changed, 322 insertions(+), 321 deletions(-) commit c63387ca3657848c0eaa8014a863148c1e6525ff Author: malosek Date: Wed Sep 16 17:00:32 2009 +0200 python directory moved into bindings dir Makefile.am | 8 +- bindings/Makefile.am | 11 + bindings/python/Makefile.am | 7 + bindings/python/pyzmq.cpp | 528 +++++++++++++++++++++++++++++++++++++++++++ bindings/python/setup.py.in | 14 ++ configure.in | 3 +- python/Makefile.am | 7 - python/pyzmq.cpp | 528 ------------------------------------------- python/setup.py.in | 14 -- 9 files changed, 564 insertions(+), 556 deletions(-) commit 1b2a426656134b85ff4c75cb0cccbc53f2b83447 Author: malosek Date: Wed Sep 16 16:49:09 2009 +0200 c and cpp directories moved into bindings directory bindings/c/zmq.h | 216 +++++++++++++++++++++++ bindings/cpp/zmq.hpp | 283 +++++++++++++++++++++++++++++++ bindings/java/Makefile.am | 2 +- c/zmq.h | 216 ----------------------- cpp/zmq.hpp | 283 ------------------------------- devices/zmq_forwarder/Makefile.am | 2 +- devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- perf/c/Makefile.am | 2 +- perf/cpp/Makefile.am | 2 +- perf/java/Makefile.am | 2 +- src/Makefile.am | 4 +- src/app_thread.cpp | 2 +- src/dispatcher.cpp | 2 +- src/i_inout.hpp | 2 +- src/io_thread.cpp | 2 +- src/msg_content.hpp | 2 +- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/pub.cpp | 2 +- src/socket_base.cpp | 2 +- src/sub.cpp | 2 +- src/zmq.cpp | 2 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.hpp | 2 +- 24 files changed, 520 insertions(+), 520 deletions(-) commit 6bfb9e6aaf0adad441d693a679c30ef30aeb5c14 Author: malosek Date: Wed Sep 16 16:22:23 2009 +0200 java directory moved into bindings directory II Makefile.am | 8 ++------ bindings/java/Makefile.am | 2 +- configure.in | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) commit 3de435a07d460e7eb2423a75e71a409b0f1143e2 Author: malosek Date: Wed Sep 16 16:22:00 2009 +0200 java directory moved into bindings directory bindings/java/Context.cpp | 96 +++++++++++++ bindings/java/Makefile.am | 58 ++++++++ bindings/java/Socket.cpp | 272 ++++++++++++++++++++++++++++++++++++ bindings/java/org/zmq/Context.java | 50 +++++++ bindings/java/org/zmq/Socket.java | 112 +++++++++++++++ java/Context.cpp | 96 ------------- java/Makefile.am | 58 -------- java/Socket.cpp | 272 ------------------------------------ java/org/zmq/Context.java | 50 ------- java/org/zmq/Socket.java | 112 --------------- 10 files changed, 588 insertions(+), 588 deletions(-) commit d16b3bc0c93452a4be7d06525793ac5190e38031 Merge: 35c58dc 10dd8c5 Author: Martin Sustrik Date: Wed Sep 16 15:52:39 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 35c58dc7331e3c5033b16829dff40437efe97a81 Author: Martin Sustrik Date: Wed Sep 16 15:37:20 2009 +0200 ZMQII-1: fix for devpoll, kqueue & poll src/devpoll.cpp | 3 ++- src/kqueue.cpp | 3 ++- src/poll.cpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit 10dd8c53460a28849aacf7d2e24b63d7fae11ae0 Merge: 03d494d fc7715b Author: malosek Date: Wed Sep 16 15:36:56 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 03d494d4f074a8707274e6d5fd21ac6dca917344 Author: malosek Date: Wed Sep 16 15:36:38 2009 +0200 added udp:// transport prefix for PGM UDP encapsulation src/pgm_receiver.cpp | 4 ++-- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 10 ++++------ src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 33 +++++++-------------------------- src/pgm_socket.hpp | 2 +- src/socket_base.cpp | 13 +++++++++---- 7 files changed, 25 insertions(+), 41 deletions(-) commit fc7715b4636be7a0d49f27234359ddfddce23f5b Merge: f1c72d6 c6665f4 Author: Martin Sustrik Date: Wed Sep 16 15:27:39 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit f1c72d693e3bd252866a1f78e575493573eb57fe Author: Martin Sustrik Date: Wed Sep 16 15:26:49 2009 +0200 ZMQII-4: Failure in dev/poll poller src/zmq_connecter.cpp | 2 ++ 1 file changed, 2 insertions(+) commit c6665f46be7eb701866441087c35cdb1a08fc641 Author: malosek Date: Wed Sep 16 14:57:22 2009 +0200 set rc to 0 in its declaration (pyzmq.cpp) python/pyzmq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b2c3cae095abf9b61cd72cf19f053071a8c614a Author: malosek Date: Wed Sep 16 14:55:11 2009 +0200 setsockopt cleanup in rbzmq perf/ruby/local_thr.rb | 2 +- ruby/rbzmq.cpp | 106 +++++++++++++++++++----------------------------- 2 files changed, 43 insertions(+), 65 deletions(-) commit 3534732c0614a764731fbea2431247068fa63330 Merge: 17800ac a71d002 Author: malosek Date: Wed Sep 16 14:26:04 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 17800ac85e667d18124d0e90f9387d6c90887570 Author: malosek Date: Wed Sep 16 14:25:49 2009 +0200 setsockopt cleanup in pyzmq.cpp python/pyzmq.cpp | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) commit a71d00288008b7ed1dc91b6ad3d5fdf25a5e683e Merge: 4631fde 7a5db60 Author: Martin Sustrik Date: Wed Sep 16 14:03:42 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 4631fde7e385ea31e85f41290614afb9bda391c9 Author: Martin Sustrik Date: Wed Sep 16 14:02:43 2009 +0200 ZMQII-8: Failure during orphan pipe deallocation src/dispatcher.cpp | 4 ++-- src/session.cpp | 6 +++++- src/zmq_connecter_init.cpp | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) commit 7a5db6041f4f11ed502fa7446da900509dedb00f Author: malosek Date: Wed Sep 16 12:22:36 2009 +0200 added newly added socket options to all language bindings, P2P model changed to PUB/SUB for throughput tests c/zmq.h | 2 +- java/Socket.cpp | 1 + java/org/zmq/Socket.java | 1 + perf/c/local_thr.c | 8 +++++- perf/c/remote_thr.c | 5 +++- perf/cpp/local_thr.cpp | 8 +++++- perf/cpp/remote_thr.cpp | 6 +++- perf/java/local_thr.java | 68 ++++++++++++++++++++++++--------------------- perf/java/remote_thr.java | 60 ++++++++++++++++++++------------------- perf/python/local_thr.py | 8 +++++- perf/python/remote_thr.py | 6 +++- perf/ruby/local_thr.rb | 7 ++++- perf/ruby/remote_thr.rb | 6 +++- python/pyzmq.cpp | 18 +++++++++++- ruby/rbzmq.cpp | 5 ++++ src/socket_base.cpp | 11 ++++++-- 16 files changed, 149 insertions(+), 71 deletions(-) commit 9c522dccaf0b2c8074bd96fbfb4c968f45748ba4 Author: Martin Sustrik Date: Wed Sep 16 11:02:18 2009 +0200 reconnect added to zmq_connecter perf/c/remote_lat.c | 10 ++++++---- perf/cpp/remote_lat.cpp | 5 ++++- src/session.cpp | 9 ++++++--- src/session.hpp | 5 ++++- src/socket_base.cpp | 4 ++-- src/zmq_connecter.cpp | 22 +++++++++++++++++----- src/zmq_connecter.hpp | 5 ++++- src/zmq_connecter_init.cpp | 22 ++++++++++++++++++++-- src/zmq_engine.cpp | 1 + src/zmq_engine.hpp | 1 + src/zmq_listener_init.cpp | 2 +- 11 files changed, 66 insertions(+), 20 deletions(-) commit 6e03cb2f3eb083e1de8e7161d3ab21b52c87eece Merge: bce2e60 9fbdcc7 Author: Martin Sustrik Date: Wed Sep 16 10:56:55 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 9fbdcc7940823634d82f51d2b124ccfbca6e9b17 Author: malosek Date: Wed Sep 16 10:35:23 2009 +0200 removed reset method from zmq_decoder_t src/pgm_receiver.cpp | 25 +++++++++++++++---------- src/pgm_receiver.hpp | 2 +- src/zmq_decoder.cpp | 10 ---------- src/zmq_decoder.hpp | 2 -- 4 files changed, 16 insertions(+), 23 deletions(-) commit 969522bbf55467b6f6e8113be28451d087060843 Author: malosek Date: Wed Sep 16 10:11:01 2009 +0200 added OpenPGM receiver - ZMQ_SUB c/zmq.h | 1 + src/Makefile.am | 2 + src/options.cpp | 3 +- src/options.hpp | 7 +- src/pgm_receiver.cpp | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/pgm_receiver.hpp | 98 ++++++++++++++++++++++++ src/pgm_sender.cpp | 7 +- src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 17 +++-- src/socket_base.cpp | 75 +++++++++++++++++-- src/sub.cpp | 6 ++ 11 files changed, 395 insertions(+), 25 deletions(-) commit bce2e60bbb3b7f799a532d9b8f2e171c570b9fea Author: Martin Sustrik Date: Wed Sep 16 09:50:39 2009 +0200 more errors from send & recv handled decently on windows src/tcp_socket.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 0381a78c0484012e760d61051f325c71136df17e Author: malosek Date: Tue Sep 15 13:47:15 2009 +0200 added reset method into zmq_decoder_t class src/zmq_decoder.cpp | 10 ++++++++++ src/zmq_decoder.hpp | 2 ++ 2 files changed, 12 insertions(+) commit 79d4a6debf2f4a6970c1137f15426ba0c3535ac0 Merge: 7653f34 98b8e9b Author: malosek Date: Tue Sep 15 12:01:07 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 7653f34df0aae4689d0ccc563a2f111f4793e539 Author: malosek Date: Tue Sep 15 12:00:48 2009 +0200 fixed pub_t class creating ZMQ_SUB socket_base_t src/pub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98b8e9b54dd8c67006422106b478a3a6eab07869 Merge: a841774 3a3bcd3 Author: Martin Sustrik Date: Tue Sep 15 10:06:42 2009 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit a841774cbd6363e6ddccc7a56e9a97d1c1481a76 Author: Martin Sustrik Date: Tue Sep 15 10:04:43 2009 +0200 forwarder renamed to zmq_forwarder (MSVC build) msvc/forwarder/forwarder.vcproj | 174 ------------------------------- msvc/msvc.sln | 10 +- msvc/zmq_forwarder/zmq_forwarder.vcproj | 174 +++++++++++++++++++++++++++++++ 3 files changed, 179 insertions(+), 179 deletions(-) commit 3a3bcd337fb8000aef6c8f5ca3dd1b10475d7ab0 Author: malosek Date: Tue Sep 15 09:57:11 2009 +0200 pgm_sender code beautiication src/pgm_sender.hpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit f44b215a60f50e8730a50522d7b9f2d5b4381d19 Author: malosek Date: Tue Sep 15 09:47:25 2009 +0200 added out_event call into pgm_sender_t revive src/pgm_sender.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) commit 712c7bd8954a801526e87e652840f7087f9af706 Merge: 3642813 35e82b4 Author: malosek Date: Tue Sep 15 09:46:08 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 35e82b460549e227f6c3409be32d2c657955628c Author: Martin Sustrik Date: Tue Sep 15 09:45:32 2009 +0200 forwarder renamed to zmq_forwarder configure.in | 2 +- devices/Makefile.am | 4 +- devices/forwarder/Makefile.am | 9 --- devices/forwarder/forwarder.cpp | 122 ------------------------------- devices/zmq_forwarder/Makefile.am | 9 +++ devices/zmq_forwarder/zmq_forwarder.cpp | 122 +++++++++++++++++++++++++++++++ 6 files changed, 134 insertions(+), 134 deletions(-) commit 364281343ce0fd03b25bc6b1b451ee7ba8db436b Merge: bdf22e9 f7ad4a2 Author: malosek Date: Tue Sep 15 09:44:44 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit bdf22e9c2fe82366283f4edc02fd59c37fdb2c4b Author: malosek Date: Tue Sep 15 09:43:42 2009 +0200 deleted useles iostream include from socket_base.cpp src/socket_base.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f7ad4a203ad184d97002111f4ffb8bfe6a8f7c01 Author: Martin Sustrik Date: Mon Sep 14 17:04:57 2009 +0200 forwarder device compilable on windows foreign/xmlParser/xmlParser.cpp | 12 ++- msvc/forwarder/forwarder.vcproj | 174 +++++++++++++++++++++++++++++++++++++++ msvc/msvc.sln | 9 ++ python/pyzmq.cpp | 3 - ruby/rbzmq.cpp | 3 +- 5 files changed, 196 insertions(+), 5 deletions(-) commit 6cfd175e31eec44d215bbc237f2f1d94bfeac06d Author: Martin Sustrik Date: Mon Sep 14 16:45:53 2009 +0200 forwarder device added Makefile.am | 4 +- configure.in | 39 +++++++++---- devices/Makefile.am | 6 ++ devices/forwarder/Makefile.am | 9 +++ devices/forwarder/forwarder.cpp | 122 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 168 insertions(+), 12 deletions(-) commit e2900ce0a1b11ec212aeaf42bbefb26a54697c25 Author: Martin Sustrik Date: Mon Sep 14 14:30:15 2009 +0200 xmlParser added foreign/xmlParser/xmlParser.cpp | 2888 +++++++++++++++++++++++++++++++++++++++ foreign/xmlParser/xmlParser.hpp | 762 +++++++++++ 2 files changed, 3650 insertions(+) commit 2bc9419ced21151fe90c530758dc85b7024fdb70 Author: Martin Sustrik Date: Mon Sep 14 13:54:30 2009 +0200 ZMQII-10: Make connections interrupted during the init phase be closed silently src/zmq_decoder.cpp | 13 +++++++++++-- src/zmq_listener_init.cpp | 7 +++++-- 2 files changed, 16 insertions(+), 4 deletions(-) commit 37cacc5700eaaaddbe2df6e3affeca4a335b023a Author: Martin Sustrik Date: Mon Sep 14 12:28:13 2009 +0200 ZMQII-1: Win32 - failure on shutdown java/Socket.cpp | 2 ++ msvc/libzmq/libzmq.vcproj | 4 ++++ src/select.cpp | 4 ++-- src/socket_base.cpp | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) commit c806aabb2d3e6b1ba9e3f61319f23d45c7f9a007 Author: Martin Sustrik Date: Mon Sep 14 11:25:57 2009 +0200 java binding sets socket options using setsockopt function c/zmq.h | 19 ++++---- java/Socket.cpp | 114 +++++++++++++++++++--------------------------- java/org/zmq/Socket.java | 58 ++++++----------------- src/options.cpp | 5 +- src/options.hpp | 1 - src/socket_base.cpp | 16 ++----- 6 files changed, 77 insertions(+), 136 deletions(-) commit 36707529a7d82b164b59d42fe0d5d8a35c3dd279 Author: Martin Sustrik Date: Mon Sep 14 09:40:35 2009 +0200 minor merge problem corrected src/pub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89b1f2782ca6a1db9c68b7d642b5a41cc4d56414 Merge: 47350ad 1a4d6f9 Author: Martin Sustrik Date: Fri Sep 11 18:18:25 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 47350adcb6ea48512d732bc323eb1835a5ac9908 Author: Martin Sustrik Date: Fri Sep 11 18:16:47 2009 +0200 separate class for PUB-style socket added c/zmq.h | 6 +++--- src/Makefile.am | 2 ++ src/app_thread.cpp | 5 ++++- src/pub.cpp | 39 +++++++++++++++++++++++++++++++++++++++ src/pub.hpp | 41 +++++++++++++++++++++++++++++++++++++++++ src/sub.cpp | 12 ++++++++++++ src/sub.hpp | 2 ++ 7 files changed, 103 insertions(+), 4 deletions(-) commit 1a4d6f91194c52795808baa07dcd61a20ff599be Author: malosek Date: Fri Sep 11 17:58:37 2009 +0200 added OpenPGM sender - ZMQ_PUB Makefile.am | 4 +- c/zmq.h | 2 + src/Makefile.am | 6 +- src/app_thread.cpp | 2 +- src/config.hpp | 4 +- src/options.cpp | 4 +- src/options.hpp | 6 + src/pgm_sender.cpp | 224 +++++++++++++++ src/pgm_sender.hpp | 109 ++++++++ src/pgm_socket.cpp | 754 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/pgm_socket.hpp | 153 +++++++++++ src/socket_base.cpp | 105 ++++++- src/socket_base.hpp | 5 +- src/sub.cpp | 2 +- 14 files changed, 1360 insertions(+), 20 deletions(-) commit e940878b3f8ff332df534c4df463cfdf085cc787 Author: Martin Sustrik Date: Fri Sep 11 16:59:47 2009 +0200 build on win32 fixed msvc/libzmq/libzmq.vcproj | 8 ++++++++ src/socket_base.cpp | 2 +- src/tcp_connecter.cpp | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) commit 7be7962f9802b48e66663416097eb76edfa83e1e Author: Martin Sustrik Date: Fri Sep 11 16:23:16 2009 +0200 prefix-style message filtering added src/sub.cpp | 61 +++++++++++++++++++++++++++++++++++++++++++++-------------- src/sub.hpp | 10 ++++++++-- 2 files changed, 55 insertions(+), 16 deletions(-) commit 42ad2aa02d3b14eaa3c36c3f1a5a5789546ba411 Author: Martin Sustrik Date: Fri Sep 11 15:51:35 2009 +0200 ZMQII-7: Pipe detach fails on shutdown src/socket_base.cpp | 1 + 1 file changed, 1 insertion(+) commit 29c5930d0b9a4a1df3b90819bdfbfff6a66fedd0 Author: Martin Sustrik Date: Fri Sep 11 14:17:57 2009 +0200 asserts for invalid indexes in pipe reader & writer added src/pipe.cpp | 2 ++ 1 file changed, 2 insertions(+) commit e0d1294c4bae51a2bc83a09225e89dddc9b6dcf4 Merge: 5daa0de a91b449 Author: Martin Sustrik Date: Fri Sep 11 13:20:57 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 5daa0dec0f473c84aab6b12cdc5541335e74f07f Author: Martin Sustrik Date: Fri Sep 11 13:20:24 2009 +0200 ZMQII-5: Only one consumer in a process gets the message src/session.cpp | 23 ++++++++++++++--------- src/zmq_connecter_init.cpp | 4 +++- src/zmq_engine.cpp | 2 ++ src/zmq_listener_init.cpp | 4 +++- 4 files changed, 22 insertions(+), 11 deletions(-) commit a91b44977201e4b3891c70da0472a332f60a39fc Author: malosek Date: Fri Sep 11 11:21:40 2009 +0200 Revert "link libzmq with glib when congifured --with-pgm" This reverts commit 88695aaee607e6f4db1f4fd052e2596653fb18b2. c/zmq.h | 2 -- perf/cpp/remote_thr.cpp | 13 +-------- src/Makefile.am | 6 +--- src/config.hpp | 4 +-- src/options.cpp | 4 +-- src/options.hpp | 6 ---- src/socket_base.cpp | 74 ++++++++--------------------------------------- 7 files changed, 16 insertions(+), 93 deletions(-) commit 88695aaee607e6f4db1f4fd052e2596653fb18b2 Author: malosek Date: Fri Sep 11 11:13:15 2009 +0200 link libzmq with glib when congifured --with-pgm c/zmq.h | 2 ++ perf/cpp/remote_thr.cpp | 13 ++++++++- src/Makefile.am | 6 +++- src/config.hpp | 4 ++- src/options.cpp | 4 ++- src/options.hpp | 6 ++++ src/socket_base.cpp | 74 +++++++++++++++++++++++++++++++++++++++-------- 7 files changed, 93 insertions(+), 16 deletions(-) commit f824b8a067c60b32260c56020742d6428ed3bb98 Author: Martin Sustrik Date: Thu Sep 10 16:59:22 2009 +0200 classify error from async connect as network related or 0MQ bugs src/tcp_connecter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f674c9269e04546da22e45ef6fff9303441680ea Author: Martin Sustrik Date: Thu Sep 10 16:32:06 2009 +0200 ZMQII-2: SIGSEGV in zmq_connecter_init_t::read src/zmq_decoder.cpp | 2 +- src/zmq_encoder.cpp | 2 +- src/zmq_engine.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) commit 93e70ee583489034c9f3b92fb87b374707afd5d5 Author: Martin Sustrik Date: Thu Sep 10 15:20:54 2009 +0200 throughput tests use P2P sockets consistently perf/cpp/remote_thr.cpp | 2 +- perf/java/local_thr.java | 2 +- perf/java/remote_thr.java | 2 +- perf/ruby/local_thr.rb | 2 +- perf/ruby/remote_thr.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 95944551be93665fe4dcadbe00168da553b7d82f Merge: 5acef9f b3f32e2 Author: malosek Date: Thu Sep 10 12:04:26 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit b3f32e219ec15a582b6fd03b155e0861443690f6 Author: Martin Sustrik Date: Thu Sep 10 12:00:47 2009 +0200 ZMQII-3: cheap and nasty implementation of message filtering c/zmq.h | 2 ++ src/Makefile.am | 2 ++ src/app_thread.cpp | 18 +++++++++-- src/socket_base.cpp | 5 ++++ src/socket_base.hpp | 2 +- src/sub.cpp | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/sub.hpp | 51 ++++++++++++++++++++++++++++++++ 7 files changed, 159 insertions(+), 3 deletions(-) commit 5acef9fc96280df934176b02de724eb904e4bba3 Author: malosek Date: Thu Sep 10 11:21:05 2009 +0200 added --with-pgm option, libpgm-1.2.14 build within 0mq build system Makefile.am | 3 + configure.in | 119 +++++++++++++++++++++++++++++++-- foreign/openpgm/libpgm-1.2.14.tar.bz2 | Bin 0 -> 280029 bytes src/Makefile.am | 64 +++++++++++++++++- src/platform.hpp.in | 3 + 5 files changed, 183 insertions(+), 6 deletions(-) commit d81d3412520c9fed36f39462840c7d35815f4a87 Merge: 1864832 4cc923b Author: Martin Sustrik Date: Wed Sep 9 12:14:04 2009 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit 1864832adaa173b7c85d4321b8ff8c396ce6b9af Author: Martin Sustrik Date: Wed Sep 9 12:13:19 2009 +0200 building zmq.jar on win32 fixed msvc/java/java.vcproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4cc923b0252a0f1f0ee52508b7a3108e8e3c0950 Author: malosek Date: Wed Sep 9 11:19:05 2009 +0200 Stop configure, when could not link with libuuid configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 65b8b2d2c78867ee2671f995f5f7c805abd00df2 Merge: 305b81d d743d97 Author: Martin Sustrik Date: Wed Sep 9 11:08:39 2009 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit 305b81dbdf63ab1b66733a330b2c64a980712b8b Author: Martin Sustrik Date: Wed Sep 9 11:07:48 2009 +0200 higher precision time measurement in python perf tests perf/python/local_thr.py | 8 ++++---- perf/python/remote_lat.py | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) commit d743d97e365b1d430b6c63de2782392a5f8f5305 Author: malosek Date: Wed Sep 9 10:37:40 2009 +0200 Updated AUTHORS, ChangeLog, README and added COPYING.LESSER files AUTHORS | 38 ++++++++++ COPYING.LESSER | 166 ++++++++++++++++++++++++++++++++++++++++ ChangeLog | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README | 4 + 4 files changed, 439 insertions(+) commit 4d07d7cabe1a865812cf5d95a84557880e3c3096 Author: Martin Sustrik Date: Wed Sep 9 10:08:46 2009 +0200 fix of async connect on win32 src/tcp_connecter.cpp | 4 +++- src/zmq_connecter.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) commit c99f39abc669084fd3a94675ee98e235448ad5a4 Merge: 37d8371 cb78991 Author: Martin Sustrik Date: Wed Sep 9 09:07:11 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 37d8371967308ab1e541cf58b91e368b3e0b526c Author: Martin Sustrik Date: Wed Sep 9 09:03:30 2009 +0200 async connect bug fixed src/zmq_connecter.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit cb78991f8e20fa35d99fa209be659c0aed59de47 Merge: 734a62c d3fb9f9 Author: malosek Date: Tue Sep 8 16:55:28 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 734a62c12d2e2fb009ccf97d7d188060a474cc17 Author: malosek Date: Tue Sep 8 16:55:03 2009 +0200 Sparc solaris port configure.in | 1 + src/devpoll.cpp | 6 ++++-- src/object.hpp | 2 +- src/tcp_socket.cpp | 3 ++- src/zmq.cpp | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) commit d3fb9f90af73a46e02b7e8780a8db95a31360d56 Author: Martin Sustrik Date: Tue Sep 8 16:16:01 2009 +0200 missing java MSVC project added msvc/java/java.vcproj | 244 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 244 insertions(+) commit dadfd243649fbde768a24c677fa952f90d00589d Merge: ef34c94 844b590 Author: Martin Sustrik Date: Tue Sep 8 15:11:19 2009 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit ef34c94c3a9cbda87b0a4512ec56415b023aff0b Author: Martin Sustrik Date: Tue Sep 8 15:10:10 2009 +0200 win build for python msvc/msvc.sln | 8 +++ msvc/python/python.vcproj | 176 +++++++++++++++++++++++++++++++++++++++++++++ python/pyzmq.cpp | 9 +++ 3 files changed, 193 insertions(+) commit 844b590b5e348d8513ed574f6548cc0be41574af Author: malosek Date: Tue Sep 8 15:06:08 2009 +0200 added libzmq.pc.in file configure.in | 2 +- src/Makefile.am | 2 ++ src/libzmq.pc.in | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) commit b3fc14522574ccad233bee02ea135d8a93fb2441 Merge: 2a4a10c 3069b6b Author: malosek Date: Tue Sep 8 14:54:52 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 2a4a10c8be92c5ce6314378fc4de163888075279 Author: malosek Date: Tue Sep 8 14:54:04 2009 +0200 build system tuning Makefile.am | 8 ++++++-- configure.in | 37 +++++++++++++++++++++++++++++++++---- java/Makefile.am | 6 +++--- perf/Makefile.am | 25 +++++++++++++++++++++++-- perf/java/Makefile.am | 5 +++++ perf/python/Makefile.am | 6 +----- perf/ruby/Makefile.am | 1 + python/pyzmq.cpp | 2 +- ruby/rbzmq.cpp | 3 ++- src/Makefile.am | 2 +- 10 files changed, 76 insertions(+), 19 deletions(-) commit 3069b6bd54486346f7bfcce58d6a5e34d129965c Author: Martin Sustrik Date: Tue Sep 8 13:55:13 2009 +0200 win port of java binding + java perf tests java/Context.cpp | 7 ++ java/Message.cpp | 138 --------------------------------- java/Socket.cpp | 7 ++ java/org/zmq/Socket.java | 2 +- msvc/j_local_lat/j_local_lat.vcproj | 78 +++++++++++++++++++ msvc/j_local_thr/j_local_thr.vcproj | 78 +++++++++++++++++++ msvc/j_remote_lat/j_remote_lat.vcproj | 78 +++++++++++++++++++ msvc/j_remote_thr/j_remote_thr.vcproj | 78 +++++++++++++++++++ msvc/msvc.sln | 45 +++++++++++ perf/c/local_thr.c | 3 +- 10 files changed, 374 insertions(+), 140 deletions(-) commit ec6822a477b89ac77afc90425bf36c4829dbef3d Author: unknown Date: Tue Sep 8 11:30:49 2009 +0200 win port for c and cpp perf tests c/zmq.h | 8 +- cpp/zmq.hpp | 7 ++ msvc/c_local_lat/c_local_lat.vcproj | 176 +++++++++++++++++++++++++++++ msvc/c_local_thr/c_local_thr.vcproj | 176 +++++++++++++++++++++++++++++ msvc/c_remote_lat/c_remote_lat.vcproj | 176 +++++++++++++++++++++++++++++ msvc/c_remote_thr/c_remote_thr.vcproj | 176 +++++++++++++++++++++++++++++ msvc/cpp_local_lat/cpp_local_lat.vcproj | 176 +++++++++++++++++++++++++++++ msvc/cpp_local_thr/cpp_local_thr.vcproj | 176 +++++++++++++++++++++++++++++ msvc/cpp_remote_lat/cpp_remote_lat.vcproj | 176 +++++++++++++++++++++++++++++ msvc/cpp_remote_thr/cpp_remote_thr.vcproj | 176 +++++++++++++++++++++++++++++ msvc/libzmq/libzmq.vcproj | 10 +- msvc/msvc.sln | 72 ++++++++++++ perf/c/local_lat.c | 3 +- perf/c/local_thr.c | 24 ++-- perf/c/remote_lat.c | 19 +--- perf/c/remote_thr.c | 3 +- perf/cpp/local_lat.cpp | 3 +- perf/cpp/local_thr.cpp | 20 +--- perf/cpp/remote_lat.cpp | 16 +-- perf/cpp/remote_thr.cpp | 3 +- src/fd_signaler.cpp | 2 +- src/tcp_connecter.cpp | 18 ++- src/tcp_listener.cpp | 89 ++++++++++++++- src/tcp_socket.cpp | 5 + src/zmq.cpp | 67 ++++++++++- 25 files changed, 1702 insertions(+), 75 deletions(-) commit b71c3005e68d02f800ff09bcacece79d167bff75 Author: malosek Date: Mon Sep 7 17:06:47 2009 +0200 include directory split into c and cpp dirs, added --with-c and --with-cpp configure options Makefile.am | 2 - autogen.sh | 8 +- c/zmq.h | 206 +++++++++++++++++++++++++++++++++++++ configure.in | 45 +++++--- cpp/zmq.hpp | 276 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/zmq.h | 206 ------------------------------------- include/zmq.hpp | 276 -------------------------------------------------- perf/c/Makefile.am | 4 +- perf/cpp/Makefile.am | 4 +- src/Makefile.am | 15 ++- src/app_thread.cpp | 2 +- src/dispatcher.cpp | 2 +- src/i_inout.hpp | 2 +- src/io_thread.cpp | 2 +- src/msg_content.hpp | 2 +- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/socket_base.cpp | 2 +- src/zmq.cpp | 2 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.hpp | 2 +- 21 files changed, 547 insertions(+), 517 deletions(-) commit f895426c1885729f4a4a20b1eb543a92915aed85 Author: unknown Date: Mon Sep 7 15:41:43 2009 +0200 initial changes for win port include/zmq.h | 5 +- msvc/libzmq/libzmq.vcproj | 520 +++++++++++++++++++++++++++++++++++++++++++++ msvc/msvc.sln | 20 ++ msvc/platform.hpp | 59 +++++ src/app_thread.cpp | 2 + src/fd_signaler.cpp | 1 + src/options.hpp | 2 + src/pipe.cpp | 4 +- src/tcp_connecter.cpp | 75 ++++++- src/tcp_listener.cpp | 1 - src/tcp_socket.cpp | 74 ++++++- src/uuid.cpp | 13 +- src/uuid.hpp | 11 +- src/zmq_connecter.cpp | 2 +- 14 files changed, 764 insertions(+), 25 deletions(-) commit 87ccbb9fae0f9234f82f9a9ec6a215f5e73209d3 Merge: 67253f3 d62c742 Author: Martin Sustrik Date: Mon Sep 7 11:10:58 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit d62c74232a4c1edd38004933afd0c7dc119bd98b Merge: 11a6cb9 63b56d7 Author: Martin Sustrik Date: Mon Sep 7 11:01:42 2009 +0200 Merge branch 'master' of git://github.com/sustrik/zeromq2 commit 11a6cb925f7ff3d17f48edccc886839b4d49ef0b Author: Martin Sustrik Date: Mon Sep 7 11:00:20 2009 +0200 Ruby binding functional perf/ruby/local_lat.rb | 66 ++----- perf/ruby/local_thr.rb | 90 +++------- perf/ruby/remote_lat.rb | 64 +++---- perf/ruby/remote_thr.rb | 48 ++--- ruby/Makefile.am | 2 +- ruby/rbzmq.cpp | 292 ++++++++++++++++++++++++++++++ ruby/zmq.cpp | 460 ----------------------------------------------- 7 files changed, 382 insertions(+), 640 deletions(-) commit 67253f3186488db93dee23bd9194419f58f0b1d3 Author: Martin Sustrik Date: Sat Sep 5 09:30:12 2009 +0200 Java perf tests added java/Context.cpp | 15 ++--- java/Makefile.am | 22 ++----- java/Socket.cpp | 140 +++++++++++++++++++++++---------------------- java/org/zmq/Context.java | 3 + java/org/zmq/Message.java | 66 --------------------- java/org/zmq/Socket.java | 42 +++++++------- perf/cpp/local_thr.cpp | 2 +- perf/cpp/remote_lat.cpp | 6 +- perf/java/local_lat.java | 55 ++++++++++++++++++ perf/java/local_thr.java | 65 +++++++++++++++++++++ perf/java/remote_lat.java | 60 +++++++++++++++++++ perf/java/remote_thr.java | 53 +++++++++++++++++ 12 files changed, 343 insertions(+), 186 deletions(-) commit 63b56d7fb38624c32111f9188d54b6fefb10a0e5 Author: Martin Sustrik Date: Fri Sep 4 16:21:39 2009 +0200 python perf tests are included into distribution package configure.in | 3 ++- perf/Makefile.am | 4 ++-- perf/python/Makefile.am | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) commit 4307baf7bcc71ca91da0175e79cdfbf6cc1ad770 Author: Martin Sustrik Date: Fri Sep 4 16:02:41 2009 +0200 python binding functional perf/c/local_lat.c | 11 +++++++---- perf/c/local_thr.c | 10 ++++++---- perf/c/remote_lat.c | 11 +++++++---- perf/c/remote_thr.c | 11 +++++++---- perf/cpp/local_lat.cpp | 8 ++++---- perf/cpp/local_thr.cpp | 8 ++++---- perf/cpp/remote_lat.cpp | 8 ++++---- perf/cpp/remote_thr.cpp | 8 ++++---- perf/python/local_lat.py | 6 +++--- perf/python/remote_lat.py | 4 ++-- perf/python/remote_thr.py | 2 +- src/app_thread.cpp | 4 +--- src/dispatcher.cpp | 36 +++++++++++++++++++++++++++++++++++- src/dispatcher.hpp | 25 ++++++++++++++++++++++--- src/object.cpp | 5 +++++ src/object.hpp | 1 + src/session.cpp | 7 ++++++- src/socket_base.cpp | 12 +++++++++++- src/zmq.cpp | 3 +-- 19 files changed, 131 insertions(+), 49 deletions(-) commit 450b31c3b263ee6ceea27517a2a969d0c74bcd7e Author: Martin Sustrik Date: Fri Sep 4 11:08:13 2009 +0200 bug in python binding fixed python/pyzmq.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit 103cbee6a509e55ff5def82eb5ec3ef7feb319a3 Author: Martin Sustrik Date: Fri Sep 4 09:51:42 2009 +0200 couple of bugs fixed src/Makefile.am | 6 +++++- src/tcp_socket.cpp | 2 +- src/zmq_connecter_init.cpp | 1 - src/zmq_engine.cpp | 7 ++----- src/zmq_listener_init.cpp | 3 ++- 5 files changed, 10 insertions(+), 9 deletions(-) commit 4914e5c9d192ac6763e5da6fa28ea503ee769bf0 Author: Martin Sustrik Date: Wed Sep 2 16:16:25 2009 +0200 O(1) socket removal src/app_thread.cpp | 12 ++++++------ src/socket_base.cpp | 14 +++++++++++++- src/socket_base.hpp | 7 +++++++ 3 files changed, 26 insertions(+), 7 deletions(-) commit f92de9b2a9ad73fd7cd966e65b5a06b725e779fc Author: Martin Sustrik Date: Wed Sep 2 14:59:53 2009 +0200 bug during terminal shutdown fixed perf/c/local_lat.c | 13 +++++++++---- perf/c/local_thr.c | 5 ++++- perf/c/remote_lat.c | 15 ++++++++++----- perf/c/remote_thr.c | 3 +++ perf/cpp/local_thr.cpp | 2 +- perf/cpp/remote_lat.cpp | 2 +- src/session.cpp | 18 +++++++++++++----- 7 files changed, 41 insertions(+), 17 deletions(-) commit 702fdbb5dd6a83e7f656e8d1190e695ebb636765 Author: Martin Sustrik Date: Wed Sep 2 11:58:39 2009 +0200 messages that may have been received in the init phase are flushed immediately after engine is plugged in src/zmq_engine.cpp | 3 +++ 1 file changed, 3 insertions(+) commit 75a5a8732cd5be1bb3bff608e352bf4ac624ffd4 Author: Martin Sustrik Date: Wed Sep 2 10:59:31 2009 +0200 --disable-shared & C perf tests: a better way configure.in | 1 + perf/c/Makefile.am | 8 ++++---- src/platform.hpp.in | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) commit 947b46319314dfab0e545282e9ccfc708d6f57e3 Author: Martin Sustrik Date: Wed Sep 2 10:46:10 2009 +0200 building C perf tests with --disable-shared fixed perf/c/Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5e08a89d1c0edf44e15f262dd0f27a1c03bcd699 Merge: 6a5120b 1f06d99 Author: Martin Sustrik Date: Wed Sep 2 10:23:01 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 6a5120b1f1c48d19b777f76ac756b00fb624d110 Author: Martin Sustrik Date: Wed Sep 2 10:22:23 2009 +0200 python extension & perf tests include/zmq.h | 6 +- perf/c/local_thr.c | 6 +- perf/cpp/local_thr.cpp | 5 +- perf/python/local_lat.py | 42 +-- perf/python/local_thr.py | 44 +-- perf/python/remote_lat.py | 43 +-- perf/python/remote_thr.py | 17 +- python/pyzmq.cpp | 924 ++++++++++++++++----------------------------- src/i_endpoint.hpp | 2 + src/session.cpp | 29 +- src/session.hpp | 13 +- src/socket_base.cpp | 30 +- src/socket_base.hpp | 2 + 13 files changed, 452 insertions(+), 711 deletions(-) commit 1f06d99a0f563fdc32e9c00392f9875ba3009593 Author: Martin Hurton Date: Mon Aug 31 13:11:46 2009 +0200 Add Java binding Makefile.am | 8 +- configure.in | 54 ++++++++- java/Context.cpp | 92 +++++++++++++++ java/Makefile.am | 72 ++++++++++++ java/Message.cpp | 138 +++++++++++++++++++++++ java/Socket.cpp | 276 +++++++++++++++++++++++++++++++++++++++++++++ java/org/zmq/Context.java | 47 ++++++++ java/org/zmq/Message.java | 66 +++++++++++ java/org/zmq/Socket.java | 141 +++++++++++++++++++++++ 9 files changed, 891 insertions(+), 3 deletions(-) commit 0aacee389fdb553ef9925d0135eefcb501a67726 Author: Martin Hurton Date: Mon Aug 31 11:31:32 2009 +0200 POSIX threads don't use errno to report errors Fix simple_semaphore to follow POSIX threads convention for reporting errors. src/err.hpp | 9 +++++---- src/simple_semaphore.hpp | 12 ++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) commit 72fdf47d16c8d3ecd9da657b4649978e414d775c Author: Martin Sustrik Date: Mon Aug 31 12:50:53 2009 +0200 python perf tests added perf/python/local_lat.py | 67 ++++++++++++++++++++++++++++++++++++++++++++ perf/python/local_thr.py | 68 +++++++++++++++++++++++++++++++++++++++++++++ perf/python/remote_lat.py | 59 +++++++++++++++++++++++++++++++++++++++ perf/python/remote_thr.py | 50 +++++++++++++++++++++++++++++++++ 4 files changed, 244 insertions(+) commit b6d345f4a6402cf2e831a8b9d113f036b394a0bc Author: Martin Sustrik Date: Mon Aug 31 12:45:42 2009 +0200 Ruby perf tests added perf/ruby/local_lat.rb | 75 +++++++++++++++++++++++++++++++++++++++ perf/ruby/local_thr.rb | 90 +++++++++++++++++++++++++++++++++++++++++++++++ perf/ruby/remote_lat.rb | 61 ++++++++++++++++++++++++++++++++ perf/ruby/remote_thr.rb | 55 +++++++++++++++++++++++++++++ 4 files changed, 281 insertions(+) commit 314deb61851a0ddc37228d24e9f4eb106461370a Author: Martin Sustrik Date: Sun Aug 30 15:47:39 2009 +0200 build system for perf/C and perf/C++ Makefile.am | 4 ++-- configure.in | 3 ++- include/zmq.h | 24 ++++++++++++------------ perf/Makefile.am | 2 ++ perf/c/Makefile.am | 20 ++++++++++++++++++++ perf/c/local_lat.c | 2 +- perf/c/local_thr.c | 19 ++++++++++--------- perf/c/remote_lat.c | 7 +++---- perf/c/remote_thr.c | 4 ++-- perf/cpp/Makefile.am | 20 ++++++++++++++++++++ perf/cpp/local_lat.cpp | 3 ++- perf/cpp/local_thr.cpp | 10 ++++++---- perf/cpp/remote_lat.cpp | 3 ++- perf/cpp/remote_thr.cpp | 3 ++- 14 files changed, 86 insertions(+), 38 deletions(-) commit 6c36673949b2256158e8914119d218dce311c585 Author: Martin Sustrik Date: Sun Aug 30 15:03:16 2009 +0200 C perf tests added perf/c/local_lat.c | 70 +++++++++++++++++++++++++++++++++++++++ perf/c/local_thr.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++ perf/c/remote_lat.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++ perf/c/remote_thr.c | 67 +++++++++++++++++++++++++++++++++++++ 4 files changed, 318 insertions(+) commit 4617fd9e9c50a9fa3a8cbf3b25e6061e3a8f10c8 Author: Martin Sustrik Date: Sun Aug 30 09:14:15 2009 +0200 c++ perf tests added .gitignore | 12 +++++++- perf/cpp/local_lat.cpp | 52 ++++++++++++++++++++++++++++++++++ perf/cpp/local_thr.cpp | 72 +++++++++++++++++++++++++++++++++++++++++++++++ perf/cpp/remote_lat.cpp | 69 +++++++++++++++++++++++++++++++++++++++++++++ perf/cpp/remote_thr.cpp | 50 ++++++++++++++++++++++++++++++++ 5 files changed, 254 insertions(+), 1 deletion(-) commit 176879e5bbce6115ff5741f2426f689bda312109 Author: Martin Sustrik Date: Sun Aug 30 08:18:31 2009 +0200 engine virtualised; chatroom example removed .gitignore | 5 +++ Makefile.am | 5 ++- configure.in | 3 +- examples/Makefile.am | 2 -- examples/chat/Makefile.am | 15 --------- examples/chat/chatroom.cpp | 74 -------------------------------------------- examples/chat/display.cpp | 55 -------------------------------- examples/chat/prompt.cpp | 61 ------------------------------------ src/Makefile.am | 1 + src/command.hpp | 2 +- src/i_engine.hpp | 43 +++++++++++++++++++++++++ src/object.cpp | 5 ++- src/object.hpp | 4 +-- src/owned.cpp | 2 +- src/owned.hpp | 2 +- src/session.cpp | 4 +-- src/session.hpp | 4 +-- src/zmq_engine.hpp | 9 +++--- 18 files changed, 67 insertions(+), 229 deletions(-) commit 1d650934e477be32db9a3c64de077deed0416689 Author: tamara Date: Sat Aug 29 11:31:32 2009 +0200 Ruby bidning added Makefile.am | 8 +- configure.in | 57 ++++++- ruby/Makefile.am | 11 ++ ruby/extconf.rb | 24 +++ ruby/zmq.cpp | 460 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/platform.hpp.in | 3 + 6 files changed, 559 insertions(+), 4 deletions(-) commit 3666a49022f84b3d1888f630a78f3f8f28aadde1 Author: Martin Sustrik Date: Sat Aug 29 10:32:21 2009 +0200 bug in identifying current thread fixed src/app_thread.cpp | 8 +++++--- src/app_thread.hpp | 9 ++++++--- src/thread.cpp | 20 ++++++++++++++++++++ src/thread.hpp | 9 +++++++++ 4 files changed, 40 insertions(+), 6 deletions(-) commit 6996ef6f1a0a50a754608df9444e425d0900b143 Author: Martin Sustrik Date: Sat Aug 29 09:41:50 2009 +0200 improved error handling include/zmq.hpp | 127 +++++++++++++++++++++----------------------------- src/ip.cpp | 3 +- src/tcp_listener.cpp | 9 ++-- src/tcp_listener.hpp | 5 +- src/zmq_listener.cpp | 4 -- 5 files changed, 61 insertions(+), 87 deletions(-) commit cb09c6951e2c4405318b422a1f9213af3e4b6b8a Author: Martin Sustrik Date: Fri Aug 28 16:51:46 2009 +0200 pipe deallocation added src/command.hpp | 11 +++++++ src/dispatcher.cpp | 20 +++++++++++++ src/dispatcher.hpp | 18 ++++++++++++ src/i_endpoint.hpp | 2 ++ src/object.cpp | 44 ++++++++++++++++++++++++++++ src/object.hpp | 8 +++++ src/pipe.cpp | 81 +++++++++++++++++++++++++++++++++++++++++++++++++-- src/pipe.hpp | 30 ++++++++++++++++--- src/session.cpp | 18 ++++++++++++ src/session.hpp | 2 ++ src/socket_base.cpp | 80 +++++++++++++++++++++++++++++++++++++------------- src/socket_base.hpp | 13 +++------ 12 files changed, 290 insertions(+), 37 deletions(-) commit 2dd501651592baa7f9e49f52e1321ae2b9b4e126 Author: Martin Sustrik Date: Thu Aug 27 16:24:21 2009 +0200 multiple bugs fixed src/i_inout.hpp | 8 ++++++++ src/pipe.hpp | 3 ++- src/session.cpp | 13 ++++++++++++- src/session.hpp | 1 + src/zmq_connecter_init.cpp | 6 ++++++ src/zmq_connecter_init.hpp | 1 + src/zmq_encoder.cpp | 1 - src/zmq_engine.cpp | 5 ++++- src/zmq_listener_init.cpp | 33 ++++++++++++++++++++++----------- src/zmq_listener_init.hpp | 5 +++++ 10 files changed, 61 insertions(+), 15 deletions(-) commit 67194267f89d63391288600f127205a2b7a8a5ae Merge: 99c5d92 67c69f9 Author: Martin Sustrik Date: Thu Aug 27 10:55:26 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 99c5d9283622a0b37ee80f83ff4875c059fc5990 Author: Martin Sustrik Date: Thu Aug 27 10:54:28 2009 +0200 pipes added include/zmq.h | 2 +- src/Makefile.am | 2 + src/app_thread.cpp | 26 +++--- src/app_thread.hpp | 4 +- src/command.hpp | 11 ++- src/config.hpp | 8 ++ src/i_endpoint.hpp | 33 +++++++ src/object.cpp | 30 +++++- src/object.hpp | 9 +- src/pipe.cpp | 112 ++++++++++++++++++++++ src/pipe.hpp | 102 ++++++++++++++++++++ src/session.cpp | 56 ++++++++++- src/session.hpp | 24 ++++- src/socket_base.cpp | 227 +++++++++++++++++++++++++++++++++++++++++++-- src/socket_base.hpp | 42 ++++++++- src/ypipe.hpp | 22 ++--- src/yqueue.hpp | 2 +- src/zmq_encoder.cpp | 4 +- src/zmq_engine.cpp | 7 +- src/zmq_engine.hpp | 4 + src/zmq_listener_init.cpp | 3 +- 21 files changed, 680 insertions(+), 50 deletions(-) commit 67c69f952c956fb151c654726b4fc67e122722ff Author: Martin Hurton Date: Wed Aug 26 15:50:37 2009 +0200 make configure respect --with-python option configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aacdb7a454686bfac93164d0e67e785658d48a3c Author: tamara Date: Mon Aug 24 12:04:15 2009 +0200 python build fix Makefile.am | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 77bc3790fa9e781ad26ec881175d22d807e16acf Author: tamara Date: Mon Aug 24 11:17:16 2009 +0200 python extension added Makefile.am | 4 +- configure.in | 59 +++- python/Makefile.am | 7 + python/pyzmq.cpp | 756 ++++++++++++++++++++++++++++++++++++++++++++++++++++ python/setup.py.in | 14 + 5 files changed, 837 insertions(+), 3 deletions(-) commit 6be4b0143793ab5ceebc5d9d6bbe5c2f1333a0d2 Author: Martin Sustrik Date: Fri Aug 21 14:29:22 2009 +0200 session management implemented include/zmq.h | 28 +++++------ include/zmq.hpp | 11 +++-- src/Makefile.am | 10 ++-- src/i_inout.hpp | 4 +- src/msg.hpp | 49 ------------------- src/msg_content.hpp | 50 ++++++++++++++++++++ src/object.cpp | 5 +- src/object.hpp | 4 ++ src/owned.cpp | 10 +++- src/owned.hpp | 4 ++ src/pipe.hpp | 2 +- src/session.cpp | 39 +++++++++++---- src/session.hpp | 15 ++++-- src/socket_base.cpp | 77 ++++++++++++++++++++---------- src/socket_base.hpp | 24 ++++++---- src/zmq.cpp | 111 +++++++++++++++++++++++-------------------- src/zmq_connecter.cpp | 11 +++-- src/zmq_connecter.hpp | 10 ++-- src/zmq_connecter_init.cpp | 94 +++++++++++++++++++++++++++++++++++++ src/zmq_connecter_init.hpp | 75 +++++++++++++++++++++++++++++ src/zmq_decoder.hpp | 2 +- src/zmq_encoder.hpp | 2 +- src/zmq_init.cpp | 112 -------------------------------------------- src/zmq_init.hpp | 82 -------------------------------- src/zmq_listener.cpp | 5 +- src/zmq_listener_init.cpp | 96 +++++++++++++++++++++++++++++++++++++ src/zmq_listener_init.hpp | 71 ++++++++++++++++++++++++++++ 27 files changed, 621 insertions(+), 382 deletions(-) commit a801b6d8b37557ccfb53030dca22f89a3f99b59c Author: Martin Sustrik Date: Thu Aug 20 11:32:23 2009 +0200 couple of bugs in shutdown mechanism fixed src/command.hpp | 11 +++++++--- src/object.cpp | 43 ++++++++++++++++++++++++++++++++------- src/object.hpp | 19 +++++++++++------- src/owned.cpp | 53 ++++++++++++++++++++++++------------------------- src/owned.hpp | 33 ++++++++++++++++++++---------- src/session.cpp | 5 ++++- src/session.hpp | 2 +- src/socket_base.cpp | 40 +++++++++++++++++++++++++++++++++++-- src/socket_base.hpp | 26 +++++++++++++++++++++--- src/zmq_connecter.cpp | 4 ++-- src/zmq_connecter.hpp | 2 +- src/zmq_engine.cpp | 3 +-- src/zmq_init.cpp | 8 +++++--- src/zmq_init.hpp | 2 +- src/zmq_listener.cpp | 4 ++-- src/zmq_listener.hpp | 2 +- 16 files changed, 184 insertions(+), 73 deletions(-) commit 131f2e309668d1e64cfcb4aeb869665d8018bcfe Author: Martin Sustrik Date: Mon Aug 17 14:07:34 2009 +0200 subscribe API removed examples/chat/display.cpp | 1 - include/zmq.h | 3 --- include/zmq.hpp | 6 ------ src/socket_base.cpp | 5 ----- src/socket_base.hpp | 1 - src/zmq.cpp | 5 ----- 6 files changed, 21 deletions(-) commit 059beca59d39d90a8ee0e1b07f840994962ea89e Author: Martin Sustrik Date: Wed Aug 12 09:40:16 2009 +0200 listener/connecter/init/session added include/zmq.h | 2 +- src/Makefile.am | 13 +++ src/atomic.hpp | 310 ------------------------------------------------- src/i_inout.hpp | 37 ++++++ src/io_object.cpp | 47 +------- src/io_object.hpp | 50 +++----- src/options.cpp | 29 +++++ src/options.hpp | 42 +++++++ src/owned.cpp | 74 ++++++++++++ src/owned.hpp | 82 +++++++++++++ src/session.cpp | 58 +++++++++ src/session.hpp | 57 +++++++++ src/socket_base.cpp | 29 ++--- src/socket_base.hpp | 8 +- src/zmq_connecter.cpp | 36 +++--- src/zmq_connecter.hpp | 17 ++- src/zmq_decoder.cpp | 78 +++++++++++++ src/zmq_decoder.hpp | 57 +++++++++ src/zmq_encoder.cpp | 76 ++++++++++++ src/zmq_encoder.hpp | 55 +++++++++ src/zmq_engine.cpp | 107 ++++++++++++++++- src/zmq_engine.hpp | 33 +++++- src/zmq_init.cpp | 110 ++++++++++++++++++ src/zmq_init.hpp | 82 +++++++++++++ src/zmq_listener.cpp | 25 ++-- src/zmq_listener.hpp | 11 +- 26 files changed, 1070 insertions(+), 455 deletions(-) commit bda766ab401b6c565fe9c2d0bc80c11bbbe84488 Author: Martin Sustrik Date: Sun Aug 9 16:30:22 2009 +0200 redundant interface (i_api) removed src/Makefile.am | 2 -- src/app_thread.cpp | 5 ++--- src/app_thread.hpp | 6 ++--- src/dispatcher.cpp | 3 +-- src/dispatcher.hpp | 2 +- src/i_api.hpp | 43 ----------------------------------- src/i_poll_events.hpp | 60 ++++++++++++++++++++++++------------------------- src/socket_base.hpp | 21 +++++++++-------- src/zmq.cpp | 19 ++++++++-------- 9 files changed, 57 insertions(+), 104 deletions(-) commit 9f1f823b7b69ced56bdb0416feef71230cc7fd55 Author: Martin Sustrik Date: Sun Aug 9 16:12:09 2009 +0200 zmq_listener/zmq_connecter implemented src/Makefile.am | 2 + src/io_object.cpp | 13 +++--- src/io_object.hpp | 18 ++++---- src/socket_base.cpp | 12 +++++- src/tcp_connecter.cpp | 24 ++++++----- src/tcp_connecter.hpp | 9 +++- src/zmq_connecter.cpp | 110 +++++++++++++++++++++++++++++++++++++++++++++++++ src/zmq_connecter.hpp | 70 +++++++++++++++++++++++++++++++ src/zmq_listener.cpp | 9 ++-- src/zmq_listener.hpp | 5 +-- 10 files changed, 239 insertions(+), 33 deletions(-) commit 3147ff8523d9736039c4582f5f62c323b23940d1 Author: Martin Sustrik Date: Sun Aug 9 11:57:21 2009 +0200 getsockopt implemented include/zmq.h | 1 + src/socket_base.cpp | 69 +++++++++++++++++++++++++++++++++++++++++++++++---- src/socket_base.hpp | 10 ++++++++ 3 files changed, 75 insertions(+), 5 deletions(-) commit bde396f1561fb5e57e6e413a40d904586e186d42 Author: Martin Sustrik Date: Sun Aug 9 11:21:47 2009 +0200 fix to 3-thread synchronisation algorithm src/io_object.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++++++- src/io_object.hpp | 21 ++++++++++++++++++++- src/socket_base.cpp | 6 +++++- src/tcp_listener.cpp | 19 +++++++++++-------- src/tcp_listener.hpp | 11 +++++++++-- src/zmq_listener.cpp | 36 +++++++++++++++++++++++++++++++++++- src/zmq_listener.hpp | 15 +++++++++++++++ 7 files changed, 142 insertions(+), 14 deletions(-) commit 5b5b513330e96e3e08d0c2c60d03044091976420 Author: Martin Sustrik Date: Sun Aug 9 09:24:48 2009 +0200 socket options interface modeled as in BSD sockets include/zmq.h | 28 ++++++++++++++-------------- include/zmq.hpp | 14 ++++++++++---- src/Makefile.am | 2 ++ src/epoll.cpp | 4 +++- src/i_api.hpp | 6 ++++-- src/io_object.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++++- src/io_object.hpp | 23 ++++++++++++++++++----- src/io_thread.hpp | 2 +- src/socket_base.cpp | 33 ++++++++++++++++++++------------- src/socket_base.hpp | 9 +++++---- src/zmq.cpp | 13 +++++++++---- src/zmq_engine.cpp | 35 +++++++++++++++++++++++++++++++++++ src/zmq_engine.hpp | 47 +++++++++++++++++++++++++++++++++++++++++++++++ src/zmq_listener.cpp | 9 +++++++-- src/zmq_listener.hpp | 5 +++-- 15 files changed, 222 insertions(+), 53 deletions(-) commit a8b410e66c3c75809c8e9c01dd3e35c579f02347 Author: Martin Sustrik Date: Sat Aug 8 16:01:58 2009 +0200 lockfree interaction patter for 3 theads implemented include/zmq.hpp | 8 +-- src/Makefile.am | 14 +++-- src/app_thread.cpp | 37 +++++++++--- src/app_thread.hpp | 13 +++-- src/command.hpp | 59 ++++++++----------- src/context.cpp | 153 ------------------------------------------------ src/context.hpp | 122 -------------------------------------- src/dispatcher.cpp | 149 +++++++++++++++++++++++++++++++++++++++++++++++ src/dispatcher.hpp | 122 ++++++++++++++++++++++++++++++++++++++ src/err.hpp | 6 ++ src/i_api.hpp | 34 ++++++----- src/i_socket.hpp | 36 ------------ src/io_object.cpp | 41 +++++++++++++ src/io_object.hpp | 62 ++++++++++++++++++++ src/io_thread.cpp | 8 +-- src/io_thread.hpp | 2 +- src/mutex.hpp | 30 +++++----- src/object.cpp | 158 +++++++++++++++----------------------------------- src/object.hpp | 42 +++++--------- src/socket_base.cpp | 129 +++++++++++++++++++++++++++++++++++++++++ src/socket_base.hpp | 72 +++++++++++++++++++++++ src/zmq.cpp | 19 +++--- src/zmq_listener.cpp | 35 +++++++++++ src/zmq_listener.hpp | 46 +++++++++++++++ 24 files changed, 849 insertions(+), 548 deletions(-) commit 0b5cc026fbe7ccc6de66907be29471562a2d344d Author: Martin Sustrik Date: Thu Aug 6 12:51:32 2009 +0200 clean up - session/socket/engine stuff removed src/Makefile.am | 51 +-------- src/app_thread.cpp | 106 ++---------------- src/app_thread.hpp | 27 ++--- src/connecter.cpp | 189 ------------------------------- src/connecter.hpp | 99 ---------------- src/context.cpp | 139 +++-------------------- src/context.hpp | 52 +-------- src/data_distributor.cpp | 155 ------------------------- src/data_distributor.hpp | 70 ------------ src/devpoll.cpp | 9 +- src/devpoll.hpp | 3 +- src/dummy_aggregator.cpp | 111 ------------------ src/dummy_aggregator.hpp | 73 ------------ src/dummy_distributor.cpp | 85 -------------- src/dummy_distributor.hpp | 68 ----------- src/epoll.cpp | 10 +- src/epoll.hpp | 3 +- src/fair_aggregator.cpp | 143 ------------------------ src/fair_aggregator.hpp | 77 ------------- src/i_api.hpp | 42 +++---- src/i_demux.hpp | 57 ---------- src/i_engine.hpp | 53 --------- src/i_mux.hpp | 60 ---------- src/i_poller.hpp | 7 +- src/i_session.hpp | 37 ------ src/i_socket.hpp | 36 ++++++ src/i_thread.hpp | 38 ------- src/io_object.cpp | 37 ------ src/io_object.hpp | 51 --------- src/io_thread.cpp | 31 ----- src/io_thread.hpp | 27 +---- src/kqueue.cpp | 9 +- src/kqueue.hpp | 3 +- src/listener.cpp | 170 ---------------------------- src/listener.hpp | 110 ------------------ src/load_balancer.cpp | 130 --------------------- src/load_balancer.hpp | 73 ------------ src/object.cpp | 33 ------ src/object.hpp | 8 -- src/p2p.cpp | 29 ----- src/p2p.hpp | 42 ------- src/pipe.cpp | 47 -------- src/pipe.hpp | 23 +--- src/pipe_reader.cpp | 118 -------------------- src/pipe_reader.hpp | 89 --------------- src/pipe_writer.cpp | 120 -------------------- src/pipe_writer.hpp | 88 --------------- src/poll.cpp | 13 ++- src/poll.hpp | 3 +- src/pub.cpp | 38 ------- src/pub.hpp | 45 -------- src/rep.cpp | 29 ----- src/rep.hpp | 42 ------- src/req.cpp | 29 ----- src/req.hpp | 42 ------- src/safe_object.cpp | 76 ------------- src/safe_object.hpp | 68 ----------- src/select.cpp | 13 ++- src/select.hpp | 2 +- src/session.cpp | 273 --------------------------------------------- src/session.hpp | 107 ------------------ src/session_stub.cpp | 110 ------------------ src/session_stub.hpp | 83 -------------- src/socket_base.cpp | 267 -------------------------------------------- src/socket_base.hpp | 96 ---------------- src/sub.cpp | 45 -------- src/sub.hpp | 46 -------- src/zmq.cpp | 2 +- src/zmq_decoder.cpp | 79 ------------- src/zmq_decoder.hpp | 57 ---------- src/zmq_encoder.cpp | 75 ------------- src/zmq_encoder.hpp | 54 --------- src/zmq_tcp_engine.cpp | 185 ------------------------------ src/zmq_tcp_engine.hpp | 92 --------------- 74 files changed, 131 insertions(+), 4878 deletions(-) commit b8b4acef4c2ba1a169ce84c1fb4c70a5676ebba3 Author: Martin Sustrik Date: Thu Aug 6 10:47:34 2009 +0200 dispatcher renamed to context src/Makefile.am | 4 +- src/app_thread.cpp | 8 +- src/app_thread.hpp | 4 +- src/context.cpp | 266 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/context.hpp | 170 ++++++++++++++++++++++++++++++++ src/dispatcher.cpp | 266 --------------------------------------------------- src/dispatcher.hpp | 170 -------------------------------- src/io_thread.cpp | 8 +- src/io_thread.hpp | 2 +- src/object.cpp | 26 ++--- src/object.hpp | 6 +- src/pipe.hpp | 8 +- src/pipe_reader.cpp | 2 +- src/pipe_reader.hpp | 6 +- src/pipe_writer.hpp | 6 +- src/safe_object.cpp | 6 +- src/safe_object.hpp | 2 +- src/zmq.cpp | 15 ++- 18 files changed, 487 insertions(+), 488 deletions(-) commit 43fa72b7ee6b6d97b84a555ce8902cee855aeb72 Author: Martin Hurton Date: Mon Aug 3 11:59:55 2009 +0200 C++ binding uses exceptions to signal failure include/zmq.hpp | 83 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 73 insertions(+), 10 deletions(-) commit cc3755a16f00026af882ed14d122cc8aa6d50e82 Author: Martin Sustrik Date: Mon Aug 3 11:30:13 2009 +0200 renamed from zs to zmq .gitignore | 3 + Makefile.am | 2 +- configure.in | 38 ++++---- examples/chat/Makefile.am | 6 +- examples/chat/chatroom.cpp | 12 +-- examples/chat/display.cpp | 10 +- examples/chat/prompt.cpp | 8 +- include/zmq.h | 207 +++++++++++++++++++++++++++++++++++++++ include/zmq.hpp | 231 ++++++++++++++++++++++++++++++++++++++++++++ include/zs.h | 206 --------------------------------------- include/zs.hpp | 231 -------------------------------------------- src/Makefile.am | 10 +- src/app_thread.cpp | 70 +++++++------- src/app_thread.hpp | 8 +- src/atomic.hpp | 62 ++++++------ src/atomic_bitmap.hpp | 82 ++++++++-------- src/atomic_counter.hpp | 72 +++++++------- src/atomic_ptr.hpp | 72 +++++++------- src/command.hpp | 6 +- src/config.hpp | 6 +- src/connecter.cpp | 48 ++++----- src/connecter.hpp | 12 +-- src/data_distributor.cpp | 42 ++++---- src/data_distributor.hpp | 10 +- src/decoder.hpp | 6 +- src/devpoll.cpp | 38 ++++---- src/devpoll.hpp | 8 +- src/dispatcher.cpp | 52 +++++----- src/dispatcher.hpp | 8 +- src/dummy_aggregator.cpp | 34 +++---- src/dummy_aggregator.hpp | 8 +- src/dummy_distributor.cpp | 28 +++--- src/dummy_distributor.hpp | 8 +- src/encoder.hpp | 6 +- src/epoll.cpp | 36 +++---- src/epoll.hpp | 8 +- src/err.cpp | 8 +- src/err.hpp | 16 +-- src/fair_aggregator.cpp | 30 +++--- src/fair_aggregator.hpp | 8 +- src/fd.hpp | 8 +- src/fd_signaler.cpp | 54 +++++------ src/fd_signaler.hpp | 8 +- src/i_api.hpp | 14 +-- src/i_demux.hpp | 11 ++- src/i_engine.hpp | 8 +- src/i_mux.hpp | 11 ++- src/i_poll_events.hpp | 6 +- src/i_poller.hpp | 6 +- src/i_session.hpp | 10 +- src/i_signaler.hpp | 6 +- src/i_thread.hpp | 6 +- src/io_object.cpp | 6 +- src/io_object.hpp | 6 +- src/io_thread.cpp | 72 +++++++------- src/io_thread.hpp | 8 +- src/ip.cpp | 36 +++---- src/ip.hpp | 8 +- src/kqueue.cpp | 40 ++++---- src/kqueue.hpp | 8 +- src/listener.cpp | 42 ++++---- src/listener.hpp | 6 +- src/load_balancer.cpp | 32 +++--- src/load_balancer.hpp | 10 +- src/msg.hpp | 16 +-- src/mutex.hpp | 10 +- src/object.cpp | 88 ++++++++--------- src/object.hpp | 6 +- src/p2p.cpp | 4 +- src/p2p.hpp | 6 +- src/pipe.cpp | 14 +-- src/pipe.hpp | 10 +- src/pipe_reader.cpp | 26 ++--- src/pipe_reader.hpp | 8 +- src/pipe_writer.cpp | 30 +++--- src/pipe_writer.hpp | 8 +- src/platform.hpp.in | 26 ++--- src/poll.cpp | 40 ++++---- src/poll.hpp | 14 +-- src/pub.cpp | 6 +- src/pub.hpp | 8 +- src/rep.cpp | 4 +- src/rep.hpp | 6 +- src/req.cpp | 4 +- src/req.hpp | 6 +- src/safe_object.cpp | 14 +-- src/safe_object.hpp | 6 +- src/select.cpp | 40 ++++---- src/select.hpp | 10 +- src/session.cpp | 46 ++++----- src/session.hpp | 10 +- src/session_stub.cpp | 30 +++--- src/session_stub.hpp | 10 +- src/simple_semaphore.hpp | 12 +-- src/socket_base.cpp | 56 +++++------ src/socket_base.hpp | 14 +-- src/stdint.hpp | 6 +- src/sub.cpp | 8 +- src/sub.hpp | 8 +- src/tcp_connecter.cpp | 20 ++-- src/tcp_connecter.hpp | 6 +- src/tcp_listener.cpp | 20 ++-- src/tcp_listener.hpp | 6 +- src/tcp_socket.cpp | 18 ++-- src/tcp_socket.hpp | 6 +- src/thread.cpp | 14 +-- src/thread.hpp | 10 +- src/uuid.cpp | 40 ++++---- src/uuid.hpp | 18 ++-- src/windows.hpp | 4 +- src/wire.hpp | 6 +- src/ypipe.hpp | 8 +- src/ypollset.cpp | 10 +- src/ypollset.hpp | 6 +- src/yqueue.hpp | 10 +- src/zmq.cpp | 223 ++++++++++++++++++++++++++++++++++++++++++ src/zmq_decoder.cpp | 25 ++--- src/zmq_decoder.hpp | 10 +- src/zmq_encoder.cpp | 18 ++-- src/zmq_encoder.hpp | 10 +- src/zmq_tcp_engine.cpp | 44 ++++----- src/zmq_tcp_engine.hpp | 6 +- src/zs.cpp | 222 ------------------------------------------ 123 files changed, 1778 insertions(+), 1770 deletions(-) commit 183b6887644ac05c951a3f9143248ed86e91052f Author: Martin Sustrik Date: Thu Jul 30 13:53:46 2009 +0200 git ignoring intermediary files 0 files changed commit 4ed70a930202b103e7e80b8dc925e0aaa4622595 Author: Martin Sustrik Date: Wed Jul 29 12:07:54 2009 +0200 initial commit Makefile.am | 4 + autogen.sh | 29 +++++ configure.in | 188 +++++++++++++++++++++++++++ examples/Makefile.am | 2 + examples/chat/Makefile.am | 15 +++ examples/chat/chatroom.cpp | 74 +++++++++++ examples/chat/display.cpp | 56 ++++++++ examples/chat/prompt.cpp | 61 +++++++++ include/zs.h | 206 +++++++++++++++++++++++++++++ include/zs.hpp | 231 +++++++++++++++++++++++++++++++++ src/Makefile.am | 120 +++++++++++++++++ src/app_thread.cpp | 221 +++++++++++++++++++++++++++++++ src/app_thread.hpp | 95 ++++++++++++++ src/atomic.hpp | 310 ++++++++++++++++++++++++++++++++++++++++++++ src/atomic_bitmap.hpp | 286 ++++++++++++++++++++++++++++++++++++++++ src/atomic_counter.hpp | 197 ++++++++++++++++++++++++++++ src/atomic_ptr.hpp | 189 +++++++++++++++++++++++++++ src/command.hpp | 98 ++++++++++++++ src/config.hpp | 71 ++++++++++ src/connecter.cpp | 189 +++++++++++++++++++++++++++ src/connecter.hpp | 99 ++++++++++++++ src/data_distributor.cpp | 155 ++++++++++++++++++++++ src/data_distributor.hpp | 70 ++++++++++ src/decoder.hpp | 101 +++++++++++++++ src/devpoll.cpp | 224 ++++++++++++++++++++++++++++++++ src/devpoll.hpp | 110 ++++++++++++++++ src/dispatcher.cpp | 266 +++++++++++++++++++++++++++++++++++++ src/dispatcher.hpp | 170 ++++++++++++++++++++++++ src/dummy_aggregator.cpp | 111 ++++++++++++++++ src/dummy_aggregator.hpp | 73 +++++++++++ src/dummy_distributor.cpp | 85 ++++++++++++ src/dummy_distributor.hpp | 68 ++++++++++ src/encoder.hpp | 108 +++++++++++++++ src/epoll.cpp | 214 ++++++++++++++++++++++++++++++ src/epoll.hpp | 107 +++++++++++++++ src/err.cpp | 146 +++++++++++++++++++++ src/err.hpp | 90 +++++++++++++ src/fair_aggregator.cpp | 143 ++++++++++++++++++++ src/fair_aggregator.hpp | 77 +++++++++++ src/fd.hpp | 44 +++++++ src/fd_signaler.cpp | 278 +++++++++++++++++++++++++++++++++++++++ src/fd_signaler.hpp | 92 +++++++++++++ src/i_api.hpp | 39 ++++++ src/i_demux.hpp | 56 ++++++++ src/i_engine.hpp | 53 ++++++++ src/i_mux.hpp | 59 +++++++++ src/i_poll_events.hpp | 45 +++++++ src/i_poller.hpp | 89 +++++++++++++ src/i_session.hpp | 37 ++++++ src/i_signaler.hpp | 38 ++++++ src/i_thread.hpp | 38 ++++++ src/io_object.cpp | 37 ++++++ src/io_object.hpp | 51 ++++++++ src/io_thread.cpp | 177 +++++++++++++++++++++++++ src/io_thread.hpp | 99 ++++++++++++++ src/ip.cpp | 310 ++++++++++++++++++++++++++++++++++++++++++++ src/ip.hpp | 47 +++++++ src/kqueue.cpp | 214 ++++++++++++++++++++++++++++++ src/kqueue.hpp | 112 ++++++++++++++++ src/listener.cpp | 170 ++++++++++++++++++++++++ src/listener.hpp | 110 ++++++++++++++++ src/load_balancer.cpp | 130 +++++++++++++++++++ src/load_balancer.hpp | 73 +++++++++++ src/msg.hpp | 49 +++++++ src/mutex.hpp | 116 +++++++++++++++++ src/object.cpp | 294 +++++++++++++++++++++++++++++++++++++++++ src/object.hpp | 105 +++++++++++++++ src/p2p.cpp | 29 +++++ src/p2p.hpp | 42 ++++++ src/pipe.cpp | 47 +++++++ src/pipe.hpp | 57 ++++++++ src/pipe_reader.cpp | 118 +++++++++++++++++ src/pipe_reader.hpp | 89 +++++++++++++ src/pipe_writer.cpp | 120 +++++++++++++++++ src/pipe_writer.hpp | 88 +++++++++++++ src/platform.hpp.in | 210 ++++++++++++++++++++++++++++++ src/poll.cpp | 205 +++++++++++++++++++++++++++++ src/poll.hpp | 112 ++++++++++++++++ src/pub.cpp | 38 ++++++ src/pub.hpp | 45 +++++++ src/rep.cpp | 29 +++++ src/rep.hpp | 42 ++++++ src/req.cpp | 29 +++++ src/req.hpp | 42 ++++++ src/safe_object.cpp | 76 +++++++++++ src/safe_object.hpp | 68 ++++++++++ src/select.cpp | 236 +++++++++++++++++++++++++++++++++ src/select.hpp | 122 +++++++++++++++++ src/session.cpp | 273 ++++++++++++++++++++++++++++++++++++++ src/session.hpp | 107 +++++++++++++++ src/session_stub.cpp | 110 ++++++++++++++++ src/session_stub.hpp | 83 ++++++++++++ src/simple_semaphore.hpp | 188 +++++++++++++++++++++++++++ src/socket_base.cpp | 267 ++++++++++++++++++++++++++++++++++++++ src/socket_base.hpp | 96 ++++++++++++++ src/stdint.hpp | 70 ++++++++++ src/sub.cpp | 45 +++++++ src/sub.hpp | 46 +++++++ src/tcp_connecter.cpp | 138 ++++++++++++++++++++ src/tcp_connecter.hpp | 65 ++++++++++ src/tcp_listener.cpp | 165 +++++++++++++++++++++++ src/tcp_listener.hpp | 65 ++++++++++ src/tcp_socket.cpp | 116 +++++++++++++++++ src/tcp_socket.hpp | 70 ++++++++++ src/thread.cpp | 88 +++++++++++++ src/thread.hpp | 77 +++++++++++ src/uuid.cpp | 136 +++++++++++++++++++ src/uuid.hpp | 82 ++++++++++++ src/windows.hpp | 56 ++++++++ src/wire.hpp | 98 ++++++++++++++ src/ypipe.hpp | 209 +++++++++++++++++++++++++++++ src/ypollset.cpp | 56 ++++++++ src/ypollset.hpp | 74 +++++++++++ src/yqueue.hpp | 138 ++++++++++++++++++++ src/zmq_decoder.cpp | 78 +++++++++++ src/zmq_decoder.hpp | 57 ++++++++ src/zmq_encoder.cpp | 75 +++++++++++ src/zmq_encoder.hpp | 54 ++++++++ src/zmq_tcp_engine.cpp | 185 ++++++++++++++++++++++++++ src/zmq_tcp_engine.hpp | 92 +++++++++++++ src/zs.cpp | 222 +++++++++++++++++++++++++++++++ 121 files changed, 13546 insertions(+) zeromq3-4.0.4+dfsg.orig/version.sh0000755000175000017500000000135512240736636015774 0ustar ghedoghedo#!/bin/sh # # This script extracts the 0MQ version from include/zmq.h, which is the master # location for this information. # if [ ! -f include/zmq.h ]; then echo "version.sh: error: include/zmq.h does not exist" 1>&2 exit 1 fi MAJOR=`egrep '^#define +ZMQ_VERSION_MAJOR +[0-9]+$' include/zmq.h` MINOR=`egrep '^#define +ZMQ_VERSION_MINOR +[0-9]+$' include/zmq.h` PATCH=`egrep '^#define +ZMQ_VERSION_PATCH +[0-9]+$' include/zmq.h` if [ -z "$MAJOR" -o -z "$MINOR" -o -z "$PATCH" ]; then echo "version.sh: error: could not extract version from include/zmq.h" 1>&2 exit 1 fi MAJOR=`echo $MAJOR | awk '{ print $3 }'` MINOR=`echo $MINOR | awk '{ print $3 }'` PATCH=`echo $PATCH | awk '{ print $3 }'` echo $MAJOR.$MINOR.$PATCH | tr -d '\n' zeromq3-4.0.4+dfsg.orig/doc/0000755000175000017500000000000012307431377014507 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/doc/zmq_unbind.30000644000175000017500000000534412307431212016733 0ustar ghedoghedo'\" t .\" Title: zmq_unbind .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_UNBIND" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_unbind \- Stop accepting connections on a socket .SH "SYNOPSIS" .sp int zmq_unbind (void \fI*socket\fR, const char \fI*endpoint\fR); .SH "DESCRIPTION" .sp The \fIzmq_unbind()\fR function shall unbind a socket specified by the \fIsocket\fR argument from the endpoint specified by the \fIendpoint\fR argument\&. .sp The \fIendpoint\fR argument is as described in \fBzmq_bind\fR(3) .SH "RETURN VALUE" .sp The \fIzmq_unbind()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The endpoint supplied is invalid\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .SH "EXAMPLE" .PP \fBUnbind a subscriber socket from a TCP transport\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); /* Connect it to the host server001, port 5555 using a TCP transport */ rc = zmq_bind (socket, "tcp://127\&.0\&.0\&.1:5555"); assert (rc == 0); /* Disconnect from the previously connected endpoint */ rc = zmq_unbind (socket, "tcp://127\&.0\&.0\&.1:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_sendmsg.html0000644000175000017500000005445212307431367017735 0ustar ghedoghedo zmq_sendmsg(3)

SYNOPSIS

int zmq_sendmsg (void *socket, zmq_msg_t *msg, int flags);

DESCRIPTION

The zmq_sendmsg() function shall queue the message referenced by the msg argument to be sent to the socket referenced by the socket argument. The flags argument is a combination of the flags defined below:

ZMQ_DONTWAIT

For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high-water mark), specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the socket, the zmq_sendmsg() function shall fail with errno set to EAGAIN.

ZMQ_SNDMORE

Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description.

The zmq_msg_t structure passed to zmq_sendmsg() is nullified during the call. If you want to send the same message to multiple sockets you have to copy it using (e.g. using zmq_msg_copy()).

Note
A successful invocation of zmq_sendmsg() does not indicate that the message has been transmitted to the network, only that it has been queued on the socket and ØMQ has assumed responsibility for the message.
Note
this API method is deprecated in favor of zmq_msg_send(3).

Multi-part messages

A ØMQ message is composed of 1 or more message parts. Each message part is an independent zmq_msg_t in its own right. ØMQ ensures atomic delivery of messages: peers shall receive either all message parts of a message or none at all. The total number of message parts is unlimited except by available memory.

An application that sends multi-part messages must use the ZMQ_SNDMORE flag when sending each message part except the final one.

RETURN VALUE

The zmq_sendmsg() function shall return number of bytes in the message if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EAGAIN

Non-blocking mode was requested and the message cannot be sent at the moment.

ENOTSUP

The zmq_sendmsg() operation is not supported by this socket type.

EFSM

The zmq_sendmsg() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal before the message was sent.

EFAULT

Invalid message.

EHOSTUNREACH

The message cannot be routed.

EXAMPLE

Filling in a message and sending it to a socket
/* Create a new message, allocating 6 bytes for message content */
zmq_msg_t msg;
int rc = zmq_msg_init_size (&msg, 6);
assert (rc == 0);
/* Fill in message content with 'AAAAAA' */
memset (zmq_msg_data (&msg), 'A', 6);
/* Send the message to the socket */
rc = zmq_sendmsg (socket, &msg, 0);
assert (rc == 6);
Sending a multi-part message
/* Send a multi-part message consisting of three parts to socket */
rc = zmq_sendmsg (socket, &part1, ZMQ_SNDMORE);
rc = zmq_sendmsg (socket, &part2, ZMQ_SNDMORE);
/* Final part; no more parts to follow */
rc = zmq_sendmsg (socket, &part3, 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_inproc.html0000644000175000017500000004776412307431375017576 0ustar ghedoghedo zmq_inproc(7)

SYNOPSIS

The in-process transport passes messages via memory directly between threads sharing a single ØMQ context.

Note
No I/O threads are involved in passing messages using the inproc transport. Therefore, if you are using a ØMQ context for in-process messaging only you can initialise the context with zero I/O threads. See zmq_init(3) for details.

ADDRESSING

A ØMQ endpoint is a string consisting of a transport:// followed by an address. The transport specifies the underlying protocol to use. The address specifies the transport-specific address to connect to.

For the in-process transport, the transport is inproc, and the meaning of the address part is defined below.

Assigning a local address to a socket

When assigning a local address to a socket using zmq_bind() with the inproc transport, the endpoint shall be interpreted as an arbitrary string identifying the name to create. The name must be unique within the ØMQ context associated with the socket and may be up to 256 characters in length. No other restrictions are placed on the format of the name.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the inproc transport, the endpoint shall be interpreted as an arbitrary string identifying the name to connect to. The name must have been previously created by assigning it to at least one socket within the same ØMQ context as the socket being connected.

EXAMPLES

Assigning a local address to a socket
//  Assign the in-process name "#1"
rc = zmq_bind(socket, "inproc://#1");
assert (rc == 0);
//  Assign the in-process name "my-endpoint"
rc = zmq_bind(socket, "inproc://my-endpoint");
assert (rc == 0);
Connecting a socket
//  Connect to the in-process name "#1"
rc = zmq_connect(socket, "inproc://#1");
assert (rc == 0);
//  Connect to the in-process name "my-endpoint"
rc = zmq_connect(socket, "inproc://my-endpoint");
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_getsockopt.txt0000644000175000017500000005572612240736636020342 0ustar ghedoghedozmq_getsockopt(3) ================= NAME ---- zmq_getsockopt - get 0MQ socket options SYNOPSIS -------- *int zmq_getsockopt (void '*socket', int 'option_name', void '*option_value', size_t '*option_len');* DESCRIPTION ----------- The _zmq_getsockopt()_ function shall retrieve the value for the option specified by the 'option_name' argument for the 0MQ socket pointed to by the 'socket' argument, and store it in the buffer pointed to by the 'option_value' argument. The 'option_len' argument is the size in bytes of the buffer pointed to by 'option_value'; upon successful completion _zmq_getsockopt()_ shall modify the 'option_len' argument to indicate the actual size of the option value stored in the buffer. The following options can be retrieved with the _zmq_getsockopt()_ function: ZMQ_TYPE: Retrieve socket type ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_TYPE' option shall retrieve the socket type for the specified 'socket'. The socket type is specified at socket creation time and cannot be modified afterwards. [horizontal] Option value type:: int Option value unit:: N/A Default value:: N/A Applicable socket types:: all ZMQ_RCVMORE: More message data parts to follow ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVMORE' option shall return True (1) if the message part last received from the 'socket' was a data part with more parts to follow. If there are no data parts to follow, this option shall return False (0). Refer to linkzmq:zmq_send[3] and linkzmq:zmq_recv[3] for a detailed description of multi-part messages. [horizontal] Option value type:: int Option value unit:: boolean Default value:: N/A Applicable socket types:: all ZMQ_SNDHWM: Retrieves high water mark for outbound messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SNDHWM' option shall return the high water mark for outbound messages on the specified 'socket'. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified 'socket' is communicating with. A value of zero means no limit. If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in linkzmq:zmq_socket[3] for details on the exact action taken for each socket type. [horizontal] Option value type:: int Option value unit:: messages Default value:: 1000 Applicable socket types:: all ZMQ_RCVHWM: Retrieve high water mark for inbound messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVHWM' option shall return the high water mark for inbound messages on the specified 'socket'. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified 'socket' is communicating with. A value of zero means no limit. If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in linkzmq:zmq_socket[3] for details on the exact action taken for each socket type. [horizontal] Option value type:: int Option value unit:: messages Default value:: 1000 Applicable socket types:: all ZMQ_AFFINITY: Retrieve I/O thread affinity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_AFFINITY' option shall retrieve the I/O thread affinity for newly created connections on the specified 'socket'. Affinity determines which threads from the 0MQ I/O thread pool associated with the socket's _context_ shall handle newly created connections. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all 0MQ I/O threads in the thread pool. For non-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on. For example, a value of 3 specifies that subsequent connections on 'socket' shall be handled exclusively by I/O threads 1 and 2. See also linkzmq:zmq_init[3] for details on allocating the number of I/O threads for a specific _context_. [horizontal] Option value type:: uint64_t Option value unit:: N/A (bitmap) Default value:: 0 Applicable socket types:: N/A ZMQ_IDENTITY: Retrieve socket identity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_IDENTITY' option shall retrieve the identity of the specified 'socket'. Socket identity is used only by request/reply pattern. Namely, it can be used in tandem with ROUTER socket to route messages to the peer with specific identity. Identity should be at least one byte and at most 255 bytes long. Identities starting with binary zero are reserved for use by 0MQ infrastructure. [horizontal] Option value type:: binary data Option value unit:: N/A Default value:: NULL Applicable socket types:: ZMQ_REP, ZMQ_REQ, ZMQ_ROUTER, ZMQ_DEALER. ZMQ_RATE: Retrieve multicast data rate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RATE' option shall retrieve the maximum send or receive data rate for multicast transports using the specified 'socket'. [horizontal] Option value type:: int Option value unit:: kilobits per second Default value:: 100 Applicable socket types:: all, when using multicast transports ZMQ_RECOVERY_IVL: Get multicast recovery interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECOVERY_IVL' option shall retrieve the recovery interval for multicast transports using the specified 'socket'. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 10000 Applicable socket types:: all, when using multicast transports ZMQ_SNDBUF: Retrieve kernel transmit buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SNDBUF' option shall retrieve the underlying kernel transmit buffer size for the specified 'socket'. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the 'SO_SNDBUF' socket option. [horizontal] Option value type:: int Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_RCVBUF: Retrieve kernel receive buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVBUF' option shall retrieve the underlying kernel receive buffer size for the specified 'socket'. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the 'SO_RCVBUF' socket option. [horizontal] Option value type:: int Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_LINGER: Retrieve linger period for socket shutdown ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_LINGER' option shall retrieve the linger period for the specified 'socket'. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with linkzmq:zmq_close[3], and further affects the termination of the socket's context with linkzmq:zmq_term[3]. The following outlines the different behaviours: * The default value of '-1' specifies an infinite linger period. Pending messages shall not be discarded after a call to _zmq_close()_; attempting to terminate the socket's context with _zmq_term()_ shall block until all pending messages have been sent to a peer. * The value of '0' specifies no linger period. Pending messages shall be discarded immediately when the socket is closed with _zmq_close()_. * Positive values specify an upper bound for the linger period in milliseconds. Pending messages shall not be discarded after a call to _zmq_close()_; attempting to terminate the socket's context with _zmq_term()_ shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_RECONNECT_IVL: Retrieve reconnection interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECONNECT_IVL' option shall retrieve the initial reconnection interval for the specified 'socket'. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection. NOTE: The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 100 Applicable socket types:: all, only for connection-oriented transports ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECONNECT_IVL_MAX' option shall retrieve the maximum reconnection interval for the specified 'socket'. This is the maximum period 0MQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential backoff strategy. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL. NOTE: Values less than ZMQ_RECONNECT_IVL will be ignored. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 0 (only use ZMQ_RECONNECT_IVL) Applicable socket types:: all, only for connection-oriented transport ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_BACKLOG' option shall retrieve the maximum length of the queue of outstanding peer connections for the specified 'socket'; this only applies to connection-oriented transports. For details refer to your operating system documentation for the 'listen' function. [horizontal] Option value type:: int Option value unit:: connections Default value:: 100 Applicable socket types:: all, only for connection-oriented transports ZMQ_MAXMSGSIZE: Maximum acceptable inbound message size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The option shall retrieve limit for the inbound messages. If a peer sends a message larger than ZMQ_MAXMSGSIZE it is disconnected. Value of -1 means 'no limit'. [horizontal] Option value type:: int64_t Option value unit:: bytes Default value:: -1 Applicable socket types:: all ZMQ_MULTICAST_HOPS: Maximum network hops for multicast packets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The option shall retrieve time-to-live used for outbound multicast packets. The default of 1 means that the multicast packets don't leave the local network. [horizontal] Option value type:: int Option value unit:: network hops Default value:: 1 Applicable socket types:: all, when using multicast transports ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the timeout for recv operation on the socket. If the value is `0`, _zmq_recv(3)_ will return immediately, with a EAGAIN error if there is no message to receive. If the value is `-1`, it will block until a message is available. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the timeout for send operation on the socket. If the value is `0`, _zmq_send(3)_ will return immediately, with a EAGAIN error if the message cannot be sent. If the value is `-1`, it will block until the message is sent. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_IPV6: Retrieve IPv6 socket status ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the IPv6 option for the socket. A value of `1` means IPv6 is enabled on the socket, while `0` means the socket will use only IPv4. When IPv6 is enabled the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts. [horizontal] Option value type:: int Option value unit:: boolean Default value:: 0 (false) Applicable socket types:: all, when using TCP transports. ZMQ_IPV4ONLY: Retrieve IPv4-only socket override status ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the IPv4-only option for the socket. This option is deprecated. Please use the ZMQ_IPV6 option. [horizontal] Option value type:: int Option value unit:: boolean Default value:: 1 (true) Applicable socket types:: all, when using TCP transports. ZMQ_IMMEDIATE: Retrieve attach-on-connect value ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the state of the attach on connect value. If set to `1`, will delay the attachment of a pipe on connect until the underlying connection has completed. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection. [horizontal] Option value type:: int Option value unit:: boolean Default value:: 0 (false) Applicable socket types:: all, primarily when using TCP/IPC transports. ZMQ_FD: Retrieve file descriptor associated with the socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_FD' option shall retrieve the file descriptor associated with the specified 'socket'. The returned file descriptor can be used to integrate the socket into an existing event loop; the 0MQ library shall signal any pending events on the socket in an _edge-triggered_ fashion by making the file descriptor become ready for reading. NOTE: The ability to read from the returned file descriptor does not necessarily indicate that messages are available to be read from, or can be written to, the underlying socket; applications must retrieve the actual event state with a subsequent retrieval of the 'ZMQ_EVENTS' option. NOTE: The returned file descriptor is also used internally by the 'zmq_send' and 'zmq_recv' functions. As the descriptor is edge triggered, applications must update the state of 'ZMQ_EVENTS' after each invocation of 'zmq_send' or 'zmq_recv'.To be more explicit: after calling 'zmq_send' the socket may become readable (and vice versa) without triggering a read event on the file descriptor. CAUTION: The returned file descriptor is intended for use with a 'poll' or similar system call only. Applications must never attempt to read or write data to it directly, neither should they try to close it. [horizontal] Option value type:: int on POSIX systems, SOCKET on Windows Option value unit:: N/A Default value:: N/A Applicable socket types:: all ZMQ_EVENTS: Retrieve socket event state ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENTS' option shall retrieve the event state for the specified 'socket'. The returned value is a bit mask constructed by OR'ing a combination of the following event flags: *ZMQ_POLLIN*:: Indicates that at least one message may be received from the specified socket without blocking. *ZMQ_POLLOUT*:: Indicates that at least one message may be sent to the specified socket without blocking. The combination of a file descriptor returned by the 'ZMQ_FD' option being ready for reading but no actual events returned by a subsequent retrieval of the 'ZMQ_EVENTS' option is valid; applications should simply ignore this case and restart their polling operation/event loop. [horizontal] Option value type:: int Option value unit:: N/A (flags) Default value:: N/A Applicable socket types:: all ZMQ_LAST_ENDPOINT: Retrieve the last endpoint set ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_LAST_ENDPOINT' option shall retrieve the last endpoint bound for TCP and IPC transports. The returned value will be a string in the form of a ZMQ DSN. Note that if the TCP host is INADDR_ANY, indicated by a *, then the returned address will be 0.0.0.0 (for IPv4). [horizontal] Option value type:: NULL-terminated character string Option value unit:: N/A Default value:: NULL Applicable socket types:: all, when binding TCP or IPC transports ZMQ_TCP_KEEPALIVE: Override SO_KEEPALIVE socket option ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override 'SO_KEEPALIVE' socket option(where supported by OS). The default value of `-1` means to skip any overrides and leave it to OS default. [horizontal] Option value type:: int Option value unit:: -1,0,1 Default value:: -1 (leave to OS default) Applicable socket types:: all, when using TCP transports. ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPCNT(or TCP_KEEPALIVE on some OS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override 'TCP_KEEPCNT'(or 'TCP_KEEPALIVE' on some OS) socket option (where supported by OS). The default value of `-1` means to skip any overrides and leave it to OS default. [horizontal] Option value type:: int Option value unit:: -1,>0 Default value:: -1 (leave to OS default) Applicable socket types:: all, when using TCP transports. ZMQ_TCP_KEEPALIVE_CNT: Override TCP_KEEPCNT socket option ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override 'TCP_KEEPCNT' socket option(where supported by OS). The default value of `-1` means to skip any overrides and leave it to OS default. [horizontal] Option value type:: int Option value unit:: -1,>0 Default value:: -1 (leave to OS default) Applicable socket types:: all, when using TCP transports. ZMQ_TCP_KEEPALIVE_INTVL: Override TCP_KEEPINTVL socket option ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override 'TCP_KEEPINTVL' socket option(where supported by OS). The default value of `-1` means to skip any overrides and leave it to OS default. [horizontal] Option value type:: int Option value unit:: -1,>0 Default value:: -1 (leave to OS default) Applicable socket types:: all, when using TCP transports. ZMQ_MECHANISM: Retrieve current security mechanism ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_MECHANISM' option shall retrieve the current security mechanism for the socket. [horizontal] Option value type:: int Option value unit:: ZMQ_NULL, ZMQ_PLAIN, or ZMQ_CURVE Default value:: ZMQ_NULL Applicable socket types:: all, when using TCP or IPC transports ZMQ_PLAIN_SERVER: Retrieve current PLAIN server role ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Returns the 'ZMQ_PLAIN_SERVER' option, if any, previously set on the socket. [horizontal] Option value type:: int Option value unit:: 0, 1 Default value:: int Applicable socket types:: all, when using TCP or IPC transports ZMQ_PLAIN_USERNAME: Retrieve current PLAIN username ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_PLAIN_USERNAME' option shall retrieve the last username set for the PLAIN security mechanism. The returned value shall be a NULL-terminated string and MAY be empty. The returned size SHALL include the terminating null byte. [horizontal] Option value type:: NULL-terminated character string Option value unit:: N/A Default value:: null string Applicable socket types:: all, when using TCP or IPC transports ZMQ_PLAIN_PASSWORD: Retrieve current password ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_PLAIN_PASSWORD' option shall retrieve the last password set for the PLAIN security mechanism. The returned value shall be a NULL-terminated string and MAY be empty. The returned size SHALL include the terminating null byte. [horizontal] Option value type:: NULL-terminated character string Option value unit:: N/A Default value:: null string Applicable socket types:: all, when using TCP or IPC transports ZMQ_CURVE_PUBLICKEY: Retrieve current CURVE public key ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieves the current long term public key for the socket. You can provide either a 32 byte buffer, to retrieve the binary key value, or a 41 byte buffer, to retrieve the key in a printable Z85 format. NOTE: to fetch a printable key, the buffer must be 41 bytes large to hold the 40-char key value and one null byte. [horizontal] Option value type:: binary data or Z85 text string Option value size:: 32 or 41 Default value:: null Applicable socket types:: all, when using TCP transport ZMQ_CURVE_SECRETKEY: Retrieve current CURVE secret key ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieves the current long term secret key for the socket. You can provide either a 32 byte buffer, to retrieve the binary key value, or a 41 byte buffer, to retrieve the key in a printable Z85 format. [horizontal] Option value type:: binary data or Z85 text string Option value size:: 32 or 41 Default value:: null Applicable socket types:: all, when using TCP transport ZMQ_CURVE_SERVERKEY: Retrieve current CURVE server key ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieves the current server key for the client socket. You can provide either a 32 byte buffer, to retrieve the binary key value, or a 40 byte buffer, to retrieve the key in a printable Z85 format. [horizontal] Option value type:: binary data or Z85 text string Option value size:: 32 or 41 Default value:: null Applicable socket types:: all, when using TCP transport ZMQ_ZAP_DOMAIN: Retrieve RFC 27 authentication domain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_ZAP_DOMAIN' option shall retrieve the last ZAP domain set for the socket. The returned value shall be a NULL-terminated string and MAY be empty. The returned size SHALL include the terminating null byte. [horizontal] Option value type:: character string Option value unit:: N/A Default value:: not set Applicable socket types:: all, when using TCP transport RETURN VALUE ------------ The _zmq_getsockopt()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested option _option_name_ is unknown, or the requested _option_len_ or _option_value_ is invalid, or the size of the buffer pointed to by _option_value_, as specified by _option_len_, is insufficient for storing the option value. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal. EXAMPLE ------- .Retrieving the high water mark for outgoing messages ---- /* Retrieve high water mark into sndhwm */ int sndhwm; size_t sndhwm_size = sizeof (sndhwm); rc = zmq_getsockopt (socket, ZMQ_SNDHWM, &sndhwm, &sndhwm_size); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_setsockopt[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_curve.html0000644000175000017500000005046612307431376017422 0ustar ghedoghedo zmq_curve(7)

SYNOPSIS

The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks. The CURVE mechanism is defined by this document: http://rfc.zeromq.org/spec:25.

CLIENT AND SERVER ROLES

A socket using CURVE can be either client or server, at any moment, but not both. The role is independent of bind/connect direction.

A socket can change roles at any point by setting new options. The role affects all zmq_connect and zmq_bind calls that follow it.

To become a CURVE server, the application sets the ZMQ_CURVE_SERVER option on the socket, and then sets the ZMQ_CURVE_SECRETKEY option to provide the socket with its long-term secret key. The application does not provide the socket with its long-term public key, which is used only by clients.

To become a CURVE client, the application sets the ZMQ_CURVE_SERVERKEY option with the long-term public key of the server it intends to connect to, or accept connections from, next. The application then sets the ZMQ_CURVE_PUBLICKEY and ZMQ_CURVE_SECRETKEY options with its client long-term key pair.

If the server does authentication it will be based on the client’s long term public key.

KEY ENCODING

The standard representation for keys in source code is either 32 bytes of base 256 (binary) data, or 40 characters of base 85 data encoded using the Z85 algorithm defined by http://rfc.zeromq.org/spec:32.

The Z85 algorithm is designed to produce printable key strings for use in configuration files, the command line, and code. There is a reference implementation in C at https://github.com/zeromq/rfc/tree/master/src.

TEST KEY VALUES

For test cases, the client shall use this long-term key pair (specified as hexadecimal and in Z85):

public:
    BB88471D65E2659B30C55A5321CEBB5AAB2B70A398645C26DCA2B2FCB43FC518
    Yne@$w-vo<fVvi]a<NY6T1ed:M$fCG*[IaLV{hID

secret:
    7BB864B489AFA3671FBE69101F94B38972F24816DFB01B51656B3FEC8DFD0888
    D:)Q[IlAW!ahhC2ac:9*A}h:p?([4%wOTJ%JR%cs

And the server shall use this long-term key pair (specified as hexadecimal and in Z85):

public:
    54FCBA24E93249969316FB617C872BB0C1D1FF14800427C594CBFACF1BC2D652
    rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7

secret:
    8E0BDD697628B91D8F245587EE95C5B04D48963F79259877B49CD9063AEAD3B7
    JTKVSB%%)wK0E.X)V>+}o?pNmC{O&4W4b!Ni{Lh6

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_init_size.30000644000175000017500000000571312307431236020325 0ustar ghedoghedo'\" t .\" Title: zmq_msg_init_size .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_INIT_SIZE" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_init_size \- initialise 0MQ message of a specified size .SH "SYNOPSIS" .sp \fBint zmq_msg_init_size (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, size_t \fR\fB\fIsize\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_init_size()\fR function shall allocate any resources required to store a message \fIsize\fR bytes long and initialise the message object referenced by \fImsg\fR to represent the newly allocated message\&. .sp The implementation shall choose whether to store message content on the stack (small messages) or on the heap (large messages)\&. For performance reasons \fIzmq_msg_init_size()\fR shall not clear the message data\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The functions \fIzmq_msg_init()\fR, \fIzmq_msg_init_data()\fR and \fIzmq_msg_init_size()\fR are mutually exclusive\&. Never initialize the same \fIzmq_msg_t\fR twice\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_init_size()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBENOMEM\fR .RS 4 Insufficient storage space is available\&. .RE .SH "SEE ALSO" .sp \fBzmq_msg_init_data\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_setsockopt.html0000644000175000017500000021432212307431362020460 0ustar ghedoghedo zmq_setsockopt(3)

SYNOPSIS

int zmq_setsockopt (void *socket, int option_name, const void *option_value, size_t option_len);

Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE, ZMQ_LINGER, ZMQ_ROUTER_MANDATORY, ZMQ_PROBE_ROUTER, ZMQ_XPUB_VERBOSE, ZMQ_REQ_CORRELATE, and ZMQ_REQ_RELAXED, only take effect for subsequent socket bind/connects.

Specifically, security options take effect for subsequent bind/connect calls, and can be changed at any time to affect subsequent binds and/or connects.

DESCRIPTION

The zmq_setsockopt() function shall set the option specified by the option_name argument to the value pointed to by the option_value argument for the ØMQ socket pointed to by the socket argument. The option_len argument is the size of the option value in bytes.

The following socket options can be set with the zmq_setsockopt() function:

ZMQ_SNDHWM: Set high water mark for outbound messages

The ZMQ_SNDHWM option shall set the high water mark for outbound messages on the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in zmq_socket(3) for details on the exact action taken for each socket type.

Note
ØMQ does not guarantee that the socket will accept as many as ZMQ_SNDHWM messages, and the actual limit may be as much as 60-70% lower depending on the flow of messages on the socket.
Option value type

int

Option value unit

messages

Default value

1000

Applicable socket types

all

ZMQ_RCVHWM: Set high water mark for inbound messages

The ZMQ_RCVHWM option shall set the high water mark for inbound messages on the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in zmq_socket(3) for details on the exact action taken for each socket type.

Option value type

int

Option value unit

messages

Default value

1000

Applicable socket types

all

ZMQ_AFFINITY: Set I/O thread affinity

The ZMQ_AFFINITY option shall set the I/O thread affinity for newly created connections on the specified socket.

Affinity determines which threads from the ØMQ I/O thread pool associated with the socket’s context shall handle newly created connections. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all ØMQ I/O threads in the thread pool. For non-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on. For example, a value of 3 specifies that subsequent connections on socket shall be handled exclusively by I/O threads 1 and 2.

See also zmq_init(3) for details on allocating the number of I/O threads for a specific context.

Option value type

uint64_t

Option value unit

N/A (bitmap)

Default value

0

Applicable socket types

N/A

ZMQ_SUBSCRIBE: Establish message filter

The ZMQ_SUBSCRIBE option shall establish a new message filter on a ZMQ_SUB socket. Newly created ZMQ_SUB sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter.

An empty option_value of length zero shall subscribe to all incoming messages. A non-empty option_value shall subscribe to all messages beginning with the specified prefix. Multiple filters may be attached to a single ZMQ_SUB socket, in which case a message shall be accepted if it matches at least one filter.

Option value type

binary data

Option value unit

N/A

Default value

N/A

Applicable socket types

ZMQ_SUB

ZMQ_UNSUBSCRIBE: Remove message filter

The ZMQ_UNSUBSCRIBE option shall remove an existing message filter on a ZMQ_SUB socket. The filter specified must match an existing filter previously established with the ZMQ_SUBSCRIBE option. If the socket has several instances of the same filter attached the ZMQ_UNSUBSCRIBE option shall remove only one instance, leaving the rest in place and functional.

Option value type

binary data

Option value unit

N/A

Default value

N/A

Applicable socket types

ZMQ_SUB

ZMQ_IDENTITY: Set socket identity

The ZMQ_IDENTITY option shall set the identity of the specified socket when connecting to a ROUTER socket. The identity should be from 1 to 255 bytes long and MAY NOT start with binary zero.

If two clients use the same identity when connecting to a ROUTER, the ROUTER socket shall accept only the first such client and reject the others.

Option value type

binary data

Option value unit

N/A

Default value

NULL

Applicable socket types

ZMQ_REQ, ZMQ_REP, ZMQ_ROUTER, ZMQ_DEALER.

ZMQ_RATE: Set multicast data rate

The ZMQ_RATE option shall set the maximum send or receive data rate for multicast transports such as zmq_pgm(7) using the specified socket.

Option value type

int

Option value unit

kilobits per second

Default value

100

Applicable socket types

all, when using multicast transports

ZMQ_RECOVERY_IVL: Set multicast recovery interval

The ZMQ_RECOVERY_IVL option shall set the recovery interval for multicast transports using the specified socket. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

Caution
Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in-memory buffer.
Option value type

int

Option value unit

milliseconds

Default value

10000

Applicable socket types

all, when using multicast transports

ZMQ_SNDBUF: Set kernel transmit buffer size

The ZMQ_SNDBUF option shall set the underlying kernel transmit buffer size for the socket to the specified size in bytes. A value of zero means leave the OS default unchanged. For details please refer to your operating system documentation for the SO_SNDBUF socket option.

Option value type

int

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_RCVBUF: Set kernel receive buffer size

The ZMQ_RCVBUF option shall set the underlying kernel receive buffer size for the socket to the specified size in bytes. A value of zero means leave the OS default unchanged. For details refer to your operating system documentation for the SO_RCVBUF socket option.

Option value type

int

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_LINGER: Set linger period for socket shutdown

The ZMQ_LINGER option shall set the linger period for the specified socket. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with zmq_close(3), and further affects the termination of the socket’s context with zmq_term(3). The following outlines the different behaviours:

  • The default value of -1 specifies an infinite linger period. Pending messages shall not be discarded after a call to zmq_close(); attempting to terminate the socket’s context with zmq_term() shall block until all pending messages have been sent to a peer.

  • The value of 0 specifies no linger period. Pending messages shall be discarded immediately when the socket is closed with zmq_close().

  • Positive values specify an upper bound for the linger period in milliseconds. Pending messages shall not be discarded after a call to zmq_close(); attempting to terminate the socket’s context with zmq_term() shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded.

    Option value type

    int

    Option value unit

    milliseconds

    Default value

    -1 (infinite)

    Applicable socket types

    all

ZMQ_RECONNECT_IVL: Set reconnection interval

The ZMQ_RECONNECT_IVL option shall set the initial reconnection interval for the specified socket. The reconnection interval is the period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

Note
The reconnection interval may be randomized by ØMQ to prevent reconnection storms in topologies with a large number of peers per socket.
Option value type

int

Option value unit

milliseconds

Default value

100

Applicable socket types

all, only for connection-oriented transports

ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval

The ZMQ_RECONNECT_IVL_MAX option shall set the maximum reconnection interval for the specified socket. This is the maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential backoff strategy. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL.

Note
Values less than ZMQ_RECONNECT_IVL will be ignored.
Option value type

int

Option value unit

milliseconds

Default value

0 (only use ZMQ_RECONNECT_IVL)

Applicable socket types

all, only for connection-oriented transports

ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections

The ZMQ_BACKLOG option shall set the maximum length of the queue of outstanding peer connections for the specified socket; this only applies to connection-oriented transports. For details refer to your operating system documentation for the listen function.

Option value type

int

Option value unit

connections

Default value

100

Applicable socket types

all, only for connection-oriented transports.

ZMQ_MAXMSGSIZE: Maximum acceptable inbound message size

Limits the size of the inbound message. If a peer sends a message larger than ZMQ_MAXMSGSIZE it is disconnected. Value of -1 means no limit.

Option value type

int64_t

Option value unit

bytes

Default value

-1

Applicable socket types

all

ZMQ_MULTICAST_HOPS: Maximum network hops for multicast packets

Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don’t leave the local network.

Option value type

int

Option value unit

network hops

Default value

1

Applicable socket types

all, when using multicast transports

ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN

Sets the timeout for receive operation on the socket. If the value is 0, zmq_recv(3) will return immediately, with a EAGAIN error if there is no message to receive. If the value is -1, it will block until a message is available. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error.

Option value type

int

Option value unit

milliseconds

Default value

-1 (infinite)

Applicable socket types

all

ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN

Sets the timeout for send operation on the socket. If the value is 0, zmq_send(3) will return immediately, with a EAGAIN error if the message cannot be sent. If the value is -1, it will block until the message is sent. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error.

Option value type

int

Option value unit

milliseconds

Default value

-1 (infinite)

Applicable socket types

all

ZMQ_IPV6: Enable IPv6 on socket

Set the IPv6 option for the socket. A value of 1 means IPv6 is enabled on the socket, while 0 means the socket will use only IPv4. When IPv6 is enabled the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

Option value type

int

Option value unit

boolean

Default value

0 (false)

Applicable socket types

all, when using TCP transports.

ZMQ_IPV4ONLY: Use IPv4-only on socket

Set the IPv4-only option for the socket. This option is deprecated. Please use the ZMQ_IPV6 option.

Option value type

int

Option value unit

boolean

Default value

1 (true)

Applicable socket types

all, when using TCP transports.

ZMQ_IMMEDIATE: Queue messages only to completed connections

By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (REQ, PUSH, DEALER). If this option is set to 1, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

Option value type

int

Option value unit

boolean

Default value

0 (false)

Applicable socket types

all, only for connection-oriented transports.

ZMQ_ROUTER_MANDATORY: accept only routable messages on ROUTER sockets

Sets the ROUTER socket behavior when an unroutable message is encountered. A value of 0 is the default and discards the message silently when it cannot be routed. A value of 1 returns an EHOSTUNREACH error code if the message cannot be routed.

Option value type

int

Option value unit

0, 1

Default value

0

Applicable socket types

ZMQ_ROUTER

ZMQ_ROUTER_RAW: switch ROUTER socket to raw mode

Sets the raw mode on the ROUTER, when set to 1. When the ROUTER socket is in raw mode, and when using the tcp:// transport, it will read and write TCP data without ØMQ framing. This lets ØMQ applications talk to non-ØMQ applications. When using raw mode, you cannot set explicit identities, and the ZMQ_MSGMORE flag is ignored when sending data messages. In raw mode you can close a specific connection by sending it a zero-length message (following the identity frame).

Note
This option is deprecated, please use ZMQ_STREAM sockets instead.
Option value type

int

Option value unit

0, 1

Default value

0

Applicable socket types

ZMQ_ROUTER

ZMQ_PROBE_ROUTER: bootstrap connections to ROUTER sockets

When set to 1, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on REQ, DEALER, or ROUTER sockets connected to a ROUTER socket. The application must filter such empty messages. The ZMQ_PROBE_ROUTER option in effect provides the ROUTER application with an event signaling the arrival of a new peer.

Note
do not set this option on a socket that talks to any other socket types: the results are undefined.
Option value type

int

Option value unit

0, 1

Default value

0

Applicable socket types

ZMQ_ROUTER, ZMQ_DEALER, ZMQ_REQ

ZMQ_XPUB_VERBOSE: provide all subscription messages on XPUB sockets

Sets the XPUB socket behavior on new subscriptions and unsubscriptions. A value of 0 is the default and passes only new subscription messages to upstream. A value of 1 passes all subscription messages upstream.

Option value type

int

Option value unit

0, 1

Default value

0

Applicable socket types

ZMQ_XPUB

ZMQ_REQ_CORRELATE: match replies with requests

The default behavior of REQ sockets is to rely on the ordering of messages to match requests and responses and that is usually sufficient. When this option is set to 1, the REQ socket will prefix outgoing messages with an extra frame containing a request id. That means the full message is (request id, 0, user frames…). The REQ socket will discard all incoming messages that don’t begin with these two frames.

Option value type

int

Option value unit

0, 1

Default value

0

Applicable socket types

ZMQ_REQ

ZMQ_REQ_RELAXED: relax strict alternation between request and reply

By default, a REQ socket does not allow initiating a new request with zmq_send(3) until the reply to the previous one has been received. When set to 1, sending another message is allowed and has the effect of disconnecting the underlying connection to the peer from which the reply was expected, triggering a reconnection attempt on transports that support it. The request-reply state machine is reset and a new request is sent to the next available peer.

If set to 1, also enable ZMQ_REQ_CORRELATE to ensure correct matching of requests and replies. Otherwise a late reply to an aborted request can be reported as the reply to the superseding request.

Option value type

int

Option value unit

0, 1

Default value

0

Applicable socket types

ZMQ_REQ

ZMQ_TCP_KEEPALIVE: Override SO_KEEPALIVE socket option

Override SO_KEEPALIVE socket option (where supported by OS). The default value of -1 means to skip any overrides and leave it to OS default.

Option value type

int

Option value unit

-1,0,1

Default value

-1 (leave to OS default)

Applicable socket types

all, when using TCP transports.

ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPCNT (or TCP_KEEPALIVE on some OS)

Override TCP_KEEPCNT(or TCP_KEEPALIVE on some OS) socket option (where supported by OS). The default value of -1 means to skip any overrides and leave it to OS default.

Option value type

int

Option value unit

-1,>0

Default value

-1 (leave to OS default)

Applicable socket types

all, when using TCP transports.

ZMQ_TCP_KEEPALIVE_CNT: Override TCP_KEEPCNT socket option

Override TCP_KEEPCNT socket option (where supported by OS). The default value of -1 means to skip any overrides and leave it to OS default.

Option value type

int

Option value unit

-1,>0

Default value

-1 (leave to OS default)

Applicable socket types

all, when using TCP transports.

ZMQ_TCP_KEEPALIVE_INTVL: Override TCP_KEEPINTVL socket option

Override TCP_KEEPINTVL socket option(where supported by OS). The default value of -1 means to skip any overrides and leave it to OS default.

Option value type

int

Option value unit

-1,>0

Default value

-1 (leave to OS default)

Applicable socket types

all, when using TCP transports.

ZMQ_TCP_ACCEPT_FILTER: Assign filters to allow new TCP connections

Assign an arbitrary number of filters that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source ip should be matched. To clear all filters call zmq_setsockopt(socket, ZMQ_TCP_ACCEPT_FILTER, NULL, 0). Filter is a null-terminated string with ipv6 or ipv4 CIDR.

Option value type

binary data

Option value unit

N/A

Default value

no filters (allow from all)

Applicable socket types

all listening sockets, when using TCP transports.

ZMQ_PLAIN_SERVER: Set PLAIN server role

Defines whether the socket will act as server for PLAIN security, see zmq_plain(7). A value of 1 means the socket will act as PLAIN server. A value of 0 means the socket will not act as PLAIN server, and its security role then depends on other option settings. Setting this to 0 shall reset the socket security to NULL.

Option value type

int

Option value unit

0, 1

Default value

0

Applicable socket types

all, when using TCP transport

ZMQ_PLAIN_USERNAME: Set PLAIN security username

Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN, see zmq_plain(7). If you set this to a null value, the security mechanism used for connections shall be NULL, see zmq_null(3).

Option value type

character string

Option value unit

N/A

Default value

not set

Applicable socket types

all, when using TCP transport

ZMQ_PLAIN_PASSWORD: Set PLAIN security password

Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN, see zmq_plain(7). If you set this to a null value, the security mechanism used for connections shall be NULL, see zmq_null(3).

Option value type

character string

Option value unit

N/A

Default value

not set

Applicable socket types

all, when using TCP transport

ZMQ_CURVE_SERVER: Set CURVE server role

Defines whether the socket will act as server for CURVE security, see zmq_curve(7). A value of 1 means the socket will act as CURVE server. A value of 0 means the socket will not act as CURVE server, and its security role then depends on other option settings. Setting this to 0 shall reset the socket security to NULL. When you set this you must also set the server’s secret key using the ZMQ_CURVE_SECRETKEY option. A server socket does not need to know its own public key.

Option value type

int

Option value unit

0, 1

Default value

0

Applicable socket types

all, when using TCP transport

ZMQ_CURVE_PUBLICKEY: Set CURVE public key

Sets the socket’s long term public key. You must set this on CURVE client sockets, see zmq_curve(7). You can provide the key as 32 binary bytes, or as a 40-character string encoded in the Z85 encoding format. The public key must always be used with the matching secret key. To generate a public/secret key pair, use zmq_curve_keypair(3).

Option value type

binary data or Z85 text string

Option value size

32 or 40

Default value

NULL

Applicable socket types

all, when using TCP transport

ZMQ_CURVE_SECRETKEY: Set CURVE secret key

Sets the socket’s long term secret key. You must set this on both CURVE client and server sockets, see zmq_curve(7). You can provide the key as 32 binary bytes, or as a 40-character string encoded in the Z85 encoding format. To generate a public/secret key pair, use zmq_curve_keypair(3).

Option value type

binary data or Z85 text string

Option value size

32 or 40

Default value

NULL

Applicable socket types

all, when using TCP transport

ZMQ_CURVE_SERVERKEY: Set CURVE server key

Sets the socket’s long term server key. You must set this on CURVE client sockets, see zmq_curve(7). You can provide the key as 32 binary bytes, or as a 40-character string encoded in the Z85 encoding format. This key must have been generated together with the server’s secret key.

Option value type

binary data or Z85 text string

Option value size

32 or 40

Default value

NULL

Applicable socket types

all, when using TCP transport

ZMQ_ZAP_DOMAIN: Set RFC 27 authentication domain

Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details.

Option value type

character string

Option value unit

N/A

Default value

not set

Applicable socket types

all, when using TCP transport

ZMQ_CONFLATE: Keep only last message

If set, a socket shall keep only one message in its inbound/outbound queue, this message being the last message received/the last message to be sent. Ignores ZMQ_RECVHWM and ZMQ_SENDHWM options. Does not supports multi-part messages, in particular, only one part of it is kept in the socket internal queue.

Option value type

int

Option value unit

boolean

Default value

0 (false)

Applicable socket types

ZMQ_PULL, ZMQ_PUSH, ZMQ_SUB, ZMQ_PUB, ZMQ_DEALER

RETURN VALUE

The zmq_setsockopt() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The requested option option_name is unknown, or the requested option_len or option_value is invalid.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal.

EXAMPLE

Subscribing to messages on a ZMQ_SUB socket
/* Subscribe to all messages */
rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "", 0);
assert (rc == 0);
/* Subscribe to messages prefixed with "ANIMALS.CATS" */
rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12);
Setting I/O thread affinity
int64_t affinity;
/* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */
affinity = 1;
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity));
assert (rc);
rc = zmq_bind (socket, "tcp://lo:5555");
assert (rc);
/* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */
affinity = 2;
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity));
assert (rc);
rc = zmq_bind (socket, "tcp://lo:5556");
assert (rc);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_epgm.70000644000175000017500000001715612307431332016417 0ustar ghedoghedo'\" t .\" Title: zmq_pgm .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_PGM" "7" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_pgm \- 0MQ reliable multicast transport using PGM .SH "SYNOPSIS" .sp PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks\&. .SH "DESCRIPTION" .sp 0MQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the \fIpgm\fR transport) and "Encapsulated PGM" or EPGM where PGM datagrams are encapsulated inside UDP datagrams (the \fIepgm\fR transport)\&. .sp The \fIpgm\fR and \fIepgm\fR transports can only be used with the \fIZMQ_PUB\fR and \fIZMQ_SUB\fR socket types\&. .sp Further, PGM sockets are rate limited by default\&. For details, refer to the \fIZMQ_RATE\fR, and \fIZMQ_RECOVERY_IVL\fR options documented in \fBzmq_setsockopt\fR(3)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The \fIpgm\fR transport implementation requires access to raw IP sockets\&. Additional privileges may be required on some operating systems for this operation\&. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the \fIepgm\fR transport instead which does not require any special privileges\&. .sp .5v .RE .SH "ADDRESSING" .sp A 0MQ endpoint is a string consisting of a \fItransport\fR:// followed by an \fIaddress\fR\&. The \fItransport\fR specifies the underlying protocol to use\&. The \fIaddress\fR specifies the transport\-specific address to connect to\&. .sp For the PGM transport, the transport is pgm, and for the EPGM protocol the transport is epgm\&. The meaning of the \fIaddress\fR part is defined below\&. .SS "Connecting a socket" .sp When connecting a socket to a peer address using \fIzmq_connect()\fR with the \fIpgm\fR or \fIepgm\fR transport, the \fIendpoint\fR shall be interpreted as an \fIinterface\fR followed by a semicolon, followed by a \fImulticast address\fR, followed by a colon and a port number\&. .sp An \fIinterface\fR may be specified by either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The interface name as defined by the operating system\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The primary IPv4 address assigned to the interface, in its numeric representation\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent\&. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an \fIinterface\fR\&. The \fIinterface\fR part can be omitted, in that case the default one will be selected\&. .sp .5v .RE .sp A \fImulticast address\fR is specified by an IPv4 multicast address in its numeric representation\&. .SH "WIRE FORMAT" .sp Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams\&. This stream of data consists of 0MQ messages encapsulated in \fIframes\fR as described in \fBzmq_tcp\fR(7)\&. .SS "PGM datagram payload" .sp The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ: .sp .if n \{\ .RS 4 .\} .nf datagram = (offset data) offset = 2OCTET data = *OCTET .fi .if n \{\ .RE .\} .sp In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16\-bit unsigned integer in network byte order specifying either the offset of the first message \fIframe\fR in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message\&. .sp Note that offset specifies where the first message begins rather than the first message part\&. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet\&. .sp The following diagram illustrates the layout of a single PGM datagram payload: .sp .if n \{\ .RS 4 .\} .nf +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | offset (16 bits) | data | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .sp The following diagram further illustrates how three example 0MQ frames are laid out in consecutive PGM datagram payloads: .sp .if n \{\ .RS 4 .\} .nf First datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 1 | Frame 2, part 1 | | 0x0000 | (Message 1) | (Message 2, part 1) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ Second datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 2, part 2 | | 0xFFFF | (Message 2, part 2) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ Third datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 2, final 8 bytes | Frame 3 | | 0x0008 | (Message 2, final 8 bytes) | (Message 3) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .SH "EXAMPLE" .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, // using the first Ethernet network interface on Linux // and the Encapsulated PGM protocol rc = zmq_connect(socket, "epgm://eth0;239\&.192\&.1\&.1:5555"); assert (rc == 0); // Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, // using the network interface with the address 192\&.168\&.1\&.1 // and the standard PGM protocol rc = zmq_connect(socket, "pgm://192\&.168\&.1\&.1;239\&.192\&.1\&.1:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_connect\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_tcp\fR(7) \fBzmq_ipc\fR(7) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_close.html0000644000175000017500000004523212307431353020237 0ustar ghedoghedo zmq_msg_close(3)

SYNOPSIS

int zmq_msg_close (zmq_msg_t *msg);

DESCRIPTION

The zmq_msg_close() function shall inform the ØMQ infrastructure that any resources associated with the message object referenced by msg are no longer required and may be released. Actual release of resources associated with the message object shall be postponed by ØMQ until all users of the message or underlying data buffer have indicated it is no longer required.

Applications should ensure that zmq_msg_close() is called once a message is no longer required, otherwise memory leaks may occur. Note that this is NOT necessary after a successful zmq_msg_send().

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

The zmq_msg_close() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

Invalid message.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_send.30000644000175000017500000001341412307431250017252 0ustar ghedoghedo'\" t .\" Title: zmq_msg_send .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_SEND" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_send \- send a message part on a socket .SH "SYNOPSIS" .sp \fBint zmq_msg_send (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, void \fR\fB\fI*socket\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_send()\fR function is identical to \fBzmq_sendmsg\fR(3), which shall be deprecated in future versions\&. \fIzmq_msg_send()\fR is more consistent with other message manipulation functions\&. .sp The \fIzmq_msg_send()\fR function shall queue the message referenced by the \fImsg\fR argument to be sent to the socket referenced by the \fIsocket\fR argument\&. The \fIflags\fR argument is a combination of the flags defined below: .PP \fBZMQ_DONTWAIT\fR .RS 4 For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high\-water mark), specifies that the operation should be performed in non\-blocking mode\&. If the message cannot be queued on the \fIsocket\fR, the \fIzmq_msg_send()\fR function shall fail with \fIerrno\fR set to EAGAIN\&. .RE .PP \fBZMQ_SNDMORE\fR .RS 4 Specifies that the message being sent is a multi\-part message, and that further message parts are to follow\&. Refer to the section regarding multi\-part messages below for a detailed description\&. .RE .sp The \fIzmq_msg_t\fR structure passed to \fIzmq_msg_send()\fR is nullified during the call\&. If you want to send the same message to multiple sockets you have to copy it using (e\&.g\&. using \fIzmq_msg_copy()\fR)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp A successful invocation of \fIzmq_msg_send()\fR does not indicate that the message has been transmitted to the network, only that it has been queued on the \fIsocket\fR and 0MQ has assumed responsibility for the message\&. You do not need to call \fIzmq_msg_close()\fR after a successful \fIzmq_msg_send()\fR\&. .sp .5v .RE .SS "Multi\-part messages" .sp A 0MQ message is composed of 1 or more message parts\&. Each message part is an independent \fIzmq_msg_t\fR in its own right\&. 0MQ ensures atomic delivery of messages: peers shall receive either all \fImessage parts\fR of a message or none at all\&. The total number of message parts is unlimited except by available memory\&. .sp An application that sends multi\-part messages must use the \fIZMQ_SNDMORE\fR flag when sending each message part except the final one\&. .SH "RETURN VALUE" .sp The \fIzmq_msg_send()\fR function shall return number of bytes in the message if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEAGAIN\fR .RS 4 Non\-blocking mode was requested and the message cannot be sent at the moment\&. .RE .PP \fBENOTSUP\fR .RS 4 The \fIzmq_msg_send()\fR operation is not supported by this socket type\&. .RE .PP \fBEFSM\fR .RS 4 The \fIzmq_msg_send()\fR operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state\&. This error may occur with socket types that switch between several states, such as ZMQ_REP\&. See the \fImessaging patterns\fR section of \fBzmq_socket\fR(3) for more information\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before the message was sent\&. .RE .PP \fBEFAULT\fR .RS 4 Invalid message\&. .RE .PP \fBEHOSTUNREACH\fR .RS 4 The message cannot be routed\&. .RE .SH "EXAMPLE" .PP \fBFilling in a message and sending it to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create a new message, allocating 6 bytes for message content */ zmq_msg_t msg; int rc = zmq_msg_init_size (&msg, 6); assert (rc == 0); /* Fill in message content with \*(AqAAAAAA\*(Aq */ memset (zmq_msg_data (&msg), \*(AqA\*(Aq, 6); /* Send the message to the socket */ rc = zmq_msg_send (&msg, socket, 0); assert (rc == 6); .fi .if n \{\ .RE .\} .PP \fBSending a multi-part message\fR. .sp .if n \{\ .RS 4 .\} .nf /* Send a multi\-part message consisting of three parts to socket */ rc = zmq_msg_send (&part1, socket, ZMQ_SNDMORE); rc = zmq_msg_send (&part2, socket, ZMQ_SNDMORE); /* Final part; no more parts to follow */ rc = zmq_msg_send (&part3, socket, 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_recv\fR(3) \fBzmq_send\fR(3) \fBzmq_msg_recv\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_curve_keypair.30000644000175000017500000000466412307431325020335 0ustar ghedoghedo'\" t .\" Title: zmq_curve_keypair .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CURVE_KEYPAIR" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_curve_keypair \- generate a new CURVE keypair .SH "SYNOPSIS" .sp \fBint zmq_curve_keypair (char *z85_public_key, char *z85_secret_key);\fR .SH "DESCRIPTION" .sp The \fIzmq_curve_keypair()\fR function shall return a newly generated random keypair consisting of a public key and a secret key\&. The caller provides two buffers, each at least 41 octets large, in which this method will store the keys\&. The keys are encoded using \fBzmq_z85_encode\fR(3)\&. .SH "RETURN VALUE" .sp The \fIzmq_curve_keypair()\fR function shall return 0 if successful, else it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBENOTSUP\fR .RS 4 The libzmq library was not built with cryptographic support (libsodium)\&. .RE .SH "EXAMPLE" .PP \fBGenerating a new CURVE keypair\fR. .sp .if n \{\ .RS 4 .\} .nf char public_key [41]; char secret_key [41]; int rc = crypto_box_keypair (public_key, secret_key); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_z85_decode\fR(3) \fBzmq_z85_encode\fR(3) \fBzmq_curve\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_send.30000644000175000017500000001131712307431254016410 0ustar ghedoghedo'\" t .\" Title: zmq_send .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_SEND" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_send \- send a message part on a socket .SH "SYNOPSIS" .sp \fBint zmq_send (void \fR\fB\fI*socket\fR\fR\fB, void \fR\fB\fI*buf\fR\fR\fB, size_t \fR\fB\fIlen\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_send()\fR function shall queue a message created from the buffer referenced by the \fIbuf\fR and \fIlen\fR arguments\&. The \fIflags\fR argument is a combination of the flags defined below: .PP \fBZMQ_DONTWAIT\fR .RS 4 For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high\-water mark), specifies that the operation should be performed in non\-blocking mode\&. If the message cannot be queued on the \fIsocket\fR, the \fIzmq_send()\fR function shall fail with \fIerrno\fR set to EAGAIN\&. .RE .PP \fBZMQ_SNDMORE\fR .RS 4 Specifies that the message being sent is a multi\-part message, and that further message parts are to follow\&. Refer to the section regarding multi\-part messages below for a detailed description\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp A successful invocation of \fIzmq_send()\fR does not indicate that the message has been transmitted to the network, only that it has been queued on the \fIsocket\fR and 0MQ has assumed responsibility for the message\&. .sp .5v .RE .SS "Multi\-part messages" .sp A 0MQ message is composed of 1 or more message parts\&. 0MQ ensures atomic delivery of messages: peers shall receive either all \fImessage parts\fR of a message or none at all\&. The total number of message parts is unlimited except by available memory\&. .sp An application that sends multi\-part messages must use the \fIZMQ_SNDMORE\fR flag when sending each message part except the final one\&. .SH "RETURN VALUE" .sp The \fIzmq_send()\fR function shall return number of bytes in the message if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEAGAIN\fR .RS 4 Non\-blocking mode was requested and the message cannot be sent at the moment\&. .RE .PP \fBENOTSUP\fR .RS 4 The \fIzmq_send()\fR operation is not supported by this socket type\&. .RE .PP \fBEFSM\fR .RS 4 The \fIzmq_send()\fR operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state\&. This error may occur with socket types that switch between several states, such as ZMQ_REP\&. See the \fImessaging patterns\fR section of \fBzmq_socket\fR(3) for more information\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before the message was sent\&. .RE .PP \fBEHOSTUNREACH\fR .RS 4 The message cannot be routed\&. .RE .SH "EXAMPLE" .PP \fBSending a multi-part message\fR. .sp .if n \{\ .RS 4 .\} .nf /* Send a multi\-part message consisting of three parts to socket */ rc = zmq_send (socket, "ABC", 3, ZMQ_SNDMORE); assert (rc == 3); rc = zmq_send (socket, "DEFGH", 5, ZMQ_SNDMORE); assert (rc == 5); /* Final part; no more parts to follow */ rc = zmq_send (socket, "JK", 2, 0); assert (rc == 2); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_send_const\fR(3) \fBzmq_recv\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_z85_encode.txt0000644000175000017500000000235712240736636020113 0ustar ghedoghedozmq_z85_encode(3) ================= NAME ---- zmq_z85_encode - encode a binary key as Z85 printable text SYNOPSIS -------- *char *zmq_z85_encode (char *dest, uint8_t *data, size_t size);* DESCRIPTION ----------- The _zmq_z85_encode()_ function shall encode the binary block specified by 'data' and 'size' into a string in 'dest'. The size of the binary block must be divisible by 4. The 'dest' must have sufficient space for size * 1.25 plus 1 for a null terminator. A 32-byte CURVE key is encoded as 40 ASCII characters plus a null terminator. The encoding shall follow the ZMQ RFC 32 specification. RETURN VALUE ------------ The _zmq_z85_encode()_ function shall return 'dest' if successful, else it shall return NULL. EXAMPLE ------- .Encoding a CURVE key ---- #include uint8_t public_key [32]; uint8_t secret_key [32]; int rc = crypto_box_keypair (public_key, secret_key); assert (rc == 0); char encoded [41]; zmq_z85_encode (encoded, public_key, 32); puts (encoded); ---- SEE ALSO -------- linkzmq:zmq_z85_decode[3] linkzmq:zmq_curve_keypair[3] linkzmq:zmq_curve[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_recvmsg.30000644000175000017500000001235412307431314017124 0ustar ghedoghedo'\" t .\" Title: zmq_recvmsg .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_RECVMSG" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_recvmsg \- receive a message part from a socket .SH "SYNOPSIS" .sp \fBint zmq_recvmsg (void \fR\fB\fI*socket\fR\fR\fB, zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_recvmsg()\fR function shall receive a message part from the socket referenced by the \fIsocket\fR argument and store it in the message referenced by the \fImsg\fR argument\&. Any content previously stored in \fImsg\fR shall be properly deallocated\&. If there are no message parts available on the specified \fIsocket\fR the \fIzmq_recvmsg()\fR function shall block until the request can be satisfied\&. The \fIflags\fR argument is a combination of the flags defined below: .PP \fBZMQ_DONTWAIT\fR .RS 4 Specifies that the operation should be performed in non\-blocking mode\&. If there are no messages available on the specified \fIsocket\fR, the \fIzmq_recvmsg()\fR function shall fail with \fIerrno\fR set to EAGAIN\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp this API method is deprecated in favor of zmq_msg_recv(3)\&. .sp .5v .RE .SS "Multi\-part messages" .sp A 0MQ message is composed of 1 or more message parts\&. Each message part is an independent \fIzmq_msg_t\fR in its own right\&. 0MQ ensures atomic delivery of messages: peers shall receive either all \fImessage parts\fR of a message or none at all\&. The total number of message parts is unlimited except by available memory\&. .sp An application that processes multi\-part messages must use the \fIZMQ_RCVMORE\fR \fBzmq_getsockopt\fR(3) option after calling \fIzmq_recvmsg()\fR to determine if there are further parts to receive\&. .SH "RETURN VALUE" .sp The \fIzmq_recvmsg()\fR function shall return number of bytes in the message if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEAGAIN\fR .RS 4 Non\-blocking mode was requested and no messages are available at the moment\&. .RE .PP \fBENOTSUP\fR .RS 4 The \fIzmq_recvmsg()\fR operation is not supported by this socket type\&. .RE .PP \fBEFSM\fR .RS 4 The \fIzmq_recvmsg()\fR operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state\&. This error may occur with socket types that switch between several states, such as ZMQ_REP\&. See the \fImessaging patterns\fR section of \fBzmq_socket\fR(3) for more information\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before a message was available\&. .RE .PP \fBEFAULT\fR .RS 4 The message passed to the function was invalid\&. .RE .SH "EXAMPLE" .PP \fBReceiving a message from a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create an empty 0MQ message */ zmq_msg_t msg; int rc = zmq_msg_init (&msg); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_recvmsg (socket, &msg, 0); assert (rc != \-1); /* Release message */ zmq_msg_close (&msg); .fi .if n \{\ .RE .\} .PP \fBReceiving a multi-part message\fR. .sp .if n \{\ .RS 4 .\} .nf int64_t more; size_t more_size = sizeof (more); do { /* Create an empty 0MQ message to hold the message part */ zmq_msg_t part; int rc = zmq_msg_init (&part); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_recvmsg (socket, &part, 0); assert (rc != \-1); /* Determine if more message parts are to follow */ rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); zmq_msg_close (&part); } while (more); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_recv\fR(3) \fBzmq_send\fR(3) \fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_data.html0000644000175000017500000004403312307431352020040 0ustar ghedoghedo zmq_msg_data(3)

SYNOPSIS

void *zmq_msg_data (zmq_msg_t *msg);

DESCRIPTION

The zmq_msg_data() function shall return a pointer to the message content of the message object referenced by msg.

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

Upon successful completion, zmq_msg_data() shall return a pointer to the message content.

ERRORS

No errors are defined.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_strerror.txt0000644000175000017500000000211312240736636020020 0ustar ghedoghedozmq_strerror(3) =============== NAME ---- zmq_strerror - get 0MQ error message string SYNOPSIS -------- *const char *zmq_strerror (int 'errnum');* DESCRIPTION ----------- The _zmq_strerror()_ function shall return a pointer to an error message string corresponding to the error number specified by the 'errnum' argument. As 0MQ defines additional error numbers over and above those defined by the operating system, applications should use _zmq_strerror()_ in preference to the standard _strerror()_ function. RETURN VALUE ------------ The _zmq_strerror()_ function shall return a pointer to an error message string. ERRORS ------ No errors are defined. EXAMPLE ------- .Displaying an error message when a 0MQ context cannot be initialised ---- void *ctx = zmq_init (1, 1, 0); if (!ctx) { printf ("Error occurred during zmq_init(): %s\n", zmq_strerror (errno)); abort (); } ---- SEE ALSO -------- linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_size.30000644000175000017500000000432612307431243017277 0ustar ghedoghedo'\" t .\" Title: zmq_msg_size .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_SIZE" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_size \- retrieve message content size in bytes .SH "SYNOPSIS" .sp \fBsize_t zmq_msg_size (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_size()\fR function shall return the size in bytes of the content of the message object referenced by \fImsg\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp Upon successful completion, \fIzmq_msg_size()\fR shall return the size of the message content in bytes\&. .SH "ERRORS" .sp No errors are defined\&. .SH "SEE ALSO" .sp \fBzmq_msg_data\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_setsockopt.txt0000644000175000017500000006712012307426216020337 0ustar ghedoghedozmq_setsockopt(3) ================= NAME ---- zmq_setsockopt - set 0MQ socket options SYNOPSIS -------- *int zmq_setsockopt (void '*socket', int 'option_name', const void '*option_value', size_t 'option_len');* Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE, ZMQ_LINGER, ZMQ_ROUTER_MANDATORY, ZMQ_PROBE_ROUTER, ZMQ_XPUB_VERBOSE, ZMQ_REQ_CORRELATE, and ZMQ_REQ_RELAXED, only take effect for subsequent socket bind/connects. Specifically, security options take effect for subsequent bind/connect calls, and can be changed at any time to affect subsequent binds and/or connects. DESCRIPTION ----------- The _zmq_setsockopt()_ function shall set the option specified by the 'option_name' argument to the value pointed to by the 'option_value' argument for the 0MQ socket pointed to by the 'socket' argument. The 'option_len' argument is the size of the option value in bytes. The following socket options can be set with the _zmq_setsockopt()_ function: ZMQ_SNDHWM: Set high water mark for outbound messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SNDHWM' option shall set the high water mark for outbound messages on the specified 'socket'. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified 'socket' is communicating with. A value of zero means no limit. If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in linkzmq:zmq_socket[3] for details on the exact action taken for each socket type. NOTE: 0MQ does not guarantee that the socket will accept as many as ZMQ_SNDHWM messages, and the actual limit may be as much as 60-70% lower depending on the flow of messages on the socket. [horizontal] Option value type:: int Option value unit:: messages Default value:: 1000 Applicable socket types:: all ZMQ_RCVHWM: Set high water mark for inbound messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVHWM' option shall set the high water mark for inbound messages on the specified 'socket'. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified 'socket' is communicating with. A value of zero means no limit. If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in linkzmq:zmq_socket[3] for details on the exact action taken for each socket type. [horizontal] Option value type:: int Option value unit:: messages Default value:: 1000 Applicable socket types:: all ZMQ_AFFINITY: Set I/O thread affinity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_AFFINITY' option shall set the I/O thread affinity for newly created connections on the specified 'socket'. Affinity determines which threads from the 0MQ I/O thread pool associated with the socket's _context_ shall handle newly created connections. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all 0MQ I/O threads in the thread pool. For non-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on. For example, a value of 3 specifies that subsequent connections on 'socket' shall be handled exclusively by I/O threads 1 and 2. See also linkzmq:zmq_init[3] for details on allocating the number of I/O threads for a specific _context_. [horizontal] Option value type:: uint64_t Option value unit:: N/A (bitmap) Default value:: 0 Applicable socket types:: N/A ZMQ_SUBSCRIBE: Establish message filter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SUBSCRIBE' option shall establish a new message filter on a 'ZMQ_SUB' socket. Newly created 'ZMQ_SUB' sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter. An empty 'option_value' of length zero shall subscribe to all incoming messages. A non-empty 'option_value' shall subscribe to all messages beginning with the specified prefix. Multiple filters may be attached to a single 'ZMQ_SUB' socket, in which case a message shall be accepted if it matches at least one filter. [horizontal] Option value type:: binary data Option value unit:: N/A Default value:: N/A Applicable socket types:: ZMQ_SUB ZMQ_UNSUBSCRIBE: Remove message filter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_UNSUBSCRIBE' option shall remove an existing message filter on a 'ZMQ_SUB' socket. The filter specified must match an existing filter previously established with the 'ZMQ_SUBSCRIBE' option. If the socket has several instances of the same filter attached the 'ZMQ_UNSUBSCRIBE' option shall remove only one instance, leaving the rest in place and functional. [horizontal] Option value type:: binary data Option value unit:: N/A Default value:: N/A Applicable socket types:: ZMQ_SUB ZMQ_IDENTITY: Set socket identity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_IDENTITY' option shall set the identity of the specified 'socket' when connecting to a ROUTER socket. The identity should be from 1 to 255 bytes long and MAY NOT start with binary zero. If two clients use the same identity when connecting to a ROUTER, the ROUTER socket shall accept only the first such client and reject the others. [horizontal] Option value type:: binary data Option value unit:: N/A Default value:: NULL Applicable socket types:: ZMQ_REQ, ZMQ_REP, ZMQ_ROUTER, ZMQ_DEALER. ZMQ_RATE: Set multicast data rate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RATE' option shall set the maximum send or receive data rate for multicast transports such as linkzmq:zmq_pgm[7] using the specified 'socket'. [horizontal] Option value type:: int Option value unit:: kilobits per second Default value:: 100 Applicable socket types:: all, when using multicast transports ZMQ_RECOVERY_IVL: Set multicast recovery interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECOVERY_IVL' option shall set the recovery interval for multicast transports using the specified 'socket'. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur. CAUTION: Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in-memory buffer. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 10000 Applicable socket types:: all, when using multicast transports ZMQ_SNDBUF: Set kernel transmit buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SNDBUF' option shall set the underlying kernel transmit buffer size for the 'socket' to the specified size in bytes. A value of zero means leave the OS default unchanged. For details please refer to your operating system documentation for the 'SO_SNDBUF' socket option. [horizontal] Option value type:: int Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_RCVBUF: Set kernel receive buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVBUF' option shall set the underlying kernel receive buffer size for the 'socket' to the specified size in bytes. A value of zero means leave the OS default unchanged. For details refer to your operating system documentation for the 'SO_RCVBUF' socket option. [horizontal] Option value type:: int Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_LINGER: Set linger period for socket shutdown ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_LINGER' option shall set the linger period for the specified 'socket'. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with linkzmq:zmq_close[3], and further affects the termination of the socket's context with linkzmq:zmq_term[3]. The following outlines the different behaviours: * The default value of '-1' specifies an infinite linger period. Pending messages shall not be discarded after a call to _zmq_close()_; attempting to terminate the socket's context with _zmq_term()_ shall block until all pending messages have been sent to a peer. * The value of '0' specifies no linger period. Pending messages shall be discarded immediately when the socket is closed with _zmq_close()_. * Positive values specify an upper bound for the linger period in milliseconds. Pending messages shall not be discarded after a call to _zmq_close()_; attempting to terminate the socket's context with _zmq_term()_ shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_RECONNECT_IVL: Set reconnection interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECONNECT_IVL' option shall set the initial reconnection interval for the specified 'socket'. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection. NOTE: The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 100 Applicable socket types:: all, only for connection-oriented transports ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECONNECT_IVL_MAX' option shall set the maximum reconnection interval for the specified 'socket'. This is the maximum period 0MQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential backoff strategy. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL. NOTE: Values less than ZMQ_RECONNECT_IVL will be ignored. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 0 (only use ZMQ_RECONNECT_IVL) Applicable socket types:: all, only for connection-oriented transports ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_BACKLOG' option shall set the maximum length of the queue of outstanding peer connections for the specified 'socket'; this only applies to connection-oriented transports. For details refer to your operating system documentation for the 'listen' function. [horizontal] Option value type:: int Option value unit:: connections Default value:: 100 Applicable socket types:: all, only for connection-oriented transports. ZMQ_MAXMSGSIZE: Maximum acceptable inbound message size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Limits the size of the inbound message. If a peer sends a message larger than ZMQ_MAXMSGSIZE it is disconnected. Value of -1 means 'no limit'. [horizontal] Option value type:: int64_t Option value unit:: bytes Default value:: -1 Applicable socket types:: all ZMQ_MULTICAST_HOPS: Maximum network hops for multicast packets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means that the multicast packets don't leave the local network. [horizontal] Option value type:: int Option value unit:: network hops Default value:: 1 Applicable socket types:: all, when using multicast transports ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the timeout for receive operation on the socket. If the value is `0`, _zmq_recv(3)_ will return immediately, with a EAGAIN error if there is no message to receive. If the value is `-1`, it will block until a message is available. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the timeout for send operation on the socket. If the value is `0`, _zmq_send(3)_ will return immediately, with a EAGAIN error if the message cannot be sent. If the value is `-1`, it will block until the message is sent. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_IPV6: Enable IPv6 on socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Set the IPv6 option for the socket. A value of `1` means IPv6 is enabled on the socket, while `0` means the socket will use only IPv4. When IPv6 is enabled the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts. [horizontal] Option value type:: int Option value unit:: boolean Default value:: 0 (false) Applicable socket types:: all, when using TCP transports. ZMQ_IPV4ONLY: Use IPv4-only on socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Set the IPv4-only option for the socket. This option is deprecated. Please use the ZMQ_IPV6 option. [horizontal] Option value type:: int Option value unit:: boolean Default value:: 1 (true) Applicable socket types:: all, when using TCP transports. ZMQ_IMMEDIATE: Queue messages only to completed connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By default queues will fill on outgoing connections even if the connection has not completed. This can lead to "lost" messages on sockets with round-robin routing (REQ, PUSH, DEALER). If this option is set to `1`, messages shall be queued only to completed connections. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection. [horizontal] Option value type:: int Option value unit:: boolean Default value:: 0 (false) Applicable socket types:: all, only for connection-oriented transports. ZMQ_ROUTER_MANDATORY: accept only routable messages on ROUTER sockets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the ROUTER socket behavior when an unroutable message is encountered. A value of `0` is the default and discards the message silently when it cannot be routed. A value of `1` returns an 'EHOSTUNREACH' error code if the message cannot be routed. [horizontal] Option value type:: int Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_ROUTER ZMQ_ROUTER_RAW: switch ROUTER socket to raw mode ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the raw mode on the ROUTER, when set to 1. When the ROUTER socket is in raw mode, and when using the tcp:// transport, it will read and write TCP data without 0MQ framing. This lets 0MQ applications talk to non-0MQ applications. When using raw mode, you cannot set explicit identities, and the ZMQ_MSGMORE flag is ignored when sending data messages. In raw mode you can close a specific connection by sending it a zero-length message (following the identity frame). NOTE: This option is deprecated, please use ZMQ_STREAM sockets instead. [horizontal] Option value type:: int Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_ROUTER ZMQ_PROBE_ROUTER: bootstrap connections to ROUTER sockets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When set to 1, the socket will automatically send an empty message when a new connection is made or accepted. You may set this on REQ, DEALER, or ROUTER sockets connected to a ROUTER socket. The application must filter such empty messages. The ZMQ_PROBE_ROUTER option in effect provides the ROUTER application with an event signaling the arrival of a new peer. NOTE: do not set this option on a socket that talks to any other socket types: the results are undefined. [horizontal] Option value type:: int Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_ROUTER, ZMQ_DEALER, ZMQ_REQ ZMQ_XPUB_VERBOSE: provide all subscription messages on XPUB sockets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the 'XPUB' socket behavior on new subscriptions and unsubscriptions. A value of '0' is the default and passes only new subscription messages to upstream. A value of '1' passes all subscription messages upstream. [horizontal] Option value type:: int Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_XPUB ZMQ_REQ_CORRELATE: match replies with requests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The default behavior of REQ sockets is to rely on the ordering of messages to match requests and responses and that is usually sufficient. When this option is set to 1, the REQ socket will prefix outgoing messages with an extra frame containing a request id. That means the full message is (request id, 0, user frames...). The REQ socket will discard all incoming messages that don't begin with these two frames. [horizontal] Option value type:: int Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_REQ ZMQ_REQ_RELAXED: relax strict alternation between request and reply ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By default, a REQ socket does not allow initiating a new request with _zmq_send(3)_ until the reply to the previous one has been received. When set to 1, sending another message is allowed and has the effect of disconnecting the underlying connection to the peer from which the reply was expected, triggering a reconnection attempt on transports that support it. The request-reply state machine is reset and a new request is sent to the next available peer. If set to 1, also enable ZMQ_REQ_CORRELATE to ensure correct matching of requests and replies. Otherwise a late reply to an aborted request can be reported as the reply to the superseding request. [horizontal] Option value type:: int Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: ZMQ_REQ ZMQ_TCP_KEEPALIVE: Override SO_KEEPALIVE socket option ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override 'SO_KEEPALIVE' socket option (where supported by OS). The default value of `-1` means to skip any overrides and leave it to OS default. [horizontal] Option value type:: int Option value unit:: -1,0,1 Default value:: -1 (leave to OS default) Applicable socket types:: all, when using TCP transports. ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPCNT (or TCP_KEEPALIVE on some OS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override 'TCP_KEEPCNT'(or 'TCP_KEEPALIVE' on some OS) socket option (where supported by OS). The default value of `-1` means to skip any overrides and leave it to OS default. [horizontal] Option value type:: int Option value unit:: -1,>0 Default value:: -1 (leave to OS default) Applicable socket types:: all, when using TCP transports. ZMQ_TCP_KEEPALIVE_CNT: Override TCP_KEEPCNT socket option ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override 'TCP_KEEPCNT' socket option (where supported by OS). The default value of `-1` means to skip any overrides and leave it to OS default. [horizontal] Option value type:: int Option value unit:: -1,>0 Default value:: -1 (leave to OS default) Applicable socket types:: all, when using TCP transports. ZMQ_TCP_KEEPALIVE_INTVL: Override TCP_KEEPINTVL socket option ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Override 'TCP_KEEPINTVL' socket option(where supported by OS). The default value of `-1` means to skip any overrides and leave it to OS default. [horizontal] Option value type:: int Option value unit:: -1,>0 Default value:: -1 (leave to OS default) Applicable socket types:: all, when using TCP transports. ZMQ_TCP_ACCEPT_FILTER: Assign filters to allow new TCP connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Assign an arbitrary number of filters that will be applied for each new TCP transport connection on a listening socket. If no filters are applied, then the TCP transport allows connections from any IP address. If at least one filter is applied then new connection source ip should be matched. To clear all filters call zmq_setsockopt(socket, ZMQ_TCP_ACCEPT_FILTER, NULL, 0). Filter is a null-terminated string with ipv6 or ipv4 CIDR. [horizontal] Option value type:: binary data Option value unit:: N/A Default value:: no filters (allow from all) Applicable socket types:: all listening sockets, when using TCP transports. ZMQ_PLAIN_SERVER: Set PLAIN server role ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Defines whether the socket will act as server for PLAIN security, see linkzmq:zmq_plain[7]. A value of '1' means the socket will act as PLAIN server. A value of '0' means the socket will not act as PLAIN server, and its security role then depends on other option settings. Setting this to '0' shall reset the socket security to NULL. [horizontal] Option value type:: int Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: all, when using TCP transport ZMQ_PLAIN_USERNAME: Set PLAIN security username ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the username for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN, see linkzmq:zmq_plain[7]. If you set this to a null value, the security mechanism used for connections shall be NULL, see linkzmq:zmq_null[3]. [horizontal] Option value type:: character string Option value unit:: N/A Default value:: not set Applicable socket types:: all, when using TCP transport ZMQ_PLAIN_PASSWORD: Set PLAIN security password ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the password for outgoing connections over TCP or IPC. If you set this to a non-null value, the security mechanism used for connections shall be PLAIN, see linkzmq:zmq_plain[7]. If you set this to a null value, the security mechanism used for connections shall be NULL, see linkzmq:zmq_null[3]. [horizontal] Option value type:: character string Option value unit:: N/A Default value:: not set Applicable socket types:: all, when using TCP transport ZMQ_CURVE_SERVER: Set CURVE server role ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Defines whether the socket will act as server for CURVE security, see linkzmq:zmq_curve[7]. A value of '1' means the socket will act as CURVE server. A value of '0' means the socket will not act as CURVE server, and its security role then depends on other option settings. Setting this to '0' shall reset the socket security to NULL. When you set this you must also set the server's secret key using the ZMQ_CURVE_SECRETKEY option. A server socket does not need to know its own public key. [horizontal] Option value type:: int Option value unit:: 0, 1 Default value:: 0 Applicable socket types:: all, when using TCP transport ZMQ_CURVE_PUBLICKEY: Set CURVE public key ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the socket's long term public key. You must set this on CURVE client sockets, see linkzmq:zmq_curve[7]. You can provide the key as 32 binary bytes, or as a 40-character string encoded in the Z85 encoding format. The public key must always be used with the matching secret key. To generate a public/secret key pair, use linkzmq:zmq_curve_keypair[3]. [horizontal] Option value type:: binary data or Z85 text string Option value size:: 32 or 40 Default value:: NULL Applicable socket types:: all, when using TCP transport ZMQ_CURVE_SECRETKEY: Set CURVE secret key ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the socket's long term secret key. You must set this on both CURVE client and server sockets, see linkzmq:zmq_curve[7]. You can provide the key as 32 binary bytes, or as a 40-character string encoded in the Z85 encoding format. To generate a public/secret key pair, use linkzmq:zmq_curve_keypair[3]. [horizontal] Option value type:: binary data or Z85 text string Option value size:: 32 or 40 Default value:: NULL Applicable socket types:: all, when using TCP transport ZMQ_CURVE_SERVERKEY: Set CURVE server key ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the socket's long term server key. You must set this on CURVE client sockets, see linkzmq:zmq_curve[7]. You can provide the key as 32 binary bytes, or as a 40-character string encoded in the Z85 encoding format. This key must have been generated together with the server's secret key. [horizontal] Option value type:: binary data or Z85 text string Option value size:: 32 or 40 Default value:: NULL Applicable socket types:: all, when using TCP transport ZMQ_ZAP_DOMAIN: Set RFC 27 authentication domain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the domain for ZAP (ZMQ RFC 27) authentication. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non-empty domain. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present. See http://rfc.zeromq.org/spec:27 for more details. [horizontal] Option value type:: character string Option value unit:: N/A Default value:: not set Applicable socket types:: all, when using TCP transport ZMQ_CONFLATE: Keep only last message ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If set, a socket shall keep only one message in its inbound/outbound queue, this message being the last message received/the last message to be sent. Ignores 'ZMQ_RECVHWM' and 'ZMQ_SENDHWM' options. Does not supports multi-part messages, in particular, only one part of it is kept in the socket internal queue. [horizontal] Option value type:: int Option value unit:: boolean Default value:: 0 (false) Applicable socket types:: ZMQ_PULL, ZMQ_PUSH, ZMQ_SUB, ZMQ_PUB, ZMQ_DEALER RETURN VALUE ------------ The _zmq_setsockopt()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested option _option_name_ is unknown, or the requested _option_len_ or _option_value_ is invalid. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal. EXAMPLE ------- .Subscribing to messages on a 'ZMQ_SUB' socket ---- /* Subscribe to all messages */ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "", 0); assert (rc == 0); /* Subscribe to messages prefixed with "ANIMALS.CATS" */ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12); ---- .Setting I/O thread affinity ---- int64_t affinity; /* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */ affinity = 1; rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity)); assert (rc); rc = zmq_bind (socket, "tcp://lo:5555"); assert (rc); /* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */ affinity = 2; rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity)); assert (rc); rc = zmq_bind (socket, "tcp://lo:5556"); assert (rc); ---- SEE ALSO -------- linkzmq:zmq_getsockopt[3] linkzmq:zmq_socket[3] linkzmq:zmq_plain[7] linkzmq:zmq_curve[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_get.html0000644000175000017500000004565712307431356017727 0ustar ghedoghedo zmq_msg_get(3)

SYNOPSIS

int zmq_msg_get (zmq_msg_t *message, int property);

DESCRIPTION

The zmq_msg_get() function shall return the value for the property specified by the property argument for the message pointed to by the message argument.

The following properties can be retrieved with the zmq_msg_get() function:

ZMQ_MORE

Indicates that there are more message frames to follow after the message.

RETURN VALUE

The zmq_msg_get() function shall return the value for the property if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The requested property is unknown.

EXAMPLE

Receiving a multi-frame message
zmq_msg_t frame;
while (true) {
    //  Create an empty 0MQ message to hold the message frame
    int rc = zmq_msg_init (&frame);
    assert (rc == 0);
    //  Block until a message is available to be received from socket
    rc = zmq_msg_recv (socket, &frame, 0);
    assert (rc != -1);
    if (zmq_msg_get (&frame, ZMQ_MORE))
        fprintf (stderr, "more\n");
    else {
        fprintf (stderr, "end\n");
        break;
    }
    zmq_msg_close (&frame);
}

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_strerror.30000644000175000017500000000452512307431305017341 0ustar ghedoghedo'\" t .\" Title: zmq_strerror .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_STRERROR" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_strerror \- get 0MQ error message string .SH "SYNOPSIS" .sp \fBconst char *zmq_strerror (int \fR\fB\fIerrnum\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_strerror()\fR function shall return a pointer to an error message string corresponding to the error number specified by the \fIerrnum\fR argument\&. As 0MQ defines additional error numbers over and above those defined by the operating system, applications should use \fIzmq_strerror()\fR in preference to the standard \fIstrerror()\fR function\&. .SH "RETURN VALUE" .sp The \fIzmq_strerror()\fR function shall return a pointer to an error message string\&. .SH "ERRORS" .sp No errors are defined\&. .SH "EXAMPLE" .PP \fBDisplaying an error message when a 0MQ context cannot be initialised\fR. .sp .if n \{\ .RS 4 .\} .nf void *ctx = zmq_init (1, 1, 0); if (!ctx) { printf ("Error occurred during zmq_init(): %s\en", zmq_strerror (errno)); abort (); } .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_curve_keypair.txt0000644000175000017500000000227312240736636021015 0ustar ghedoghedozmq_curve_keypair(3) ==================== NAME ---- zmq_curve_keypair - generate a new CURVE keypair SYNOPSIS -------- *int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key);* DESCRIPTION ----------- The _zmq_curve_keypair()_ function shall return a newly generated random keypair consisting of a public key and a secret key. The caller provides two buffers, each at least 41 octets large, in which this method will store the keys. The keys are encoded using linkzmq:zmq_z85_encode[3]. RETURN VALUE ------------ The _zmq_curve_keypair()_ function shall return 0 if successful, else it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *ENOTSUP*:: The libzmq library was not built with cryptographic support (libsodium). EXAMPLE ------- .Generating a new CURVE keypair ---- char public_key [41]; char secret_key [41]; int rc = crypto_box_keypair (public_key, secret_key); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_z85_decode[3] linkzmq:zmq_z85_encode[3] linkzmq:zmq_curve[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_tcp.html0000644000175000017500000005143712307431373017060 0ustar ghedoghedo zmq_tcp(7)

SYNOPSIS

TCP is an ubiquitous, reliable, unicast transport. When connecting distributed applications over a network with ØMQ, using the TCP transport will likely be your first choice.

ADDRESSING

A ØMQ endpoint is a string consisting of a transport:// followed by an address. The transport specifies the underlying protocol to use. The address specifies the transport-specific address to connect to.

For the TCP transport, the transport is tcp, and the meaning of the address part is defined below.

Assigning a local address to a socket

When assigning a local address to a socket using zmq_bind() with the tcp transport, the endpoint shall be interpreted as an interface followed by a colon and the TCP port number to use.

An interface may be specified by either of the following:

  • The wild-card *, meaning all available interfaces.

  • The primary IPv4 or IPv6 address assigned to the interface, in its numeric representation.

  • The non-portable interface name as defined by the operating system.

The TCP port number may be specified by:

  • A numeric value, usually above 1024 on POSIX systems.

  • The wild-card *, meaning a system-assigned ephemeral port.

When using ephemeral ports, the caller should retrieve the actual assigned port using the ZMQ_LAST_ENDPOINT socket option. See zmq_getsockopt(3) for details.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the tcp transport, the endpoint shall be interpreted as a peer address followed by a colon and the TCP port number to use.

A peer address may be specified by either of the following:

  • The DNS name of the peer.

  • The IPv4 or IPv6 address of the peer, in its numeric representation.

Note: A description of the ZeroMQ Message Transport Protocol (ZMTP) which is used by the TCP transport can be found at http://rfc.zeromq.org/spec:15

EXAMPLES

Assigning a local address to a socket
//  TCP port 5555 on all available interfaces
rc = zmq_bind(socket, "tcp:/// :5555");
assert (rc == 0);
//  TCP port 5555 on the local loop-back interface on all platforms
rc = zmq_bind(socket, "tcp://127.0.0.1:5555");
assert (rc == 0);
//  TCP port 5555 on the first Ethernet network interface on Linux
rc = zmq_bind(socket, "tcp://eth0:5555");
assert (rc == 0);
Connecting a socket
//  Connecting using an IP address
rc = zmq_connect(socket, "tcp://192.168.1.1:5555");
assert (rc == 0);
//  Connecting using a DNS name
rc = zmq_connect(socket, "tcp://server1:5555");
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_close.30000644000175000017500000000523112307431220016553 0ustar ghedoghedo'\" t .\" Title: zmq_close .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CLOSE" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_close \- close 0MQ socket .SH "SYNOPSIS" .sp \fBint zmq_close (void \fR\fB\fI*socket\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_close()\fR function shall destroy the socket referenced by the \fIsocket\fR argument\&. Any outstanding messages physically received from the network but not yet received by the application with \fIzmq_recv()\fR shall be discarded\&. The behaviour for discarding messages sent by the application with \fIzmq_send()\fR but not yet physically transferred to the network depends on the value of the \fIZMQ_LINGER\fR socket option for the specified \fIsocket\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The default setting of \fIZMQ_LINGER\fR does not discard unsent messages; this behaviour may cause the application to block when calling \fIzmq_term()\fR\&. For details refer to \fBzmq_setsockopt\fR(3) and \fBzmq_term\fR(3)\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_close()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .SH "SEE ALSO" .sp \fBzmq_socket\fR(3) \fBzmq_term\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_z85_decode.txt0000644000175000017500000000177212240736636020101 0ustar ghedoghedozmq_z85_decode(3) ================= NAME ---- zmq_z85_decode - decode a binary key from Z85 printable text SYNOPSIS -------- *uint8_t *zmq_z85_decode (uint8_t *dest, char *string);* DESCRIPTION ----------- The _zmq_z85_decode()_ function shall decode 'string' into 'dest'. The length of 'string' shall be divisible by 5. 'dest' must be large enough for the decoded value (0.8 x strlen (string)). The encoding shall follow the ZMQ RFC 32 specification. RETURN VALUE ------------ The _zmq_z85_decode()_ function shall return 'dest' if successful, else it shall return NULL. EXAMPLE ------- .Decoding a CURVE key ---- char decoded [] = "rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7"; uint8_t public_key [32]; zmq_z85_decode (public_key, decoded); ---- SEE ALSO -------- linkzmq:zmq_z85_decode[3] linkzmq:zmq_curve_keypair[3] linkzmq:zmq_curve[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_socket_monitor.txt0000644000175000017500000001670612240736636021212 0ustar ghedoghedozmq_ctx_socket_monitor(3) ========================= NAME ---- zmq_socket_monitor - register a monitoring callback SYNOPSIS -------- *int zmq_socket_monitor (void '*socket', char * '*addr', int 'events');* DESCRIPTION ----------- The _zmq_socket_monitor()_ function shall spawn a 'PAIR' socket that publishes socket state changes (events) over the inproc:// transport to a given endpoint. Messages consist of 2 Frames, the first containing the event-id and the associated value. The second frame holds the affected endpoint as string. The layout of the first Frame is: 16 bit event id 32 bit event value event id and value are in the native byte order (for the machine the application is running on). There is no padding between the fields. The event value has to be interpreted in the context of the event id. See 'Supported events' below for details. ---- Only connection oriented (tcp and ipc) transports are supported in this initial implementation. ---- Supported events ---------------- ZMQ_EVENT_CONNECTED: connection established ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_CONNECTED' event triggers when a connection has been established to a remote peer. This can happen either synchronous or asynchronous. Value is the FD of the newly connected socket. ZMQ_EVENT_CONNECT_DELAYED: synchronous connect failed, it's being polled ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_CONNECT_DELAYED' event triggers when an immediate connection attempt is delayed and its completion is being polled for. Value has no meaning. ZMQ_EVENT_CONNECT_RETRIED: asynchronous connect / reconnection attempt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_CONNECT_RETRIED' event triggers when a connection attempt is being handled by reconnect timer. The reconnect interval's recomputed for each attempt. Value is the reconnect interval. ZMQ_EVENT_LISTENING: socket bound to an address, ready to accept connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_LISTENING' event triggers when a socket's successfully bound to a an interface. Value is the FD of the newly bound socket. ZMQ_EVENT_BIND_FAILED: socket could not bind to an address ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_BIND_FAILED' event triggers when a socket could not bind to a given interface. Value is the errno generated by the bind call. ZMQ_EVENT_ACCEPTED: connection accepted to bound interface ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_ACCEPTED' event triggers when a connection from a remote peer has been established with a socket's listen address. Value is the FD of the accepted socket. ZMQ_EVENT_ACCEPT_FAILED: could not accept client connection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_ACCEPT_FAILED' event triggers when a connection attempt to a socket's bound address fails. Value is the errno generated by accept. ZMQ_EVENT_CLOSED: connection closed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_CLOSED' event triggers when a connection's underlying descriptor has been closed. Value is the former FD of the for the closed socket. FD has been closed already! ZMQ_EVENT_CLOSE_FAILED: connection couldn't be closed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_CLOSE_FAILED' event triggers when a descriptor could not be released back to the OS. Implementation note: ONLY FOR IPC SOCKETS. Value is the errno generated by unlink. ZMQ_EVENT_DISCONNECTED: broken session ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENT_DISCONNECTED' event triggers when the stream engine (tcp and ipc specific) detects a corrupted / broken session. Value is the FD of the socket. RETURN VALUE ------------ The _zmq_socket_monitor()_ function returns a value of 0 or greater if successful. Otherwise it returns `-1` and sets 'errno' to one of the values defined below. ERRORS ------ *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *EPROTONOSUPPORT*:: The requested 'transport' protocol is not supported. Monitor sockets are required to use the inproc:// transport. *EINVAL*:: The endpoint supplied is invalid. EXAMPLE ------- .Observing a 'REP' socket's connection state ---- #include #include #include #include #include static int read_msg(void* s, zmq_event_t* event, char* ep) { int rc ; zmq_msg_t msg1; // binary part zmq_msg_init (&msg1); zmq_msg_t msg2; // address part zmq_msg_init (&msg2); rc = zmq_msg_recv (&msg1, s, 0); if (rc == -1 && zmq_errno() == ETERM) return 1 ; assert (rc != -1); assert (zmq_msg_more(&msg1) != 0); rc = zmq_msg_recv (&msg2, s, 0); if (rc == -1 && zmq_errno() == ETERM) return 1; assert (rc != -1); assert (zmq_msg_more(&msg2) == 0); // copy binary data to event struct const char* data = (char*)zmq_msg_data(&msg1); memcpy(&(event->event), data, sizeof(event->event)); memcpy(&(event->value), data+sizeof(event->event), sizeof(event->value)); // copy address part const size_t len = zmq_msg_size(&msg2) ; ep = memcpy(ep, zmq_msg_data(&msg2), len); *(ep + len) = 0 ; return 0 ; } // REP socket monitor thread static void *rep_socket_monitor (void *ctx) { zmq_event_t event; static char addr[1025] ; int rc; printf("starting monitor...\n"); void *s = zmq_socket (ctx, ZMQ_PAIR); assert (s); rc = zmq_connect (s, "inproc://monitor.rep"); assert (rc == 0); while (!read_msg(s, &event, addr)) { switch (event.event) { case ZMQ_EVENT_LISTENING: printf ("listening socket descriptor %d\n", event.value); printf ("listening socket address %s\n", addr); break; case ZMQ_EVENT_ACCEPTED: printf ("accepted socket descriptor %d\n", event.value); printf ("accepted socket address %s\n", addr); break; case ZMQ_EVENT_CLOSE_FAILED: printf ("socket close failure error code %d\n", event.value); printf ("socket address %s\n", addr); break; case ZMQ_EVENT_CLOSED: printf ("closed socket descriptor %d\n", event.value); printf ("closed socket address %s\n", addr); break; case ZMQ_EVENT_DISCONNECTED: printf ("disconnected socket descriptor %d\n", event.value); printf ("disconnected socket address %s\n", addr); break; } } zmq_close (s); return NULL; } int main() { const char* addr = "tcp://127.0.0.1:6666" ; pthread_t thread ; // Create the infrastructure void *ctx = zmq_init (1); assert (ctx); // REP socket void* rep = zmq_socket (ctx, ZMQ_REP); assert (rep); // REP socket monitor, all events int rc = zmq_socket_monitor (rep, "inproc://monitor.rep", ZMQ_EVENT_ALL); assert (rc == 0); rc = pthread_create (&thread, NULL, rep_socket_monitor, ctx); assert (rc == 0); rc = zmq_bind (rep, addr); assert (rc == 0); // Allow some time for event detection zmq_sleep (1); // Close the REP socket rc = zmq_close (rep); assert (rc == 0); zmq_term (ctx); return 0 ; } ---- SEE ALSO -------- linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_init.html0000644000175000017500000004555412307431350020101 0ustar ghedoghedo zmq_msg_init(3)

SYNOPSIS

int zmq_msg_init (zmq_msg_t *msg);

DESCRIPTION

The zmq_msg_init() function shall initialise the message object referenced by msg to represent an empty message. This function is most useful when called before receiving a message with zmq_recv().

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.
Caution
The functions zmq_msg_init(), zmq_msg_init_data() and zmq_msg_init_size() are mutually exclusive. Never initialize the same zmq_msg_t twice.

RETURN VALUE

The zmq_msg_init() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

No errors are defined.

EXAMPLE

Receiving a message from a socket
zmq_msg_t msg;
rc = zmq_msg_init (&msg);
assert (rc == 0);
rc = zmq_recv (socket, &msg, 0);
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_send.html0000644000175000017500000005237112307431354017220 0ustar ghedoghedo zmq_send(3)

SYNOPSIS

int zmq_send (void *socket, void *buf, size_t len, int flags);

DESCRIPTION

The zmq_send() function shall queue a message created from the buffer referenced by the buf and len arguments. The flags argument is a combination of the flags defined below:

ZMQ_DONTWAIT

For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high-water mark), specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the socket, the zmq_send() function shall fail with errno set to EAGAIN.

ZMQ_SNDMORE

Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description.

Note
A successful invocation of zmq_send() does not indicate that the message has been transmitted to the network, only that it has been queued on the socket and ØMQ has assumed responsibility for the message.

Multi-part messages

A ØMQ message is composed of 1 or more message parts. ØMQ ensures atomic delivery of messages: peers shall receive either all message parts of a message or none at all. The total number of message parts is unlimited except by available memory.

An application that sends multi-part messages must use the ZMQ_SNDMORE flag when sending each message part except the final one.

RETURN VALUE

The zmq_send() function shall return number of bytes in the message if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EAGAIN

Non-blocking mode was requested and the message cannot be sent at the moment.

ENOTSUP

The zmq_send() operation is not supported by this socket type.

EFSM

The zmq_send() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal before the message was sent.

EHOSTUNREACH

The message cannot be routed.

EXAMPLE

Sending a multi-part message
/* Send a multi-part message consisting of three parts to socket */
rc = zmq_send (socket, "ABC", 3, ZMQ_SNDMORE);
assert (rc == 3);
rc = zmq_send (socket, "DEFGH", 5, ZMQ_SNDMORE);
assert (rc == 5);
/* Final part; no more parts to follow */
rc = zmq_send (socket, "JK", 2, 0);
assert (rc == 2);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_get.txt0000644000175000017500000000277712240736636017613 0ustar ghedoghedozmq_ctx_get(3) ============== NAME ---- zmq_ctx_get - get context options SYNOPSIS -------- *int zmq_ctx_get (void '*context', int 'option_name');* DESCRIPTION ----------- The _zmq_ctx_get()_ function shall return the option specified by the 'option_name' argument. The _zmq_ctx_get()_ function accepts the following option names: ZMQ_IO_THREADS: Get number of I/O threads ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_IO_THREADS' argument returns the size of the 0MQ thread pool for this context. ZMQ_MAX_SOCKETS: Get maximum number of sockets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_MAX_SOCKETS' argument returns the maximum number of sockets allowed for this context. ZMQ_IPV6: Set IPv6 option ~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_IPV6' argument returns the IPv6 option for the context. RETURN VALUE ------------ The _zmq_ctx_get()_ function returns a value of 0 or greater if successful. Otherwise it returns `-1` and sets 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested option _option_name_ is unknown. EXAMPLE ------- .Setting a limit on the number of sockets ---- void *context = zmq_ctx_new (); zmq_ctx_set (context, ZMQ_MAX_SOCKETS, 256); int max_sockets = zmq_ctx_get (context, ZMQ_MAX_SOCKETS); assert (max_sockets == 256); ---- SEE ALSO -------- linkzmq:zmq_ctx_set[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_term.html0000644000175000017500000004634312307431370017236 0ustar ghedoghedo zmq_term(3)

SYNOPSIS

int zmq_term (void *context);

DESCRIPTION

The zmq_term() function shall terminate the ØMQ context context.

Context termination is performed in the following steps:

  1. Any blocking operations currently in progress on sockets open within context shall return immediately with an error code of ETERM. With the exception of zmq_close(), any further operations on sockets open within context shall fail with an error code of ETERM.

  2. After interrupting all blocking calls, zmq_term() shall block until the following conditions are satisfied:

    • All sockets open within context have been closed with zmq_close().

    • For each socket within context, all messages sent by the application with zmq_send() have either been physically transferred to a network peer, or the socket’s linger period set with the ZMQ_LINGER socket option has expired.

For further details regarding socket linger behaviour refer to the ZMQ_LINGER option in zmq_setsockopt(3).

This function is deprecated by zmq_ctx_term(3).

RETURN VALUE

The zmq_term() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

The provided context was invalid.

EINTR

Termination was interrupted by a signal. It can be restarted if needed.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_socket_monitor.html0000644000175000017500000006427212307431364021332 0ustar ghedoghedo zmq_ctx_socket_monitor(3)

SYNOPSIS

int zmq_socket_monitor (void *socket, char * *addr, int events);

DESCRIPTION

The zmq_socket_monitor() function shall spawn a PAIR socket that publishes socket state changes (events) over the inproc:// transport to a given endpoint.

Messages consist of 2 Frames, the first containing the event-id and the associated value. The second frame holds the affected endpoint as string.

The layout of the first Frame is: 16 bit event id 32 bit event value

event id and value are in the native byte order (for the machine the application is running on). There is no padding between the fields.

The event value has to be interpreted in the context of the event id. See Supported events below for details.

Only connection oriented (tcp and ipc) transports are supported in this initial
implementation.

Supported events

ZMQ_EVENT_CONNECTED: connection established

The ZMQ_EVENT_CONNECTED event triggers when a connection has been established to a remote peer. This can happen either synchronous or asynchronous. Value is the FD of the newly connected socket.

ZMQ_EVENT_CONNECT_DELAYED: synchronous connect failed, it’s being polled

The ZMQ_EVENT_CONNECT_DELAYED event triggers when an immediate connection attempt is delayed and its completion is being polled for. Value has no meaning.

ZMQ_EVENT_CONNECT_RETRIED: asynchronous connect / reconnection attempt

The ZMQ_EVENT_CONNECT_RETRIED event triggers when a connection attempt is being handled by reconnect timer. The reconnect interval’s recomputed for each attempt. Value is the reconnect interval.

ZMQ_EVENT_LISTENING: socket bound to an address, ready to accept connections

The ZMQ_EVENT_LISTENING event triggers when a socket’s successfully bound to a an interface. Value is the FD of the newly bound socket.

ZMQ_EVENT_BIND_FAILED: socket could not bind to an address

The ZMQ_EVENT_BIND_FAILED event triggers when a socket could not bind to a given interface. Value is the errno generated by the bind call.

ZMQ_EVENT_ACCEPTED: connection accepted to bound interface

The ZMQ_EVENT_ACCEPTED event triggers when a connection from a remote peer has been established with a socket’s listen address. Value is the FD of the accepted socket.

ZMQ_EVENT_ACCEPT_FAILED: could not accept client connection

The ZMQ_EVENT_ACCEPT_FAILED event triggers when a connection attempt to a socket’s bound address fails. Value is the errno generated by accept.

ZMQ_EVENT_CLOSED: connection closed

The ZMQ_EVENT_CLOSED event triggers when a connection’s underlying descriptor has been closed. Value is the former FD of the for the closed socket. FD has been closed already!

ZMQ_EVENT_CLOSE_FAILED: connection couldn’t be closed

The ZMQ_EVENT_CLOSE_FAILED event triggers when a descriptor could not be released back to the OS. Implementation note: ONLY FOR IPC SOCKETS. Value is the errno generated by unlink.

ZMQ_EVENT_DISCONNECTED: broken session

The ZMQ_EVENT_DISCONNECTED event triggers when the stream engine (tcp and ipc specific) detects a corrupted / broken session. Value is the FD of the socket.

RETURN VALUE

The zmq_socket_monitor() function returns a value of 0 or greater if successful. Otherwise it returns -1 and sets errno to one of the values defined below.

ERRORS

ETERM

The ØMQ context associated with the specified socket was terminated.

EPROTONOSUPPORT

The requested transport protocol is not supported. Monitor sockets are required to use the inproc:// transport.

EINVAL

The endpoint supplied is invalid.

EXAMPLE

Observing a REP socket’s connection state
#include <stdio.h>
#include <zmq.h>
#include <pthread.h>
#include <string.h>
#include <assert.h>

static int read_msg(void* s, zmq_event_t* event, char* ep)
{
    int rc ;
    zmq_msg_t msg1;  // binary part
    zmq_msg_init (&msg1);
    zmq_msg_t msg2;  //  address part
    zmq_msg_init (&msg2);
    rc = zmq_msg_recv (&msg1, s, 0);
    if (rc == -1 && zmq_errno() == ETERM)
        return 1 ;
    assert (rc != -1);
    assert (zmq_msg_more(&msg1) != 0);
    rc = zmq_msg_recv (&msg2, s, 0);
    if (rc == -1 && zmq_errno() == ETERM)
        return 1;
    assert (rc != -1);
    assert (zmq_msg_more(&msg2) == 0);
    // copy binary data to event struct
    const char* data = (char*)zmq_msg_data(&msg1);
    memcpy(&(event->event), data, sizeof(event->event));
    memcpy(&(event->value), data+sizeof(event->event), sizeof(event->value));
    // copy address part
    const size_t len = zmq_msg_size(&msg2) ;
    ep = memcpy(ep, zmq_msg_data(&msg2), len);
    *(ep + len) = 0 ;
    return 0 ;
}

// REP socket monitor thread
static void *rep_socket_monitor (void *ctx)
{
    zmq_event_t event;
    static char addr[1025] ;
    int rc;

    printf("starting monitor...\n");

    void *s = zmq_socket (ctx, ZMQ_PAIR);
    assert (s);

    rc = zmq_connect (s, "inproc://monitor.rep");
    assert (rc == 0);
    while (!read_msg(s, &event, addr)) {
        switch (event.event) {
        case ZMQ_EVENT_LISTENING:
            printf ("listening socket descriptor %d\n", event.value);
            printf ("listening socket address %s\n", addr);
            break;
        case ZMQ_EVENT_ACCEPTED:
            printf ("accepted socket descriptor %d\n", event.value);
            printf ("accepted socket address %s\n", addr);
            break;
        case ZMQ_EVENT_CLOSE_FAILED:
            printf ("socket close failure error code %d\n", event.value);
            printf ("socket address %s\n", addr);
            break;
        case ZMQ_EVENT_CLOSED:
            printf ("closed socket descriptor %d\n", event.value);
            printf ("closed socket address %s\n", addr);
            break;
        case ZMQ_EVENT_DISCONNECTED:
            printf ("disconnected socket descriptor %d\n", event.value);
            printf ("disconnected socket address %s\n", addr);
            break;
        }
    }
    zmq_close (s);
    return NULL;
}


int main()
{
    const char* addr = "tcp://127.0.0.1:6666" ;
    pthread_t thread ;

    //  Create the infrastructure
    void *ctx = zmq_init (1);
    assert (ctx);

    // REP socket
    void* rep = zmq_socket (ctx, ZMQ_REP);
    assert (rep);

    // REP socket monitor, all events
    int rc = zmq_socket_monitor (rep, "inproc://monitor.rep", ZMQ_EVENT_ALL);
    assert (rc == 0);
    rc = pthread_create (&thread, NULL, rep_socket_monitor, ctx);
    assert (rc == 0);

    rc = zmq_bind (rep, addr);
    assert (rc == 0);

    // Allow some time for event detection
    zmq_sleep (1);

    // Close the REP socket
    rc = zmq_close (rep);
    assert (rc == 0);

    zmq_term (ctx);

    return 0 ;
}

SEE ALSO

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_pgm.70000644000175000017500000001715612307431332016252 0ustar ghedoghedo'\" t .\" Title: zmq_pgm .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_PGM" "7" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_pgm \- 0MQ reliable multicast transport using PGM .SH "SYNOPSIS" .sp PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks\&. .SH "DESCRIPTION" .sp 0MQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the \fIpgm\fR transport) and "Encapsulated PGM" or EPGM where PGM datagrams are encapsulated inside UDP datagrams (the \fIepgm\fR transport)\&. .sp The \fIpgm\fR and \fIepgm\fR transports can only be used with the \fIZMQ_PUB\fR and \fIZMQ_SUB\fR socket types\&. .sp Further, PGM sockets are rate limited by default\&. For details, refer to the \fIZMQ_RATE\fR, and \fIZMQ_RECOVERY_IVL\fR options documented in \fBzmq_setsockopt\fR(3)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The \fIpgm\fR transport implementation requires access to raw IP sockets\&. Additional privileges may be required on some operating systems for this operation\&. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the \fIepgm\fR transport instead which does not require any special privileges\&. .sp .5v .RE .SH "ADDRESSING" .sp A 0MQ endpoint is a string consisting of a \fItransport\fR:// followed by an \fIaddress\fR\&. The \fItransport\fR specifies the underlying protocol to use\&. The \fIaddress\fR specifies the transport\-specific address to connect to\&. .sp For the PGM transport, the transport is pgm, and for the EPGM protocol the transport is epgm\&. The meaning of the \fIaddress\fR part is defined below\&. .SS "Connecting a socket" .sp When connecting a socket to a peer address using \fIzmq_connect()\fR with the \fIpgm\fR or \fIepgm\fR transport, the \fIendpoint\fR shall be interpreted as an \fIinterface\fR followed by a semicolon, followed by a \fImulticast address\fR, followed by a colon and a port number\&. .sp An \fIinterface\fR may be specified by either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The interface name as defined by the operating system\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The primary IPv4 address assigned to the interface, in its numeric representation\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent\&. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an \fIinterface\fR\&. The \fIinterface\fR part can be omitted, in that case the default one will be selected\&. .sp .5v .RE .sp A \fImulticast address\fR is specified by an IPv4 multicast address in its numeric representation\&. .SH "WIRE FORMAT" .sp Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams\&. This stream of data consists of 0MQ messages encapsulated in \fIframes\fR as described in \fBzmq_tcp\fR(7)\&. .SS "PGM datagram payload" .sp The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ: .sp .if n \{\ .RS 4 .\} .nf datagram = (offset data) offset = 2OCTET data = *OCTET .fi .if n \{\ .RE .\} .sp In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16\-bit unsigned integer in network byte order specifying either the offset of the first message \fIframe\fR in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message\&. .sp Note that offset specifies where the first message begins rather than the first message part\&. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet\&. .sp The following diagram illustrates the layout of a single PGM datagram payload: .sp .if n \{\ .RS 4 .\} .nf +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | offset (16 bits) | data | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .sp The following diagram further illustrates how three example 0MQ frames are laid out in consecutive PGM datagram payloads: .sp .if n \{\ .RS 4 .\} .nf First datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 1 | Frame 2, part 1 | | 0x0000 | (Message 1) | (Message 2, part 1) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ Second datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 2, part 2 | | 0xFFFF | (Message 2, part 2) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ Third datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 2, final 8 bytes | Frame 3 | | 0x0008 | (Message 2, final 8 bytes) | (Message 3) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .SH "EXAMPLE" .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, // using the first Ethernet network interface on Linux // and the Encapsulated PGM protocol rc = zmq_connect(socket, "epgm://eth0;239\&.192\&.1\&.1:5555"); assert (rc == 0); // Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, // using the network interface with the address 192\&.168\&.1\&.1 // and the standard PGM protocol rc = zmq_connect(socket, "pgm://192\&.168\&.1\&.1;239\&.192\&.1\&.1:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_connect\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_tcp\fR(7) \fBzmq_ipc\fR(7) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_init_data.30000644000175000017500000000747012307431234020264 0ustar ghedoghedo'\" t .\" Title: zmq_msg_init_data .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_INIT_DATA" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_init_data \- initialise 0MQ message from a supplied buffer .SH "SYNOPSIS" .sp \fBtypedef void (zmq_free_fn) (void \fR\fB\fI*data\fR\fR\fB, void \fR\fB\fI*hint\fR\fR\fB);\fR .sp \fBint zmq_msg_init_data (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, void \fR\fB\fI*data\fR\fR\fB, size_t \fR\fB\fIsize\fR\fR\fB, zmq_free_fn \fR\fB\fI*ffn\fR\fR\fB, void \fR\fB\fI*hint\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_init_data()\fR function shall initialise the message object referenced by \fImsg\fR to represent the content referenced by the buffer located at address \fIdata\fR, \fIsize\fR bytes long\&. No copy of \fIdata\fR shall be performed and 0MQ shall take ownership of the supplied buffer\&. .sp If provided, the deallocation function \fIffn\fR shall be called once the data buffer is no longer required by 0MQ, with the \fIdata\fR and \fIhint\fR arguments supplied to \fIzmq_msg_init_data()\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The deallocation function \fIffn\fR needs to be thread\-safe, since it will be called from an arbitrary thread\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The functions \fIzmq_msg_init()\fR, \fIzmq_msg_init_data()\fR and \fIzmq_msg_init_size()\fR are mutually exclusive\&. Never initialize the same \fIzmq_msg_t\fR twice\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_init_data()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBENOMEM\fR .RS 4 Insufficient storage space is available\&. .RE .SH "EXAMPLE" .PP \fBInitialising a message from a supplied buffer\fR. .sp .if n \{\ .RS 4 .\} .nf void my_free (void *data, void *hint) { free (data); } /* \&.\&.\&. */ void *data = malloc (6); assert (data); memcpy (data, "ABCDEF", 6); zmq_msg_t msg; rc = zmq_msg_init_data (&msg, data, 6, my_free, NULL); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_set.html0000644000175000017500000004372312307431356017733 0ustar ghedoghedo zmq_msg_set(3)

SYNOPSIS

int zmq_msg_set (zmq_msg_t *message, int property, int value);

DESCRIPTION

The zmq_msg_set() function shall set the property specified by the property argument to the value of the value argument for the ØMQ message fragment pointed to by the message argument.

Currently the zmq_msg_set() function does not support any property names.

RETURN VALUE

The zmq_msg_set() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The requested property property is unknown.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_set.txt0000644000175000017500000000164612240736636017611 0ustar ghedoghedozmq_msg_set(3) ============== NAME ---- zmq_msg_set - set message property SYNOPSIS -------- *int zmq_msg_set (zmq_msg_t '*message', int 'property', int 'value');* DESCRIPTION ----------- The _zmq_msg_set()_ function shall set the property specified by the 'property' argument to the value of the 'value' argument for the 0MQ message fragment pointed to by the 'message' argument. Currently the _zmq_msg_set()_ function does not support any property names. RETURN VALUE ------------ The _zmq_msg_set()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested property _property_ is unknown. SEE ALSO -------- linkzmq:zmq_msg_get[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_recvmsg.html0000644000175000017500000005360712307431367017744 0ustar ghedoghedo zmq_recvmsg(3)

SYNOPSIS

int zmq_recvmsg (void *socket, zmq_msg_t *msg, int flags);

DESCRIPTION

The zmq_recvmsg() function shall receive a message part from the socket referenced by the socket argument and store it in the message referenced by the msg argument. Any content previously stored in msg shall be properly deallocated. If there are no message parts available on the specified socket the zmq_recvmsg() function shall block until the request can be satisfied. The flags argument is a combination of the flags defined below:

ZMQ_DONTWAIT

Specifies that the operation should be performed in non-blocking mode. If there are no messages available on the specified socket, the zmq_recvmsg() function shall fail with errno set to EAGAIN.

Note
this API method is deprecated in favor of zmq_msg_recv(3).

Multi-part messages

A ØMQ message is composed of 1 or more message parts. Each message part is an independent zmq_msg_t in its own right. ØMQ ensures atomic delivery of messages: peers shall receive either all message parts of a message or none at all. The total number of message parts is unlimited except by available memory.

An application that processes multi-part messages must use the ZMQ_RCVMORE zmq_getsockopt(3) option after calling zmq_recvmsg() to determine if there are further parts to receive.

RETURN VALUE

The zmq_recvmsg() function shall return number of bytes in the message if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EAGAIN

Non-blocking mode was requested and no messages are available at the moment.

ENOTSUP

The zmq_recvmsg() operation is not supported by this socket type.

EFSM

The zmq_recvmsg() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal before a message was available.

EFAULT

The message passed to the function was invalid.

EXAMPLE

Receiving a message from a socket
/* Create an empty 0MQ message */
zmq_msg_t msg;
int rc = zmq_msg_init (&msg);
assert (rc == 0);
/* Block until a message is available to be received from socket */
rc = zmq_recvmsg (socket, &msg, 0);
assert (rc != -1);
/* Release message */
zmq_msg_close (&msg);
Receiving a multi-part message
int64_t more;
size_t more_size = sizeof (more);
do {
    /* Create an empty 0MQ message to hold the message part */
    zmq_msg_t part;
    int rc = zmq_msg_init (&part);
    assert (rc == 0);
    /* Block until a message is available to be received from socket */
    rc = zmq_recvmsg (socket, &part, 0);
    assert (rc != -1);
    /* Determine if more message parts are to follow */
    rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size);
    assert (rc == 0);
    zmq_msg_close (&part);
} while (more);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_init.30000644000175000017500000000463712307431316016430 0ustar ghedoghedo'\" t .\" Title: zmq_init .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_INIT" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_init \- initialise 0MQ context .SH "SYNOPSIS" .sp \fBvoid *zmq_init (int \fR\fB\fIio_threads\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_init()\fR function initialises a 0MQ \fIcontext\fR\&. .sp The \fIio_threads\fR argument specifies the size of the 0MQ thread pool to handle I/O operations\&. If your application is using only the \fIinproc\fR transport for messaging you may set this to zero, otherwise set it to at least one\&. .PP \fBThread safety\fR. A 0MQ \fIcontext\fR is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller\&. .sp This function is deprecated by \fBzmq_ctx_new\fR(3)\&. .SH "RETURN VALUE" .sp The \fIzmq_init()\fR function shall return an opaque handle to the initialised \fIcontext\fR if successful\&. Otherwise it shall return NULL and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 An invalid number of \fIio_threads\fR was requested\&. .RE .SH "SEE ALSO" .sp \fBzmq\fR(7) \fBzmq_term\fR(3) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_close.txt0000644000175000017500000000256612240736636020125 0ustar ghedoghedozmq_msg_close(3) ================ NAME ---- zmq_msg_close - release 0MQ message SYNOPSIS -------- *int zmq_msg_close (zmq_msg_t '*msg');* DESCRIPTION ----------- The _zmq_msg_close()_ function shall inform the 0MQ infrastructure that any resources associated with the message object referenced by 'msg' are no longer required and may be released. Actual release of resources associated with the message object shall be postponed by 0MQ until all users of the message or underlying data buffer have indicated it is no longer required. Applications should ensure that _zmq_msg_close()_ is called once a message is no longer required, otherwise memory leaks may occur. Note that this is NOT necessary after a successful _zmq_msg_send()_. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ The _zmq_msg_close()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: Invalid message. SEE ALSO -------- linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_z85_decode.html0000644000175000017500000004405212307431372020215 0ustar ghedoghedo zmq_z85_decode(3)

SYNOPSIS

uint8_t *zmq_z85_decode (uint8_t *dest, char *string);

DESCRIPTION

The zmq_z85_decode() function shall decode string into dest. The length of string shall be divisible by 5. dest must be large enough for the decoded value (0.8 x strlen (string)).

The encoding shall follow the ZMQ RFC 32 specification.

RETURN VALUE

The zmq_z85_decode() function shall return dest if successful, else it shall return NULL.

EXAMPLE

Decoding a CURVE key
char decoded [] = "rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7";
uint8_t public_key [32];
zmq_z85_decode (public_key, decoded);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_send_const.30000644000175000017500000001163312307431257017622 0ustar ghedoghedo'\" t .\" Title: zmq_send_const .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_SEND_CONST" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_send_const \- send a constant\-memory message part on a socket .SH "SYNOPSIS" .sp \fBint zmq_send_const (void \fR\fB\fI*socket\fR\fR\fB, void \fR\fB\fI*buf\fR\fR\fB, size_t \fR\fB\fIlen\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_send_const()\fR function shall queue a message created from the buffer referenced by the \fIbuf\fR and \fIlen\fR arguments\&. The message buffer is assumed to be constant\-memory and will therefore not be copied or deallocated in any way\&. The \fIflags\fR argument is a combination of the flags defined below: .PP \fBZMQ_DONTWAIT\fR .RS 4 For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high\-water mark), specifies that the operation should be performed in non\-blocking mode\&. If the message cannot be queued on the \fIsocket\fR, the \fIzmq_send_const()\fR function shall fail with \fIerrno\fR set to EAGAIN\&. .RE .PP \fBZMQ_SNDMORE\fR .RS 4 Specifies that the message being sent is a multi\-part message, and that further message parts are to follow\&. Refer to the section regarding multi\-part messages below for a detailed description\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp A successful invocation of \fIzmq_send_const()\fR does not indicate that the message has been transmitted to the network, only that it has been queued on the \fIsocket\fR and 0MQ has assumed responsibility for the message\&. .sp .5v .RE .SS "Multi\-part messages" .sp A 0MQ message is composed of 1 or more message parts\&. 0MQ ensures atomic delivery of messages: peers shall receive either all \fImessage parts\fR of a message or none at all\&. The total number of message parts is unlimited except by available memory\&. .sp An application that sends multi\-part messages must use the \fIZMQ_SNDMORE\fR flag when sending each message part except the final one\&. .SH "RETURN VALUE" .sp The \fIzmq_send_const()\fR function shall return number of bytes in the message if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEAGAIN\fR .RS 4 Non\-blocking mode was requested and the message cannot be sent at the moment\&. .RE .PP \fBENOTSUP\fR .RS 4 The \fIzmq_send_const()\fR operation is not supported by this socket type\&. .RE .PP \fBEFSM\fR .RS 4 The \fIzmq_send_const()\fR operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state\&. This error may occur with socket types that switch between several states, such as ZMQ_REP\&. See the \fImessaging patterns\fR section of \fBzmq_socket\fR(3) for more information\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before the message was sent\&. .RE .PP \fBEHOSTUNREACH\fR .RS 4 The message cannot be routed\&. .RE .SH "EXAMPLE" .PP \fBSending a multi-part message\fR. .sp .if n \{\ .RS 4 .\} .nf /* Send a multi\-part message consisting of three parts to socket */ rc = zmq_send_const (socket, "ABC", 3, ZMQ_SNDMORE); assert (rc == 3); rc = zmq_send_const (socket, "DEFGH", 5, ZMQ_SNDMORE); assert (rc == 5); /* Final part; no more parts to follow */ rc = zmq_send_const (socket, "JK", 2, 0); assert (rc == 2); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_send\fR(3) \fBzmq_recv\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_bind.txt0000644000175000017500000000615212240736636017061 0ustar ghedoghedozmq_bind(3) =========== NAME ---- zmq_bind - accept incoming connections on a socket SYNOPSIS -------- *int zmq_bind (void '*socket', const char '*endpoint');* DESCRIPTION ----------- The _zmq_bind()_ function binds the 'socket' to a local 'endpoint' and then accepts incoming connections on that endpoint. The 'endpoint' is a string consisting of a 'transport'`://` followed by an 'address'. The 'transport' specifies the underlying protocol to use. The 'address' specifies the transport-specific address to bind to. 0MQ provides the the following transports: 'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7] 'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7] 'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7] 'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7] Every 0MQ socket type except 'ZMQ_PAIR' supports one-to-many and many-to-one semantics. The precise semantics depend on the socket type and are defined in linkzmq:zmq_socket[3]. The 'ipc' and 'tcp' transports accept wildcard addresses: see linkzmq:zmq_ipc[7] and linkzmq:zmq_tcp[7] for details. NOTE: the address syntax may be different for _zmq_bind()_ and _zmq_connect()_ especially for the 'tcp', 'pgm' and 'epgm' transports. NOTE: following a _zmq_bind()_, the socket enters a 'mute' state unless or until at least one incoming or outgoing connection is made, at which point the socket enters a 'ready' state. In the mute state, the socket blocks or drops messages according to the socket type, as defined in linkzmq:zmq_socket[3]. By contrast, following a libzmq:zmq_connect[3], the socket enters the 'ready' state. RETURN VALUE ------------ The _zmq_bind()_ function returns zero if successful. Otherwise it returns `-1` and sets 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The endpoint supplied is invalid. *EPROTONOSUPPORT*:: The requested 'transport' protocol is not supported. *ENOCOMPATPROTO*:: The requested 'transport' protocol is not compatible with the socket type. *EADDRINUSE*:: The requested 'address' is already in use. *EADDRNOTAVAIL*:: The requested 'address' was not local. *ENODEV*:: The requested 'address' specifies a nonexistent interface. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EMTHREAD*:: No I/O thread is available to accomplish the task. EXAMPLE ------- .Binding a publisher socket to an in-process and a TCP transport ---- /* Create a ZMQ_PUB socket */ void *socket = zmq_socket (context, ZMQ_PUB); assert (socket); /* Bind it to a in-process transport with the address 'my_publisher' */ int rc = zmq_bind (socket, "inproc://my_publisher"); assert (rc == 0); /* Bind it to a TCP transport on port 5555 of the 'eth0' interface */ rc = zmq_bind (socket, "tcp://eth0:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_connect[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_ipc.70000644000175000017500000001172212307431336016237 0ustar ghedoghedo'\" t .\" Title: zmq_ipc .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_IPC" "7" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_ipc \- 0MQ local inter\-process communication transport .SH "SYNOPSIS" .sp The inter\-process transport passes messages between local processes using a system\-dependent IPC mechanism\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The inter\-process transport is currently only implemented on operating systems that provide UNIX domain sockets\&. .sp .5v .RE .SH "ADDRESSING" .sp A 0MQ endpoint is a string consisting of a \fItransport\fR:// followed by an \fIaddress\fR\&. The \fItransport\fR specifies the underlying protocol to use\&. The \fIaddress\fR specifies the transport\-specific address to connect to\&. .sp For the inter\-process transport, the transport is ipc, and the meaning of the \fIaddress\fR part is defined below\&. .SS "Binding a socket" .sp When binding a \fIsocket\fR to a local address using \fIzmq_bind()\fR with the \fIipc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIpathname\fR to create\&. The \fIpathname\fR must be unique within the operating system namespace used by the \fIipc\fR implementation, and must fulfill any restrictions placed by the operating system on the format and length of a \fIpathname\fR\&. .sp When the address is *, \fIzmq_bind()\fR shall generate a unique temporary pathname\&. The caller should retrieve this pathname using the ZMQ_LAST_ENDPOINT socket option\&. See \fBzmq_getsockopt\fR(3) for details\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp any existing binding to the same endpoint shall be overridden\&. That is, if a second process binds to an endpoint already bound by a process, this will succeed and the first process will lose its binding\&. In this behavior, the \fIipc\fR transport is not consistent with the \fItcp\fR or \fIinproc\fR transports\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp the endpoint pathname must be writable by the process\&. When the endpoint starts with \fI/\fR, e\&.g\&., ipc:///pathname, this will be an \fIabsolute\fR pathname\&. If the endpoint specifies a directory that does not exist, the bind shall fail\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp on Linux only, when the endpoint pathname starts with @, the abstract namespace shall be used\&. The abstract namespace is independent of the filesystem and if a process attempts to bind an endpoint already bound by a process, it will fail\&. See unix(7) for details\&. .sp .5v .RE .SS "Connecting a socket" .sp When connecting a \fIsocket\fR to a peer address using \fIzmq_connect()\fR with the \fIipc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIpathname\fR to connect to\&. The \fIpathname\fR must have been previously created within the operating system namespace by assigning it to a \fIsocket\fR with \fIzmq_bind()\fR\&. .SH "EXAMPLES" .PP \fBAssigning a local address to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // Assign the pathname "/tmp/feeds/0" rc = zmq_bind(socket, "ipc:///tmp/feeds/0"); assert (rc == 0); .fi .if n \{\ .RE .\} .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // Connect to the pathname "/tmp/feeds/0" rc = zmq_connect(socket, "ipc:///tmp/feeds/0"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_inproc\fR(7) \fBzmq_tcp\fR(7) \fBzmq_pgm\fR(7) \fBzmq_getsockopt\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_recv.30000644000175000017500000001034112307431256016414 0ustar ghedoghedo'\" t .\" Title: zmq_recv .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_RECV" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_recv \- receive a message part from a socket .SH "SYNOPSIS" .sp \fBint zmq_recv (void \fR\fB\fI*socket\fR\fR\fB, void \fR\fB\fI*buf\fR\fR\fB, size_t \fR\fB\fIlen\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_recv()\fR function shall receive a message from the socket referenced by the \fIsocket\fR argument and store it in the buffer referenced by the \fIbuf\fR argument\&. Any bytes exceeding the length specified by the \fIlen\fR argument shall be truncated\&. If there are no messages available on the specified \fIsocket\fR the \fIzmq_recv()\fR function shall block until the request can be satisfied\&. The \fIflags\fR argument is a combination of the flags defined below: .PP \fBZMQ_DONTWAIT\fR .RS 4 Specifies that the operation should be performed in non\-blocking mode\&. If there are no messages available on the specified \fIsocket\fR, the \fIzmq_recv()\fR function shall fail with \fIerrno\fR set to EAGAIN\&. .RE .SS "Multi\-part messages" .sp A 0MQ message is composed of 1 or more message parts\&. 0MQ ensures atomic delivery of messages: peers shall receive either all \fImessage parts\fR of a message or none at all\&. The total number of message parts is unlimited except by available memory\&. .sp An application that processes multi\-part messages must use the \fIZMQ_RCVMORE\fR \fBzmq_getsockopt\fR(3) option after calling \fIzmq_recv()\fR to determine if there are further parts to receive\&. .SH "RETURN VALUE" .sp The \fIzmq_recv()\fR function shall return number of bytes in the message if successful\&. Note that the value can exceed the value of the \fIlen\fR parameter in case the message was truncated\&. If not successful the function shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEAGAIN\fR .RS 4 Non\-blocking mode was requested and no messages are available at the moment\&. .RE .PP \fBENOTSUP\fR .RS 4 The \fIzmq_recv()\fR operation is not supported by this socket type\&. .RE .PP \fBEFSM\fR .RS 4 The \fIzmq_recv()\fR operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state\&. This error may occur with socket types that switch between several states, such as ZMQ_REP\&. See the \fImessaging patterns\fR section of \fBzmq_socket\fR(3) for more information\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before a message was available\&. .RE .SH "EXAMPLE" .PP \fBReceiving a message from a socket\fR. .sp .if n \{\ .RS 4 .\} .nf char buf [256]; nbytes = zmq_recv (socket, buf, 256, 0); assert (nbytes != \-1); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_send\fR(3) \fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_init.30000644000175000017500000000554512307431233017273 0ustar ghedoghedo'\" t .\" Title: zmq_msg_init .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_INIT" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_init \- initialise empty 0MQ message .SH "SYNOPSIS" .sp \fBint zmq_msg_init (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_init()\fR function shall initialise the message object referenced by \fImsg\fR to represent an empty message\&. This function is most useful when called before receiving a message with \fIzmq_recv()\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The functions \fIzmq_msg_init()\fR, \fIzmq_msg_init_data()\fR and \fIzmq_msg_init_size()\fR are mutually exclusive\&. Never initialize the same \fIzmq_msg_t\fR twice\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_init()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .sp No errors are defined\&. .SH "EXAMPLE" .PP \fBReceiving a message from a socket\fR. .sp .if n \{\ .RS 4 .\} .nf zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_recv (socket, &msg, 0); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_set.30000644000175000017500000000663312307431231017130 0ustar ghedoghedo'\" t .\" Title: zmq_ctx_set .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CTX_SET" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_ctx_set \- set context options .SH "SYNOPSIS" .sp \fBint zmq_ctx_set (void \fR\fB\fI*context\fR\fR\fB, int \fR\fB\fIoption_name\fR\fR\fB, int \fR\fB\fIoption_value\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_ctx_set()\fR function shall set the option specified by the \fIoption_name\fR argument to the value of the \fIoption_value\fR argument\&. .sp The \fIzmq_ctx_set()\fR function accepts the following options: .SS "ZMQ_IO_THREADS: Set number of I/O threads" .sp The \fIZMQ_IO_THREADS\fR argument specifies the size of the 0MQ thread pool to handle I/O operations\&. If your application is using only the \fIinproc\fR transport for messaging you may set this to zero, otherwise set it to at least one\&. This option only applies before creating any sockets on the context\&. .TS tab(:); lt lt. T{ .sp Default value T}:T{ .sp 1 T} .TE .sp 1 .SS "ZMQ_MAX_SOCKETS: Set maximum number of sockets" .sp The \fIZMQ_MAX_SOCKETS\fR argument sets the maximum number of sockets allowed on the context\&. .TS tab(:); lt lt. T{ .sp Default value T}:T{ .sp 1024 T} .TE .sp 1 .SS "ZMQ_IPV6: Set IPv6 option" .sp The \fIZMQ_IPV6\fR argument sets the IPv6 value for all sockets created in the context from this point onwards\&. A value of 1 means IPv6 is enabled, while 0 means the socket will use only IPv4\&. When IPv6 is enabled, a socket will connect to, or accept connections from, both IPv4 and IPv6 hosts\&. .TS tab(:); lt lt. T{ .sp Default value T}:T{ .sp 0 T} .TE .sp 1 .SH "RETURN VALUE" .sp The \fIzmq_ctx_set()\fR function returns zero if successful\&. Otherwise it returns \-1 and sets \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested option \fIoption_name\fR is unknown\&. .RE .SH "EXAMPLE" .PP \fBSetting a limit on the number of sockets\fR. .sp .if n \{\ .RS 4 .\} .nf void *context = zmq_ctx_new (); zmq_ctx_set (context, ZMQ_MAX_SOCKETS, 256); int max_sockets = zmq_ctx_get (context, ZMQ_MAX_SOCKETS); assert (max_sockets == 256); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_ctx_get\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_recv.html0000644000175000017500000005400312307431354020066 0ustar ghedoghedo zmq_msg_recv(3)

SYNOPSIS

int zmq_msg_recv (zmq_msg_t *msg, void *socket, int flags);

DESCRIPTION

The zmq_msg_recv() function is identical to zmq_recvmsg(3), which shall be deprecated in future versions. zmq_msg_recv() is more consistent with other message manipulation functions.

The zmq_msg_recv() function shall receive a message part from the socket referenced by the socket argument and store it in the message referenced by the msg argument. Any content previously stored in msg shall be properly deallocated. If there are no message parts available on the specified socket the zmq_msg_recv() function shall block until the request can be satisfied. The flags argument is a combination of the flags defined below:

ZMQ_DONTWAIT

Specifies that the operation should be performed in non-blocking mode. If there are no messages available on the specified socket, the zmq_msg_recv() function shall fail with errno set to EAGAIN.

Multi-part messages

A ØMQ message is composed of 1 or more message parts. Each message part is an independent zmq_msg_t in its own right. ØMQ ensures atomic delivery of messages: peers shall receive either all message parts of a message or none at all. The total number of message parts is unlimited except by available memory.

An application that processes multi-part messages must use the ZMQ_RCVMORE zmq_getsockopt(3) option after calling zmq_msg_recv() to determine if there are further parts to receive.

RETURN VALUE

The zmq_msg_recv() function shall return number of bytes in the message if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EAGAIN

Non-blocking mode was requested and no messages are available at the moment.

ENOTSUP

The zmq_msg_recv() operation is not supported by this socket type.

EFSM

The zmq_msg_recv() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal before a message was available.

EFAULT

The message passed to the function was invalid.

EXAMPLE

Receiving a message from a socket
/* Create an empty 0MQ message */
zmq_msg_t msg;
int rc = zmq_msg_init (&msg);
assert (rc == 0);
/* Block until a message is available to be received from socket */
rc = zmq_msg_recv (&msg, socket, 0);
assert (rc != -1);
/* Release message */
zmq_msg_close (&msg);
Receiving a multi-part message
int64_t more;
size_t more_size = sizeof (more);
do {
    /* Create an empty 0MQ message to hold the message part */
    zmq_msg_t part;
    int rc = zmq_msg_init (&part);
    assert (rc == 0);
    /* Block until a message is available to be received from socket */
    rc = zmq_msg_recv (&part, socket, 0);
    assert (rc != -1);
    /* Determine if more message parts are to follow */
    rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size);
    assert (rc == 0);
    zmq_msg_close (&part);
} while (more);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_copy.30000644000175000017500000000570112307431242017274 0ustar ghedoghedo'\" t .\" Title: zmq_msg_copy .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_COPY" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_copy \- copy content of a message to another message .SH "SYNOPSIS" .sp \fBint zmq_msg_copy (zmq_msg_t \fR\fB\fI*dest\fR\fR\fB, zmq_msg_t \fR\fB\fI*src\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_copy()\fR function shall copy the message object referenced by \fIsrc\fR to the message object referenced by \fIdest\fR\&. The original content of \fIdest\fR, if any, shall be released\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The implementation may choose not to physically copy the message content, rather to share the underlying buffer between \fIsrc\fR and \fIdest\fR\&. Avoid modifying message content after a message has been copied with \fIzmq_msg_copy()\fR, doing so can result in undefined behaviour\&. If what you need is an actual hard copy, allocate a new message using \fIzmq_msg_init_size()\fR and copy the message content using \fImemcpy()\fR\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_copy()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 Invalid message\&. .RE .SH "SEE ALSO" .sp \fBzmq_msg_move\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_plain.70000644000175000017500000000413012307431341016556 0ustar ghedoghedo'\" t .\" Title: zmq_plain .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_PLAIN" "7" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_plain \- clear\-text authentication .SH "SYNOPSIS" .sp The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client\&. PLAIN makes no attempt at security or confidentiality\&. It is intended for use on internal networks where security requirements are low\&. The PLAIN mechanism is defined by this document: \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:24\fR\m[]\&. .SH "USAGE" .sp To use PLAIN, the server shall set the ZMQ_PLAIN_SERVER option, and the client shall set the ZMQ_PLAIN_USERNAME and ZMQ_PLAIN_PASSWORD socket options\&. Which peer binds, and which connects, is not relevant\&. .SH "SEE ALSO" .sp \fBzmq_setsockopt\fR(3) \fBzmq_null\fR(7) \fBzmq_curve\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_term.html0000644000175000017500000004640412307431346020115 0ustar ghedoghedo zmq_ctx_term(3)

SYNOPSIS

int zmq_ctx_term (void *context);

DESCRIPTION

The zmq_ctx_term() function shall destroy the ØMQ context context.

Context termination is performed in the following steps:

  1. Any blocking operations currently in progress on sockets open within context shall return immediately with an error code of ETERM. With the exception of zmq_close(), any further operations on sockets open within context shall fail with an error code of ETERM.

  2. After interrupting all blocking calls, zmq_ctx_term() shall block until the following conditions are satisfied:

    • All sockets open within context have been closed with zmq_close().

    • For each socket within context, all messages sent by the application with zmq_send() have either been physically transferred to a network peer, or the socket’s linger period set with the ZMQ_LINGER socket option has expired.

For further details regarding socket linger behavior refer to the ZMQ_LINGER option in zmq_setsockopt(3).

This function replaces the deprecated function zmq_term(3).

RETURN VALUE

The zmq_ctx_term() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

The provided context was invalid.

EINTR

Termination was interrupted by a signal. It can be restarted if needed.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_z85_decode.30000644000175000017500000000437712307431323017415 0ustar ghedoghedo'\" t .\" Title: zmq_z85_decode .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_Z85_DECODE" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_z85_decode \- decode a binary key from Z85 printable text .SH "SYNOPSIS" .sp \fBuint8_t *zmq_z85_decode (uint8_t *dest, char *string);\fR .SH "DESCRIPTION" .sp The \fIzmq_z85_decode()\fR function shall decode \fIstring\fR into \fIdest\fR\&. The length of \fIstring\fR shall be divisible by 5\&. \fIdest\fR must be large enough for the decoded value (0\&.8 x strlen (string))\&. .sp The encoding shall follow the ZMQ RFC 32 specification\&. .SH "RETURN VALUE" .sp The \fIzmq_z85_decode()\fR function shall return \fIdest\fR if successful, else it shall return NULL\&. .SH "EXAMPLE" .PP \fBDecoding a CURVE key\fR. .sp .if n \{\ .RS 4 .\} .nf char decoded [] = "rq:rM>}U?@Lns47E1%kR\&.o@n%FcmmsL/@{H8]yf7"; uint8_t public_key [32]; zmq_z85_decode (public_key, decoded); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_z85_decode\fR(3) \fBzmq_curve_keypair\fR(3) \fBzmq_curve\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_destroy.txt0000644000175000017500000000342112240736636020510 0ustar ghedoghedozmq_ctx_destroy(3) ================== NAME ---- zmq_ctx_destroy - terminate a 0MQ context SYNOPSIS -------- *int zmq_ctx_destroy (void '*context');* DESCRIPTION ----------- The _zmq_ctx_destroy()_ function shall destroy the 0MQ context 'context'. Context termination is performed in the following steps: 1. Any blocking operations currently in progress on sockets open within 'context' shall return immediately with an error code of ETERM. With the exception of _zmq_close()_, any further operations on sockets open within 'context' shall fail with an error code of ETERM. 2. After interrupting all blocking calls, _zmq_ctx_destroy()_ shall _block_ until the following conditions are satisfied: * All sockets open within 'context' have been closed with _zmq_close()_. * For each socket within 'context', all messages sent by the application with _zmq_send()_ have either been physically transferred to a network peer, or the socket's linger period set with the _ZMQ_LINGER_ socket option has expired. For further details regarding socket linger behavior refer to the _ZMQ_LINGER_ option in linkzmq:zmq_setsockopt[3]. This function is deprecated by linkzmq:zmq_ctx_term[3]. RETURN VALUE ------------ The _zmq_ctx_destroy()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: The provided 'context' was invalid. *EINTR*:: Termination was interrupted by a signal. It can be restarted if needed. SEE ALSO -------- linkzmq:zmq[7] linkzmq:zmq_init[3] linkzmq:zmq_close[3] linkzmq:zmq_setsockopt[3] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_close.txt0000644000175000017500000000244612240736636017254 0ustar ghedoghedozmq_close(3) ============ NAME ---- zmq_close - close 0MQ socket SYNOPSIS -------- *int zmq_close (void '*socket');* DESCRIPTION ----------- The _zmq_close()_ function shall destroy the socket referenced by the 'socket' argument. Any outstanding messages physically received from the network but not yet received by the application with _zmq_recv()_ shall be discarded. The behaviour for discarding messages sent by the application with _zmq_send()_ but not yet physically transferred to the network depends on the value of the _ZMQ_LINGER_ socket option for the specified 'socket'. NOTE: The default setting of _ZMQ_LINGER_ does not discard unsent messages; this behaviour may cause the application to block when calling _zmq_term()_. For details refer to linkzmq:zmq_setsockopt[3] and linkzmq:zmq_term[3]. RETURN VALUE ------------ The _zmq_close()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *ENOTSOCK*:: The provided 'socket' was invalid. SEE ALSO -------- linkzmq:zmq_socket[3] linkzmq:zmq_term[3] linkzmq:zmq_setsockopt[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_errno.30000644000175000017500000000474012307431303016601 0ustar ghedoghedo'\" t .\" Title: zmq_errno .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_ERRNO" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_errno \- retrieve value of errno for the calling thread .SH "SYNOPSIS" .sp \fBint zmq_errno (void);\fR .SH "DESCRIPTION" .sp The \fIzmq_errno()\fR function shall retrieve the value of the \fIerrno\fR variable for the calling thread\&. .sp The \fIzmq_errno()\fR function is provided to assist users on non\-POSIX systems who are experiencing issues with retrieving the correct value of \fIerrno\fR directly\&. Specifically, users on Win32 systems whose application is using a different C run\-time library from the C run\-time library in use by 0MQ will need to use \fIzmq_errno()\fR for correct operation\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBImportant\fR .ps -1 .br .sp Users not experiencing issues with retrieving the correct value of \fIerrno\fR should not use this function and should instead access the \fIerrno\fR variable directly\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_errno()\fR function shall return the value of the \fIerrno\fR variable for the calling thread\&. .SH "ERRORS" .sp No errors are defined\&. .SH "SEE ALSO" .sp \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_sendmsg.30000644000175000017500000001315212307431312017111 0ustar ghedoghedo'\" t .\" Title: zmq_sendmsg .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_SENDMSG" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_sendmsg \- send a message part on a socket .SH "SYNOPSIS" .sp \fBint zmq_sendmsg (void \fR\fB\fI*socket\fR\fR\fB, zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_sendmsg()\fR function shall queue the message referenced by the \fImsg\fR argument to be sent to the socket referenced by the \fIsocket\fR argument\&. The \fIflags\fR argument is a combination of the flags defined below: .PP \fBZMQ_DONTWAIT\fR .RS 4 For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high\-water mark), specifies that the operation should be performed in non\-blocking mode\&. If the message cannot be queued on the \fIsocket\fR, the \fIzmq_sendmsg()\fR function shall fail with \fIerrno\fR set to EAGAIN\&. .RE .PP \fBZMQ_SNDMORE\fR .RS 4 Specifies that the message being sent is a multi\-part message, and that further message parts are to follow\&. Refer to the section regarding multi\-part messages below for a detailed description\&. .RE .sp The \fIzmq_msg_t\fR structure passed to \fIzmq_sendmsg()\fR is nullified during the call\&. If you want to send the same message to multiple sockets you have to copy it using (e\&.g\&. using \fIzmq_msg_copy()\fR)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp A successful invocation of \fIzmq_sendmsg()\fR does not indicate that the message has been transmitted to the network, only that it has been queued on the \fIsocket\fR and 0MQ has assumed responsibility for the message\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp this API method is deprecated in favor of zmq_msg_send(3)\&. .sp .5v .RE .SS "Multi\-part messages" .sp A 0MQ message is composed of 1 or more message parts\&. Each message part is an independent \fIzmq_msg_t\fR in its own right\&. 0MQ ensures atomic delivery of messages: peers shall receive either all \fImessage parts\fR of a message or none at all\&. The total number of message parts is unlimited except by available memory\&. .sp An application that sends multi\-part messages must use the \fIZMQ_SNDMORE\fR flag when sending each message part except the final one\&. .SH "RETURN VALUE" .sp The \fIzmq_sendmsg()\fR function shall return number of bytes in the message if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEAGAIN\fR .RS 4 Non\-blocking mode was requested and the message cannot be sent at the moment\&. .RE .PP \fBENOTSUP\fR .RS 4 The \fIzmq_sendmsg()\fR operation is not supported by this socket type\&. .RE .PP \fBEFSM\fR .RS 4 The \fIzmq_sendmsg()\fR operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state\&. This error may occur with socket types that switch between several states, such as ZMQ_REP\&. See the \fImessaging patterns\fR section of \fBzmq_socket\fR(3) for more information\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before the message was sent\&. .RE .PP \fBEFAULT\fR .RS 4 Invalid message\&. .RE .PP \fBEHOSTUNREACH\fR .RS 4 The message cannot be routed\&. .RE .SH "EXAMPLE" .PP \fBFilling in a message and sending it to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create a new message, allocating 6 bytes for message content */ zmq_msg_t msg; int rc = zmq_msg_init_size (&msg, 6); assert (rc == 0); /* Fill in message content with \*(AqAAAAAA\*(Aq */ memset (zmq_msg_data (&msg), \*(AqA\*(Aq, 6); /* Send the message to the socket */ rc = zmq_sendmsg (socket, &msg, 0); assert (rc == 6); .fi .if n \{\ .RE .\} .PP \fBSending a multi-part message\fR. .sp .if n \{\ .RS 4 .\} .nf /* Send a multi\-part message consisting of three parts to socket */ rc = zmq_sendmsg (socket, &part1, ZMQ_SNDMORE); rc = zmq_sendmsg (socket, &part2, ZMQ_SNDMORE); /* Final part; no more parts to follow */ rc = zmq_sendmsg (socket, &part3, 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_recv\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_sendmsg.txt0000644000175000017500000000737712240736636017617 0ustar ghedoghedozmq_sendmsg(3) ============== NAME ---- zmq_sendmsg - send a message part on a socket SYNOPSIS -------- *int zmq_sendmsg (void '*socket', zmq_msg_t '*msg', int 'flags');* DESCRIPTION ----------- The _zmq_sendmsg()_ function shall queue the message referenced by the 'msg' argument to be sent to the socket referenced by the 'socket' argument. The 'flags' argument is a combination of the flags defined below: *ZMQ_DONTWAIT*:: For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high-water mark), specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the 'socket', the _zmq_sendmsg()_ function shall fail with 'errno' set to EAGAIN. *ZMQ_SNDMORE*:: Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description. The _zmq_msg_t_ structure passed to _zmq_sendmsg()_ is nullified during the call. If you want to send the same message to multiple sockets you have to copy it using (e.g. using _zmq_msg_copy()_). NOTE: A successful invocation of _zmq_sendmsg()_ does not indicate that the message has been transmitted to the network, only that it has been queued on the 'socket' and 0MQ has assumed responsibility for the message. NOTE: this API method is deprecated in favor of zmq_msg_send(3). Multi-part messages ~~~~~~~~~~~~~~~~~~~ A 0MQ message is composed of 1 or more message parts. Each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages: peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except by available memory. An application that sends multi-part messages must use the _ZMQ_SNDMORE_ flag when sending each message part except the final one. RETURN VALUE ------------ The _zmq_sendmsg()_ function shall return number of bytes in the message if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EAGAIN*:: Non-blocking mode was requested and the message cannot be sent at the moment. *ENOTSUP*:: The _zmq_sendmsg()_ operation is not supported by this socket type. *EFSM*:: The _zmq_sendmsg()_ operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal before the message was sent. *EFAULT*:: Invalid message. *EHOSTUNREACH*:: The message cannot be routed. EXAMPLE ------- .Filling in a message and sending it to a socket ---- /* Create a new message, allocating 6 bytes for message content */ zmq_msg_t msg; int rc = zmq_msg_init_size (&msg, 6); assert (rc == 0); /* Fill in message content with 'AAAAAA' */ memset (zmq_msg_data (&msg), 'A', 6); /* Send the message to the socket */ rc = zmq_sendmsg (socket, &msg, 0); assert (rc == 6); ---- .Sending a multi-part message ---- /* Send a multi-part message consisting of three parts to socket */ rc = zmq_sendmsg (socket, &part1, ZMQ_SNDMORE); rc = zmq_sendmsg (socket, &part2, ZMQ_SNDMORE); /* Final part; no more parts to follow */ rc = zmq_sendmsg (socket, &part3, 0); ---- SEE ALSO -------- linkzmq:zmq_recv[3] linkzmq:zmq_socket[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_send.txt0000644000175000017500000001001512240736636017735 0ustar ghedoghedozmq_msg_send(3) =============== NAME ---- zmq_msg_send - send a message part on a socket SYNOPSIS -------- *int zmq_msg_send (zmq_msg_t '*msg', void '*socket', int 'flags');* DESCRIPTION ----------- The _zmq_msg_send()_ function is identical to linkzmq:zmq_sendmsg[3], which shall be deprecated in future versions. _zmq_msg_send()_ is more consistent with other message manipulation functions. The _zmq_msg_send()_ function shall queue the message referenced by the 'msg' argument to be sent to the socket referenced by the 'socket' argument. The 'flags' argument is a combination of the flags defined below: *ZMQ_DONTWAIT*:: For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high-water mark), specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the 'socket', the _zmq_msg_send()_ function shall fail with 'errno' set to EAGAIN. *ZMQ_SNDMORE*:: Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description. The _zmq_msg_t_ structure passed to _zmq_msg_send()_ is nullified during the call. If you want to send the same message to multiple sockets you have to copy it using (e.g. using _zmq_msg_copy()_). NOTE: A successful invocation of _zmq_msg_send()_ does not indicate that the message has been transmitted to the network, only that it has been queued on the 'socket' and 0MQ has assumed responsibility for the message. You do not need to call _zmq_msg_close()_ after a successful _zmq_msg_send()_. Multi-part messages ~~~~~~~~~~~~~~~~~~~ A 0MQ message is composed of 1 or more message parts. Each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages: peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except by available memory. An application that sends multi-part messages must use the _ZMQ_SNDMORE_ flag when sending each message part except the final one. RETURN VALUE ------------ The _zmq_msg_send()_ function shall return number of bytes in the message if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EAGAIN*:: Non-blocking mode was requested and the message cannot be sent at the moment. *ENOTSUP*:: The _zmq_msg_send()_ operation is not supported by this socket type. *EFSM*:: The _zmq_msg_send()_ operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal before the message was sent. *EFAULT*:: Invalid message. *EHOSTUNREACH*:: The message cannot be routed. EXAMPLE ------- .Filling in a message and sending it to a socket ---- /* Create a new message, allocating 6 bytes for message content */ zmq_msg_t msg; int rc = zmq_msg_init_size (&msg, 6); assert (rc == 0); /* Fill in message content with 'AAAAAA' */ memset (zmq_msg_data (&msg), 'A', 6); /* Send the message to the socket */ rc = zmq_msg_send (&msg, socket, 0); assert (rc == 6); ---- .Sending a multi-part message ---- /* Send a multi-part message consisting of three parts to socket */ rc = zmq_msg_send (&part1, socket, ZMQ_SNDMORE); rc = zmq_msg_send (&part2, socket, ZMQ_SNDMORE); /* Final part; no more parts to follow */ rc = zmq_msg_send (&part3, socket, 0); ---- SEE ALSO -------- linkzmq:zmq_recv[3] linkzmq:zmq_send[3] linkzmq:zmq_msg_recv[3] linkzmq:zmq_socket[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_init.txt0000644000175000017500000000223012240736636017101 0ustar ghedoghedozmq_init(3) =========== NAME ---- zmq_init - initialise 0MQ context SYNOPSIS -------- *void *zmq_init (int 'io_threads');* DESCRIPTION ----------- The _zmq_init()_ function initialises a 0MQ 'context'. The 'io_threads' argument specifies the size of the 0MQ thread pool to handle I/O operations. If your application is using only the 'inproc' transport for messaging you may set this to zero, otherwise set it to at least one. .Thread safety A 0MQ 'context' is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller. This function is deprecated by linkzmq:zmq_ctx_new[3]. RETURN VALUE ------------ The _zmq_init()_ function shall return an opaque handle to the initialised 'context' if successful. Otherwise it shall return NULL and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: An invalid number of 'io_threads' was requested. SEE ALSO -------- linkzmq:zmq[7] linkzmq:zmq_term[3] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_copy.html0000644000175000017500000004556212307431351020110 0ustar ghedoghedo zmq_msg_copy(3)

SYNOPSIS

int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);

DESCRIPTION

The zmq_msg_copy() function shall copy the message object referenced by src to the message object referenced by dest. The original content of dest, if any, shall be released.

Caution
The implementation may choose not to physically copy the message content, rather to share the underlying buffer between src and dest. Avoid modifying message content after a message has been copied with zmq_msg_copy(), doing so can result in undefined behaviour. If what you need is an actual hard copy, allocate a new message using zmq_msg_init_size() and copy the message content using memcpy().
Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

The zmq_msg_copy() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

Invalid message.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_tcp.70000644000175000017500000001153312307431330016244 0ustar ghedoghedo'\" t .\" Title: zmq_tcp .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_TCP" "7" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_tcp \- 0MQ unicast transport using TCP .SH "SYNOPSIS" .sp TCP is an ubiquitous, reliable, unicast transport\&. When connecting distributed applications over a network with 0MQ, using the TCP transport will likely be your first choice\&. .SH "ADDRESSING" .sp A 0MQ endpoint is a string consisting of a \fItransport\fR:// followed by an \fIaddress\fR\&. The \fItransport\fR specifies the underlying protocol to use\&. The \fIaddress\fR specifies the transport\-specific address to connect to\&. .sp For the TCP transport, the transport is tcp, and the meaning of the \fIaddress\fR part is defined below\&. .SS "Assigning a local address to a socket" .sp When assigning a local address to a socket using \fIzmq_bind()\fR with the \fItcp\fR transport, the \fIendpoint\fR shall be interpreted as an \fIinterface\fR followed by a colon and the TCP port number to use\&. .sp An \fIinterface\fR may be specified by either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The wild\-card *, meaning all available interfaces\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The primary IPv4 or IPv6 address assigned to the interface, in its numeric representation\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The non\-portable interface name as defined by the operating system\&. .RE .sp The TCP port number may be specified by: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} A numeric value, usually above 1024 on POSIX systems\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The wild\-card *, meaning a system\-assigned ephemeral port\&. .RE .sp When using ephemeral ports, the caller should retrieve the actual assigned port using the ZMQ_LAST_ENDPOINT socket option\&. See \fBzmq_getsockopt\fR(3) for details\&. .SS "Connecting a socket" .sp When connecting a socket to a peer address using \fIzmq_connect()\fR with the \fItcp\fR transport, the \fIendpoint\fR shall be interpreted as a \fIpeer address\fR followed by a colon and the TCP port number to use\&. .sp A \fIpeer address\fR may be specified by either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The DNS name of the peer\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The IPv4 or IPv6 address of the peer, in its numeric representation\&. .RE .sp Note: A description of the ZeroMQ Message Transport Protocol (ZMTP) which is used by the TCP transport can be found at \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:15\fR\m[] .SH "EXAMPLES" .PP \fBAssigning a local address to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // TCP port 5555 on all available interfaces rc = zmq_bind(socket, "tcp:/// :5555"); assert (rc == 0); // TCP port 5555 on the local loop\-back interface on all platforms rc = zmq_bind(socket, "tcp://127\&.0\&.0\&.1:5555"); assert (rc == 0); // TCP port 5555 on the first Ethernet network interface on Linux rc = zmq_bind(socket, "tcp://eth0:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // Connecting using an IP address rc = zmq_connect(socket, "tcp://192\&.168\&.1\&.1:5555"); assert (rc == 0); // Connecting using a DNS name rc = zmq_connect(socket, "tcp://server1:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_pgm\fR(7) \fBzmq_ipc\fR(7) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq.70000644000175000017500000002212612307431327015404 0ustar ghedoghedo'\" t .\" Title: zmq .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ" "7" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq \- 0MQ lightweight messaging kernel .SH "SYNOPSIS" .sp \fB#include \fR .sp \fBcc\fR [\fIflags\fR] \fIfiles\fR \fB\-lzmq\fR [\fIlibraries\fR] .SH "DESCRIPTION" .sp The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised \fImessaging middleware\fR products\&. 0MQ sockets provide an abstraction of asynchronous \fImessage queues\fR, multiple \fImessaging patterns\fR, message filtering (\fIsubscriptions\fR), seamless access to multiple \fItransport protocols\fR and more\&. .sp This documentation presents an overview of 0MQ concepts, describes how 0MQ abstracts standard sockets and provides a reference manual for the functions provided by the 0MQ library\&. .SS "Context" .sp Before using any 0MQ library functions you must create a 0MQ \fIcontext\fR\&. When you exit your application you must destroy the \fIcontext\fR\&. These functions let you work with \fIcontexts\fR: .PP Create a new 0MQ context .RS 4 \fBzmq_ctx_new\fR(3) .RE .PP Work with context properties .RS 4 \fBzmq_ctx_set\fR(3) \fBzmq_ctx_get\fR(3) .RE .PP Destroy a 0MQ context .RS 4 \fBzmq_ctx_term\fR(3) .RE .sp These deprecated functions let you create and destroy \fIcontexts\fR: .PP Initialise 0MQ context .RS 4 \fBzmq_init\fR(3) .RE .PP Terminate 0MQ context .RS 4 \fBzmq_term\fR(3) .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBThread safety\fR .RS 4 .sp A 0MQ \fIcontext\fR is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller\&. .sp Individual 0MQ \fIsockets\fR are \fInot\fR thread safe except in the case where full memory barriers are issued when migrating a socket from one thread to another\&. In practice this means applications can create a socket in one thread with \fIzmq_socket()\fR and then pass it to a \fInewly created\fR thread as part of thread initialization, for example via a structure passed as an argument to \fIpthread_create()\fR\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBMultiple contexts\fR .RS 4 .sp Multiple \fIcontexts\fR may coexist within a single application\&. Thus, an application can use 0MQ directly and at the same time make use of any number of additional libraries or components which themselves make use of 0MQ as long as the above guidelines regarding thread safety are adhered to\&. .RE .SS "Messages" .sp A 0MQ message is a discrete unit of data passed between applications or components of the same application\&. 0MQ messages have no internal structure and from the point of view of 0MQ itself they are considered to be opaque binary data\&. .sp The following functions are provided to work with messages: .PP Initialise a message .RS 4 \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) .RE .PP Sending and receiving a message .RS 4 \fBzmq_msg_send\fR(3) \fBzmq_msg_recv\fR(3) .RE .PP Release a message .RS 4 \fBzmq_msg_close\fR(3) .RE .PP Access message content .RS 4 \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq_msg_more\fR(3) .RE .PP Work with message properties .RS 4 \fBzmq_msg_get\fR(3) \fBzmq_msg_set\fR(3) .RE .PP Message manipulation .RS 4 \fBzmq_msg_copy\fR(3) \fBzmq_msg_move\fR(3) .RE .SS "Sockets" .sp 0MQ sockets present an abstraction of a asynchronous \fImessage queue\fR, with the exact queueing semantics depending on the socket type in use\&. See \fBzmq_socket\fR(3) for the socket types provided\&. .sp The following functions are provided to work with sockets: .PP Creating a socket .RS 4 \fBzmq_socket\fR(3) .RE .PP Closing a socket .RS 4 \fBzmq_close\fR(3) .RE .PP Manipulating socket options .RS 4 \fBzmq_getsockopt\fR(3) \fBzmq_setsockopt\fR(3) .RE .PP Establishing a message flow .RS 4 \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) .RE .PP Sending and receiving messages .RS 4 \fBzmq_msg_send\fR(3) \fBzmq_msg_recv\fR(3) \fBzmq_send\fR(3) \fBzmq_recv\fR(3) \fBzmq_send_const\fR(3) .RE .sp Monitoring socket events: \fBzmq_socket_monitor\fR(3) .PP \fBInput/output multiplexing\fR. 0MQ provides a mechanism for applications to multiplex input/output events over a set containing both 0MQ sockets and standard sockets\&. This mechanism mirrors the standard \fIpoll()\fR system call, and is described in detail in \fBzmq_poll\fR(3)\&. .SS "Transports" .sp A 0MQ socket can use multiple different underlying transport mechanisms\&. Each transport mechanism is suited to a particular purpose and has its own advantages and drawbacks\&. .sp The following transport mechanisms are provided: .PP Unicast transport using TCP .RS 4 \fBzmq_tcp\fR(7) .RE .PP Reliable multicast transport using PGM .RS 4 \fBzmq_pgm\fR(7) .RE .PP Local inter\-process communication transport .RS 4 \fBzmq_ipc\fR(7) .RE .PP Local in\-process (inter\-thread) communication transport .RS 4 \fBzmq_inproc\fR(7) .RE .SS "Proxies" .sp 0MQ provides \fIproxies\fR to create fanout and fan\-in topologies\&. A proxy connects a \fIfrontend\fR socket to a \fIbackend\fR socket and switches all messages between the two sockets, opaquely\&. A proxy may optionally capture all traffic to a third socket\&. To start a proxy in an application thread, use \fBzmq_proxy\fR(3)\&. .SS "Security" .sp A 0MQ socket can select a security mechanism\&. Both peers must use the same security mechanism\&. .sp The following security mechanisms are provided for IPC and TCP connections: .PP Null security .RS 4 \fBzmq_null\fR(7) .RE .PP Plain\-text authentication using username and password .RS 4 \fBzmq_plain\fR(7) .RE .PP Elliptic curve authentication and encryption .RS 4 \fBzmq_curve\fR(7) .RE .sp Generate a CURVE keypair in armored text format: \fBzmq_curve_keypair\fR(3) .sp Convert an armored key into a 32\-byte binary key: \fBzmq_z85_decode\fR(3) .sp Convert a 32\-byte binary CURVE key to an armored text string: \fBzmq_z85_encode\fR(3) .SH "ERROR HANDLING" .sp The 0MQ library functions handle errors using the standard conventions found on POSIX systems\&. Generally, this means that upon failure a 0MQ library function shall return either a NULL value (if returning a pointer) or a negative value (if returning an integer), and the actual error code shall be stored in the \fIerrno\fR variable\&. .sp On non\-POSIX systems some users may experience issues with retrieving the correct value of the \fIerrno\fR variable\&. The \fIzmq_errno()\fR function is provided to assist in these cases; for details refer to \fBzmq_errno\fR(3)\&. .sp The \fIzmq_strerror()\fR function is provided to translate 0MQ\-specific error codes into error message strings; for details refer to \fBzmq_strerror\fR(3)\&. .SH "MISCELLANEOUS" .sp The following miscellaneous functions are provided: .PP Report 0MQ library version .RS 4 \fBzmq_version\fR(3) .RE .SH "LANGUAGE BINDINGS" .sp The 0MQ library provides interfaces suitable for calling from programs in any language; this documentation documents those interfaces as they would be used by C programmers\&. The intent is that programmers using 0MQ from other languages shall refer to this documentation alongside any documentation provided by the vendor of their language binding\&. .sp Language bindings (C++, Python, PHP, Ruby, Java and more) are provided by members of the 0MQ community and pointers can be found on the 0MQ website\&. .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. .SH "RESOURCES" .sp Main web site: \m[blue]\fBhttp://www\&.zeromq\&.org/\fR\m[] .sp Report bugs to the 0MQ development mailing list: <\m[blue]\fBzeromq\-dev@lists\&.zeromq\&.org\fR\m[]\&\s-2\u[1]\d\s+2> .SH "COPYING" .sp Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL)\&. For details see the files COPYING and COPYING\&.LESSER included with the 0MQ distribution\&. .SH "NOTES" .IP " 1." 4 zeromq-dev@lists.zeromq.org .RS 4 \%mailto:zeromq-dev@lists.zeromq.org .RE zeromq3-4.0.4+dfsg.orig/doc/zmq_unbind.html0000644000175000017500000004545012307431344017545 0ustar ghedoghedo zmq_unbind(3)

SYNOPSIS

int zmq_unbind (void *socket, const char *endpoint);

DESCRIPTION

The zmq_unbind() function shall unbind a socket specified by the socket argument from the endpoint specified by the endpoint argument.

The endpoint argument is as described in zmq_bind(3)

RETURN VALUE

The zmq_unbind() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The endpoint supplied is invalid.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EXAMPLE

Unbind a subscriber socket from a TCP transport
/* Create a ZMQ_SUB socket */
void *socket = zmq_socket (context, ZMQ_SUB);
assert (socket);
/* Connect it to the host server001, port 5555 using a TCP transport */
rc = zmq_bind (socket, "tcp://127.0.0.1:5555");
assert (rc == 0);
/* Disconnect from the previously connected endpoint */
rc = zmq_unbind (socket, "tcp://127.0.0.1:5555");
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_bind.30000644000175000017500000001173712307431210016371 0ustar ghedoghedo'\" t .\" Title: zmq_bind .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_BIND" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_bind \- accept incoming connections on a socket .SH "SYNOPSIS" .sp \fBint zmq_bind (void \fR\fB\fI*socket\fR\fR\fB, const char \fR\fB\fI*endpoint\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_bind()\fR function binds the \fIsocket\fR to a local \fIendpoint\fR and then accepts incoming connections on that endpoint\&. .sp The \fIendpoint\fR is a string consisting of a \fItransport\fR:// followed by an \fIaddress\fR\&. The \fItransport\fR specifies the underlying protocol to use\&. The \fIaddress\fR specifies the transport\-specific address to bind to\&. .sp 0MQ provides the the following transports: .PP \fItcp\fR .RS 4 unicast transport using TCP, see \fBzmq_tcp\fR(7) .RE .PP \fIipc\fR .RS 4 local inter\-process communication transport, see \fBzmq_ipc\fR(7) .RE .PP \fIinproc\fR .RS 4 local in\-process (inter\-thread) communication transport, see \fBzmq_inproc\fR(7) .RE .PP \fIpgm\fR, \fIepgm\fR .RS 4 reliable multicast transport using PGM, see \fBzmq_pgm\fR(7) .RE .sp Every 0MQ socket type except \fIZMQ_PAIR\fR supports one\-to\-many and many\-to\-one semantics\&. The precise semantics depend on the socket type and are defined in \fBzmq_socket\fR(3)\&. .sp The \fIipc\fR and \fItcp\fR transports accept wildcard addresses: see \fBzmq_ipc\fR(7) and \fBzmq_tcp\fR(7) for details\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp the address syntax may be different for \fIzmq_bind()\fR and \fIzmq_connect()\fR especially for the \fItcp\fR, \fIpgm\fR and \fIepgm\fR transports\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp following a \fIzmq_bind()\fR, the socket enters a \fImute\fR state unless or until at least one incoming or outgoing connection is made, at which point the socket enters a \fIready\fR state\&. In the mute state, the socket blocks or drops messages according to the socket type, as defined in \fBzmq_socket\fR(3)\&. By contrast, following a libzmq:zmq_connect[3], the socket enters the \fIready\fR state\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_bind()\fR function returns zero if successful\&. Otherwise it returns \-1 and sets \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The endpoint supplied is invalid\&. .RE .PP \fBEPROTONOSUPPORT\fR .RS 4 The requested \fItransport\fR protocol is not supported\&. .RE .PP \fBENOCOMPATPROTO\fR .RS 4 The requested \fItransport\fR protocol is not compatible with the socket type\&. .RE .PP \fBEADDRINUSE\fR .RS 4 The requested \fIaddress\fR is already in use\&. .RE .PP \fBEADDRNOTAVAIL\fR .RS 4 The requested \fIaddress\fR was not local\&. .RE .PP \fBENODEV\fR .RS 4 The requested \fIaddress\fR specifies a nonexistent interface\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEMTHREAD\fR .RS 4 No I/O thread is available to accomplish the task\&. .RE .SH "EXAMPLE" .PP \fBBinding a publisher socket to an in-process and a TCP transport\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create a ZMQ_PUB socket */ void *socket = zmq_socket (context, ZMQ_PUB); assert (socket); /* Bind it to a in\-process transport with the address \*(Aqmy_publisher\*(Aq */ int rc = zmq_bind (socket, "inproc://my_publisher"); assert (rc == 0); /* Bind it to a TCP transport on port 5555 of the \*(Aqeth0\*(Aq interface */ rc = zmq_bind (socket, "tcp://eth0:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_connect\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_getsockopt.html0000644000175000017500000017456412307431360020457 0ustar ghedoghedo zmq_getsockopt(3)

SYNOPSIS

int zmq_getsockopt (void *socket, int option_name, void *option_value, size_t *option_len);

DESCRIPTION

The zmq_getsockopt() function shall retrieve the value for the option specified by the option_name argument for the ØMQ socket pointed to by the socket argument, and store it in the buffer pointed to by the option_value argument. The option_len argument is the size in bytes of the buffer pointed to by option_value; upon successful completion zmq_getsockopt() shall modify the option_len argument to indicate the actual size of the option value stored in the buffer.

The following options can be retrieved with the zmq_getsockopt() function:

ZMQ_TYPE: Retrieve socket type

The ZMQ_TYPE option shall retrieve the socket type for the specified socket. The socket type is specified at socket creation time and cannot be modified afterwards.

Option value type

int

Option value unit

N/A

Default value

N/A

Applicable socket types

all

ZMQ_RCVMORE: More message data parts to follow

The ZMQ_RCVMORE option shall return True (1) if the message part last received from the socket was a data part with more parts to follow. If there are no data parts to follow, this option shall return False (0).

Refer to zmq_send(3) and zmq_recv(3) for a detailed description of multi-part messages.

Option value type

int

Option value unit

boolean

Default value

N/A

Applicable socket types

all

ZMQ_SNDHWM: Retrieves high water mark for outbound messages

The ZMQ_SNDHWM option shall return the high water mark for outbound messages on the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in zmq_socket(3) for details on the exact action taken for each socket type.

Option value type

int

Option value unit

messages

Default value

1000

Applicable socket types

all

ZMQ_RCVHWM: Retrieve high water mark for inbound messages

The ZMQ_RCVHWM option shall return the high water mark for inbound messages on the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with. A value of zero means no limit.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in zmq_socket(3) for details on the exact action taken for each socket type.

Option value type

int

Option value unit

messages

Default value

1000

Applicable socket types

all

ZMQ_AFFINITY: Retrieve I/O thread affinity

The ZMQ_AFFINITY option shall retrieve the I/O thread affinity for newly created connections on the specified socket.

Affinity determines which threads from the ØMQ I/O thread pool associated with the socket’s context shall handle newly created connections. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all ØMQ I/O threads in the thread pool. For non-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on. For example, a value of 3 specifies that subsequent connections on socket shall be handled exclusively by I/O threads 1 and 2.

See also zmq_init(3) for details on allocating the number of I/O threads for a specific context.

Option value type

uint64_t

Option value unit

N/A (bitmap)

Default value

0

Applicable socket types

N/A

ZMQ_IDENTITY: Retrieve socket identity

The ZMQ_IDENTITY option shall retrieve the identity of the specified socket. Socket identity is used only by request/reply pattern. Namely, it can be used in tandem with ROUTER socket to route messages to the peer with specific identity.

Identity should be at least one byte and at most 255 bytes long. Identities starting with binary zero are reserved for use by ØMQ infrastructure.

Option value type

binary data

Option value unit

N/A

Default value

NULL

Applicable socket types

ZMQ_REP, ZMQ_REQ, ZMQ_ROUTER, ZMQ_DEALER.

ZMQ_RATE: Retrieve multicast data rate

The ZMQ_RATE option shall retrieve the maximum send or receive data rate for multicast transports using the specified socket.

Option value type

int

Option value unit

kilobits per second

Default value

100

Applicable socket types

all, when using multicast transports

ZMQ_RECOVERY_IVL: Get multicast recovery interval

The ZMQ_RECOVERY_IVL option shall retrieve the recovery interval for multicast transports using the specified socket. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

Option value type

int

Option value unit

milliseconds

Default value

10000

Applicable socket types

all, when using multicast transports

ZMQ_SNDBUF: Retrieve kernel transmit buffer size

The ZMQ_SNDBUF option shall retrieve the underlying kernel transmit buffer size for the specified socket. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the SO_SNDBUF socket option.

Option value type

int

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_RCVBUF: Retrieve kernel receive buffer size

The ZMQ_RCVBUF option shall retrieve the underlying kernel receive buffer size for the specified socket. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the SO_RCVBUF socket option.

Option value type

int

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_LINGER: Retrieve linger period for socket shutdown

The ZMQ_LINGER option shall retrieve the linger period for the specified socket. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with zmq_close(3), and further affects the termination of the socket’s context with zmq_term(3). The following outlines the different behaviours:

  • The default value of -1 specifies an infinite linger period. Pending messages shall not be discarded after a call to zmq_close(); attempting to terminate the socket’s context with zmq_term() shall block until all pending messages have been sent to a peer.

  • The value of 0 specifies no linger period. Pending messages shall be discarded immediately when the socket is closed with zmq_close().

  • Positive values specify an upper bound for the linger period in milliseconds. Pending messages shall not be discarded after a call to zmq_close(); attempting to terminate the socket’s context with zmq_term() shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded.

    Option value type

    int

    Option value unit

    milliseconds

    Default value

    -1 (infinite)

    Applicable socket types

    all

ZMQ_RECONNECT_IVL: Retrieve reconnection interval

The ZMQ_RECONNECT_IVL option shall retrieve the initial reconnection interval for the specified socket. The reconnection interval is the period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. The value -1 means no reconnection.

Note
The reconnection interval may be randomized by ØMQ to prevent reconnection storms in topologies with a large number of peers per socket.
Option value type

int

Option value unit

milliseconds

Default value

100

Applicable socket types

all, only for connection-oriented transports

ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval

The ZMQ_RECONNECT_IVL_MAX option shall retrieve the maximum reconnection interval for the specified socket. This is the maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential backoff strategy. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL.

Note
Values less than ZMQ_RECONNECT_IVL will be ignored.
Option value type

int

Option value unit

milliseconds

Default value

0 (only use ZMQ_RECONNECT_IVL)

Applicable socket types

all, only for connection-oriented transport

ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections

The ZMQ_BACKLOG option shall retrieve the maximum length of the queue of outstanding peer connections for the specified socket; this only applies to connection-oriented transports. For details refer to your operating system documentation for the listen function.

Option value type

int

Option value unit

connections

Default value

100

Applicable socket types

all, only for connection-oriented transports

ZMQ_MAXMSGSIZE: Maximum acceptable inbound message size

The option shall retrieve limit for the inbound messages. If a peer sends a message larger than ZMQ_MAXMSGSIZE it is disconnected. Value of -1 means no limit.

Option value type

int64_t

Option value unit

bytes

Default value

-1

Applicable socket types

all

ZMQ_MULTICAST_HOPS: Maximum network hops for multicast packets

The option shall retrieve time-to-live used for outbound multicast packets. The default of 1 means that the multicast packets don’t leave the local network.

Option value type

int

Option value unit

network hops

Default value

1

Applicable socket types

all, when using multicast transports

ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN

Retrieve the timeout for recv operation on the socket. If the value is 0, zmq_recv(3) will return immediately, with a EAGAIN error if there is no message to receive. If the value is -1, it will block until a message is available. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error.

Option value type

int

Option value unit

milliseconds

Default value

-1 (infinite)

Applicable socket types

all

ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN

Retrieve the timeout for send operation on the socket. If the value is 0, zmq_send(3) will return immediately, with a EAGAIN error if the message cannot be sent. If the value is -1, it will block until the message is sent. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error.

Option value type

int

Option value unit

milliseconds

Default value

-1 (infinite)

Applicable socket types

all

ZMQ_IPV6: Retrieve IPv6 socket status

Retrieve the IPv6 option for the socket. A value of 1 means IPv6 is enabled on the socket, while 0 means the socket will use only IPv4. When IPv6 is enabled the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

Option value type

int

Option value unit

boolean

Default value

0 (false)

Applicable socket types

all, when using TCP transports.

ZMQ_IPV4ONLY: Retrieve IPv4-only socket override status

Retrieve the IPv4-only option for the socket. This option is deprecated. Please use the ZMQ_IPV6 option.

Option value type

int

Option value unit

boolean

Default value

1 (true)

Applicable socket types

all, when using TCP transports.

ZMQ_IMMEDIATE: Retrieve attach-on-connect value

Retrieve the state of the attach on connect value. If set to 1, will delay the attachment of a pipe on connect until the underlying connection has completed. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection.

Option value type

int

Option value unit

boolean

Default value

0 (false)

Applicable socket types

all, primarily when using TCP/IPC transports.

ZMQ_FD: Retrieve file descriptor associated with the socket

The ZMQ_FD option shall retrieve the file descriptor associated with the specified socket. The returned file descriptor can be used to integrate the socket into an existing event loop; the ØMQ library shall signal any pending events on the socket in an edge-triggered fashion by making the file descriptor become ready for reading.

Note
The ability to read from the returned file descriptor does not necessarily indicate that messages are available to be read from, or can be written to, the underlying socket; applications must retrieve the actual event state with a subsequent retrieval of the ZMQ_EVENTS option.
Note
The returned file descriptor is also used internally by the zmq_send and zmq_recv functions. As the descriptor is edge triggered, applications must update the state of ZMQ_EVENTS after each invocation of zmq_send or zmq_recv.To be more explicit: after calling zmq_send the socket may become readable (and vice versa) without triggering a read event on the file descriptor.
Caution
The returned file descriptor is intended for use with a poll or similar system call only. Applications must never attempt to read or write data to it directly, neither should they try to close it.
Option value type

int on POSIX systems, SOCKET on Windows

Option value unit

N/A

Default value

N/A

Applicable socket types

all

ZMQ_EVENTS: Retrieve socket event state

The ZMQ_EVENTS option shall retrieve the event state for the specified socket. The returned value is a bit mask constructed by OR’ing a combination of the following event flags:

ZMQ_POLLIN

Indicates that at least one message may be received from the specified socket without blocking.

ZMQ_POLLOUT

Indicates that at least one message may be sent to the specified socket without blocking.

The combination of a file descriptor returned by the ZMQ_FD option being ready for reading but no actual events returned by a subsequent retrieval of the ZMQ_EVENTS option is valid; applications should simply ignore this case and restart their polling operation/event loop.

Option value type

int

Option value unit

N/A (flags)

Default value

N/A

Applicable socket types

all

ZMQ_LAST_ENDPOINT: Retrieve the last endpoint set

The ZMQ_LAST_ENDPOINT option shall retrieve the last endpoint bound for TCP and IPC transports. The returned value will be a string in the form of a ZMQ DSN. Note that if the TCP host is INADDR_ANY, indicated by a *, then the returned address will be 0.0.0.0 (for IPv4).

Option value type

NULL-terminated character string

Option value unit

N/A

Default value

NULL

Applicable socket types

all, when binding TCP or IPC transports

ZMQ_TCP_KEEPALIVE: Override SO_KEEPALIVE socket option

Override SO_KEEPALIVE socket option(where supported by OS). The default value of -1 means to skip any overrides and leave it to OS default.

Option value type

int

Option value unit

-1,0,1

Default value

-1 (leave to OS default)

Applicable socket types

all, when using TCP transports.

ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPCNT(or TCP_KEEPALIVE on some OS)

Override TCP_KEEPCNT(or TCP_KEEPALIVE on some OS) socket option (where supported by OS). The default value of -1 means to skip any overrides and leave it to OS default.

Option value type

int

Option value unit

-1,>0

Default value

-1 (leave to OS default)

Applicable socket types

all, when using TCP transports.

ZMQ_TCP_KEEPALIVE_CNT: Override TCP_KEEPCNT socket option

Override TCP_KEEPCNT socket option(where supported by OS). The default value of -1 means to skip any overrides and leave it to OS default.

Option value type

int

Option value unit

-1,>0

Default value

-1 (leave to OS default)

Applicable socket types

all, when using TCP transports.

ZMQ_TCP_KEEPALIVE_INTVL: Override TCP_KEEPINTVL socket option

Override TCP_KEEPINTVL socket option(where supported by OS). The default value of -1 means to skip any overrides and leave it to OS default.

Option value type

int

Option value unit

-1,>0

Default value

-1 (leave to OS default)

Applicable socket types

all, when using TCP transports.

ZMQ_MECHANISM: Retrieve current security mechanism

The ZMQ_MECHANISM option shall retrieve the current security mechanism for the socket.

Option value type

int

Option value unit

ZMQ_NULL, ZMQ_PLAIN, or ZMQ_CURVE

Default value

ZMQ_NULL

Applicable socket types

all, when using TCP or IPC transports

ZMQ_PLAIN_SERVER: Retrieve current PLAIN server role

Returns the ZMQ_PLAIN_SERVER option, if any, previously set on the socket.

Option value type

int

Option value unit

0, 1

Default value

int

Applicable socket types

all, when using TCP or IPC transports

ZMQ_PLAIN_USERNAME: Retrieve current PLAIN username

The ZMQ_PLAIN_USERNAME option shall retrieve the last username set for the PLAIN security mechanism. The returned value shall be a NULL-terminated string and MAY be empty. The returned size SHALL include the terminating null byte.

Option value type

NULL-terminated character string

Option value unit

N/A

Default value

null string

Applicable socket types

all, when using TCP or IPC transports

ZMQ_PLAIN_PASSWORD: Retrieve current password

The ZMQ_PLAIN_PASSWORD option shall retrieve the last password set for the PLAIN security mechanism. The returned value shall be a NULL-terminated string and MAY be empty. The returned size SHALL include the terminating null byte.

Option value type

NULL-terminated character string

Option value unit

N/A

Default value

null string

Applicable socket types

all, when using TCP or IPC transports

ZMQ_CURVE_PUBLICKEY: Retrieve current CURVE public key

Retrieves the current long term public key for the socket. You can provide either a 32 byte buffer, to retrieve the binary key value, or a 41 byte buffer, to retrieve the key in a printable Z85 format. NOTE: to fetch a printable key, the buffer must be 41 bytes large to hold the 40-char key value and one null byte.

Option value type

binary data or Z85 text string

Option value size

32 or 41

Default value

null

Applicable socket types

all, when using TCP transport

ZMQ_CURVE_SECRETKEY: Retrieve current CURVE secret key

Retrieves the current long term secret key for the socket. You can provide either a 32 byte buffer, to retrieve the binary key value, or a 41 byte buffer, to retrieve the key in a printable Z85 format.

Option value type

binary data or Z85 text string

Option value size

32 or 41

Default value

null

Applicable socket types

all, when using TCP transport

ZMQ_CURVE_SERVERKEY: Retrieve current CURVE server key

Retrieves the current server key for the client socket. You can provide either a 32 byte buffer, to retrieve the binary key value, or a 40 byte buffer, to retrieve the key in a printable Z85 format.

Option value type

binary data or Z85 text string

Option value size

32 or 41

Default value

null

Applicable socket types

all, when using TCP transport

ZMQ_ZAP_DOMAIN: Retrieve RFC 27 authentication domain

The ZMQ_ZAP_DOMAIN option shall retrieve the last ZAP domain set for the socket. The returned value shall be a NULL-terminated string and MAY be empty. The returned size SHALL include the terminating null byte.

Option value type

character string

Option value unit

N/A

Default value

not set

Applicable socket types

all, when using TCP transport

RETURN VALUE

The zmq_getsockopt() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The requested option option_name is unknown, or the requested option_len or option_value is invalid, or the size of the buffer pointed to by option_value, as specified by option_len, is insufficient for storing the option value.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal.

EXAMPLE

Retrieving the high water mark for outgoing messages
/* Retrieve high water mark into sndhwm */
int sndhwm;
size_t sndhwm_size = sizeof (sndhwm);
rc = zmq_getsockopt (socket, ZMQ_SNDHWM, &sndhwm, &sndhwm_size);
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_socket_monitor.30000644000175000017500000002104112307431300020501 0ustar ghedoghedo'\" t .\" Title: zmq_ctx_socket_monitor .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CTX_SOCKET_MONIT" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_socket_monitor \- register a monitoring callback .SH "SYNOPSIS" .sp \fBint zmq_socket_monitor (void \fR\fB\fI*socket\fR\fR\fB, char * \fR\fB\fI*addr\fR\fR\fB, int \fR\fB\fIevents\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_socket_monitor()\fR function shall spawn a \fIPAIR\fR socket that publishes socket state changes (events) over the inproc:// transport to a given endpoint\&. .sp Messages consist of 2 Frames, the first containing the event\-id and the associated value\&. The second frame holds the affected endpoint as string\&. .sp The layout of the first Frame is: 16 bit event id 32 bit event value .sp event id and value are in the native byte order (for the machine the application is running on)\&. There is no padding between the fields\&. .sp The event value has to be interpreted in the context of the event id\&. See \fISupported events\fR below for details\&. .sp .if n \{\ .RS 4 .\} .nf Only connection oriented (tcp and ipc) transports are supported in this initial implementation\&. .fi .if n \{\ .RE .\} .SH "SUPPORTED EVENTS" .SS "ZMQ_EVENT_CONNECTED: connection established" .sp The \fIZMQ_EVENT_CONNECTED\fR event triggers when a connection has been established to a remote peer\&. This can happen either synchronous or asynchronous\&. Value is the FD of the newly connected socket\&. .SS "ZMQ_EVENT_CONNECT_DELAYED: synchronous connect failed, it\(cqs being polled" .sp The \fIZMQ_EVENT_CONNECT_DELAYED\fR event triggers when an immediate connection attempt is delayed and its completion is being polled for\&. Value has no meaning\&. .SS "ZMQ_EVENT_CONNECT_RETRIED: asynchronous connect / reconnection attempt" .sp The \fIZMQ_EVENT_CONNECT_RETRIED\fR event triggers when a connection attempt is being handled by reconnect timer\&. The reconnect interval\(cqs recomputed for each attempt\&. Value is the reconnect interval\&. .SS "ZMQ_EVENT_LISTENING: socket bound to an address, ready to accept connections" .sp The \fIZMQ_EVENT_LISTENING\fR event triggers when a socket\(cqs successfully bound to a an interface\&. Value is the FD of the newly bound socket\&. .SS "ZMQ_EVENT_BIND_FAILED: socket could not bind to an address" .sp The \fIZMQ_EVENT_BIND_FAILED\fR event triggers when a socket could not bind to a given interface\&. Value is the errno generated by the bind call\&. .SS "ZMQ_EVENT_ACCEPTED: connection accepted to bound interface" .sp The \fIZMQ_EVENT_ACCEPTED\fR event triggers when a connection from a remote peer has been established with a socket\(cqs listen address\&. Value is the FD of the accepted socket\&. .SS "ZMQ_EVENT_ACCEPT_FAILED: could not accept client connection" .sp The \fIZMQ_EVENT_ACCEPT_FAILED\fR event triggers when a connection attempt to a socket\(cqs bound address fails\&. Value is the errno generated by accept\&. .SS "ZMQ_EVENT_CLOSED: connection closed" .sp The \fIZMQ_EVENT_CLOSED\fR event triggers when a connection\(cqs underlying descriptor has been closed\&. Value is the former FD of the for the closed socket\&. FD has been closed already! .SS "ZMQ_EVENT_CLOSE_FAILED: connection couldn\(cqt be closed" .sp The \fIZMQ_EVENT_CLOSE_FAILED\fR event triggers when a descriptor could not be released back to the OS\&. Implementation note: ONLY FOR IPC SOCKETS\&. Value is the errno generated by unlink\&. .SS "ZMQ_EVENT_DISCONNECTED: broken session" .sp The \fIZMQ_EVENT_DISCONNECTED\fR event triggers when the stream engine (tcp and ipc specific) detects a corrupted / broken session\&. Value is the FD of the socket\&. .SH "RETURN VALUE" .sp The \fIzmq_socket_monitor()\fR function returns a value of 0 or greater if successful\&. Otherwise it returns \-1 and sets \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBEPROTONOSUPPORT\fR .RS 4 The requested \fItransport\fR protocol is not supported\&. Monitor sockets are required to use the inproc:// transport\&. .RE .PP \fBEINVAL\fR .RS 4 The endpoint supplied is invalid\&. .RE .SH "EXAMPLE" .PP \fBObserving a REP socket\(cqs connection state\fR. .sp .if n \{\ .RS 4 .\} .nf #include #include #include #include #include static int read_msg(void* s, zmq_event_t* event, char* ep) { int rc ; zmq_msg_t msg1; // binary part zmq_msg_init (&msg1); zmq_msg_t msg2; // address part zmq_msg_init (&msg2); rc = zmq_msg_recv (&msg1, s, 0); if (rc == \-1 && zmq_errno() == ETERM) return 1 ; assert (rc != \-1); assert (zmq_msg_more(&msg1) != 0); rc = zmq_msg_recv (&msg2, s, 0); if (rc == \-1 && zmq_errno() == ETERM) return 1; assert (rc != \-1); assert (zmq_msg_more(&msg2) == 0); // copy binary data to event struct const char* data = (char*)zmq_msg_data(&msg1); memcpy(&(event\->event), data, sizeof(event\->event)); memcpy(&(event\->value), data+sizeof(event\->event), sizeof(event\->value)); // copy address part const size_t len = zmq_msg_size(&msg2) ; ep = memcpy(ep, zmq_msg_data(&msg2), len); *(ep + len) = 0 ; return 0 ; } // REP socket monitor thread static void *rep_socket_monitor (void *ctx) { zmq_event_t event; static char addr[1025] ; int rc; printf("starting monitor\&.\&.\&.\en"); void *s = zmq_socket (ctx, ZMQ_PAIR); assert (s); rc = zmq_connect (s, "inproc://monitor\&.rep"); assert (rc == 0); while (!read_msg(s, &event, addr)) { switch (event\&.event) { case ZMQ_EVENT_LISTENING: printf ("listening socket descriptor %d\en", event\&.value); printf ("listening socket address %s\en", addr); break; case ZMQ_EVENT_ACCEPTED: printf ("accepted socket descriptor %d\en", event\&.value); printf ("accepted socket address %s\en", addr); break; case ZMQ_EVENT_CLOSE_FAILED: printf ("socket close failure error code %d\en", event\&.value); printf ("socket address %s\en", addr); break; case ZMQ_EVENT_CLOSED: printf ("closed socket descriptor %d\en", event\&.value); printf ("closed socket address %s\en", addr); break; case ZMQ_EVENT_DISCONNECTED: printf ("disconnected socket descriptor %d\en", event\&.value); printf ("disconnected socket address %s\en", addr); break; } } zmq_close (s); return NULL; } int main() { const char* addr = "tcp://127\&.0\&.0\&.1:6666" ; pthread_t thread ; // Create the infrastructure void *ctx = zmq_init (1); assert (ctx); // REP socket void* rep = zmq_socket (ctx, ZMQ_REP); assert (rep); // REP socket monitor, all events int rc = zmq_socket_monitor (rep, "inproc://monitor\&.rep", ZMQ_EVENT_ALL); assert (rc == 0); rc = pthread_create (&thread, NULL, rep_socket_monitor, ctx); assert (rc == 0); rc = zmq_bind (rep, addr); assert (rc == 0); // Allow some time for event detection zmq_sleep (1); // Close the REP socket rc = zmq_close (rep); assert (rc == 0); zmq_term (ctx); return 0 ; } .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_connect.30000644000175000017500000001224612307431214017106 0ustar ghedoghedo'\" t .\" Title: zmq_connect .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CONNECT" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_connect \- create outgoing connection from socket .SH "SYNOPSIS" .sp \fBint zmq_connect (void \fR\fB\fI*socket\fR\fR\fB, const char \fR\fB\fI*endpoint\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_connect()\fR function connects the \fIsocket\fR to an \fIendpoint\fR and then accepts incoming connections on that endpoint\&. .sp The \fIendpoint\fR is a string consisting of a \fItransport\fR:// followed by an \fIaddress\fR\&. The \fItransport\fR specifies the underlying protocol to use\&. The \fIaddress\fR specifies the transport\-specific address to connect to\&. .sp 0MQ provides the the following transports: .PP \fItcp\fR .RS 4 unicast transport using TCP, see \fBzmq_tcp\fR(7) .RE .PP \fIipc\fR .RS 4 local inter\-process communication transport, see \fBzmq_ipc\fR(7) .RE .PP \fIinproc\fR .RS 4 local in\-process (inter\-thread) communication transport, see \fBzmq_inproc\fR(7) .RE .PP \fIpgm\fR, \fIepgm\fR .RS 4 reliable multicast transport using PGM, see \fBzmq_pgm\fR(7) .RE .sp Every 0MQ socket type except \fIZMQ_PAIR\fR supports one\-to\-many and many\-to\-one semantics\&. The precise semantics depend on the socket type and are defined in \fBzmq_socket\fR(3)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp for most transports and socket types the connection is not performed immediately but as needed by 0MQ\&. Thus a successful call to \fIzmq_connect()\fR does not mean that the connection was or could actually be established\&. Because of this, for most transports and socket types the order in which a \fIserver\fR socket is bound and a \fIclient\fR socket is connected to it does not matter\&. The first exception is when using the inproc:// transport: you must call \fIzmq_bind()\fR before calling \fIzmq_connect()\fR\&. The second exception are \fIZMQ_PAIR\fR sockets, which do not automatically reconnect to endpoints\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp following a \fIzmq_connect()\fR, for socket types except for ZMQ_ROUTER, the socket enters its normal \fIready\fR state\&. By contrast, following a \fIzmq_bind()\fR alone, the socket enters a \fImute\fR state in which the socket blocks or drops messages according to the socket type, as defined in \fBzmq_socket\fR(3)\&. A ZMQ_ROUTER socket enters its normal \fIready\fR state for a specific peer only when handshaking is complete for that peer, which may take an arbitrary time\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_connect()\fR function returns zero if successful\&. Otherwise it returns \-1 and sets \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The endpoint supplied is invalid\&. .RE .PP \fBEPROTONOSUPPORT\fR .RS 4 The requested \fItransport\fR protocol is not supported\&. .RE .PP \fBENOCOMPATPROTO\fR .RS 4 The requested \fItransport\fR protocol is not compatible with the socket type\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEMTHREAD\fR .RS 4 No I/O thread is available to accomplish the task\&. .RE .SH "EXAMPLE" .PP \fBConnecting a subscriber socket to an in-process and a TCP transport\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); /* Connect it to an in\-process transport with the address \*(Aqmy_publisher\*(Aq */ int rc = zmq_connect (socket, "inproc://my_publisher"); assert (rc == 0); /* Connect it to the host server001, port 5555 using a TCP transport */ rc = zmq_connect (socket, "tcp://server001:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_bind.html0000644000175000017500000005356612307431343017210 0ustar ghedoghedo zmq_bind(3)

SYNOPSIS

int zmq_bind (void *socket, const char *endpoint);

DESCRIPTION

The zmq_bind() function binds the socket to a local endpoint and then accepts incoming connections on that endpoint.

The endpoint is a string consisting of a transport:// followed by an address. The transport specifies the underlying protocol to use. The address specifies the transport-specific address to bind to.

ØMQ provides the the following transports:

tcp

unicast transport using TCP, see zmq_tcp(7)

ipc

local inter-process communication transport, see zmq_ipc(7)

inproc

local in-process (inter-thread) communication transport, see zmq_inproc(7)

pgm, epgm

reliable multicast transport using PGM, see zmq_pgm(7)

Every ØMQ socket type except ZMQ_PAIR supports one-to-many and many-to-one semantics. The precise semantics depend on the socket type and are defined in zmq_socket(3).

The ipc and tcp transports accept wildcard addresses: see zmq_ipc(7) and zmq_tcp(7) for details.

Note
the address syntax may be different for zmq_bind() and zmq_connect() especially for the tcp, pgm and epgm transports.
Note
following a zmq_bind(), the socket enters a mute state unless or until at least one incoming or outgoing connection is made, at which point the socket enters a ready state. In the mute state, the socket blocks or drops messages according to the socket type, as defined in zmq_socket(3). By contrast, following a libzmq:zmq_connect[3], the socket enters the ready state.

RETURN VALUE

The zmq_bind() function returns zero if successful. Otherwise it returns -1 and sets errno to one of the values defined below.

ERRORS

EINVAL

The endpoint supplied is invalid.

EPROTONOSUPPORT

The requested transport protocol is not supported.

ENOCOMPATPROTO

The requested transport protocol is not compatible with the socket type.

EADDRINUSE

The requested address is already in use.

EADDRNOTAVAIL

The requested address was not local.

ENODEV

The requested address specifies a nonexistent interface.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EMTHREAD

No I/O thread is available to accomplish the task.

EXAMPLE

Binding a publisher socket to an in-process and a TCP transport
/* Create a ZMQ_PUB socket */
void *socket = zmq_socket (context, ZMQ_PUB);
assert (socket);
/* Bind it to a in-process transport with the address 'my_publisher' */
int rc = zmq_bind (socket, "inproc://my_publisher");
assert (rc == 0);
/* Bind it to a TCP transport on port 5555 of the 'eth0' interface */
rc = zmq_bind (socket, "tcp://eth0:5555");
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_tcp.txt0000644000175000017500000000571712240736636016741 0ustar ghedoghedozmq_tcp(7) ========== NAME ---- zmq_tcp - 0MQ unicast transport using TCP SYNOPSIS -------- TCP is an ubiquitous, reliable, unicast transport. When connecting distributed applications over a network with 0MQ, using the TCP transport will likely be your first choice. ADDRESSING ---------- A 0MQ endpoint is a string consisting of a 'transport'`://` followed by an 'address'. The 'transport' specifies the underlying protocol to use. The 'address' specifies the transport-specific address to connect to. For the TCP transport, the transport is `tcp`, and the meaning of the 'address' part is defined below. Assigning a local address to a socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When assigning a local address to a socket using _zmq_bind()_ with the 'tcp' transport, the 'endpoint' shall be interpreted as an 'interface' followed by a colon and the TCP port number to use. An 'interface' may be specified by either of the following: * The wild-card `*`, meaning all available interfaces. * The primary IPv4 or IPv6 address assigned to the interface, in its numeric representation. * The non-portable interface name as defined by the operating system. The TCP port number may be specified by: * A numeric value, usually above 1024 on POSIX systems. * The wild-card `*`, meaning a system-assigned ephemeral port. When using ephemeral ports, the caller should retrieve the actual assigned port using the ZMQ_LAST_ENDPOINT socket option. See linkzmq:zmq_getsockopt[3] for details. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a socket to a peer address using _zmq_connect()_ with the 'tcp' transport, the 'endpoint' shall be interpreted as a 'peer address' followed by a colon and the TCP port number to use. A 'peer address' may be specified by either of the following: * The DNS name of the peer. * The IPv4 or IPv6 address of the peer, in its numeric representation. Note: A description of the ZeroMQ Message Transport Protocol (ZMTP) which is used by the TCP transport can be found at EXAMPLES -------- .Assigning a local address to a socket ---- // TCP port 5555 on all available interfaces rc = zmq_bind(socket, "tcp:/// :5555"); assert (rc == 0); // TCP port 5555 on the local loop-back interface on all platforms rc = zmq_bind(socket, "tcp://127.0.0.1:5555"); assert (rc == 0); // TCP port 5555 on the first Ethernet network interface on Linux rc = zmq_bind(socket, "tcp://eth0:5555"); assert (rc == 0); ---- .Connecting a socket ---- // Connecting using an IP address rc = zmq_connect(socket, "tcp://192.168.1.1:5555"); assert (rc == 0); // Connecting using a DNS name rc = zmq_connect(socket, "tcp://server1:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_pgm[7] linkzmq:zmq_ipc[7] linkzmq:zmq_inproc[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_send_const.txt0000644000175000017500000000641412240736636020305 0ustar ghedoghedozmq_send_const(3) ================= NAME ---- zmq_send_const - send a constant-memory message part on a socket SYNOPSIS -------- *int zmq_send_const (void '*socket', void '*buf', size_t 'len', int 'flags');* DESCRIPTION ----------- The _zmq_send_const()_ function shall queue a message created from the buffer referenced by the 'buf' and 'len' arguments. The message buffer is assumed to be constant-memory and will therefore not be copied or deallocated in any way. The 'flags' argument is a combination of the flags defined below: *ZMQ_DONTWAIT*:: For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high-water mark), specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the 'socket', the _zmq_send_const()_ function shall fail with 'errno' set to EAGAIN. *ZMQ_SNDMORE*:: Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description. NOTE: A successful invocation of _zmq_send_const()_ does not indicate that the message has been transmitted to the network, only that it has been queued on the 'socket' and 0MQ has assumed responsibility for the message. Multi-part messages ~~~~~~~~~~~~~~~~~~~ A 0MQ message is composed of 1 or more message parts. 0MQ ensures atomic delivery of messages: peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except by available memory. An application that sends multi-part messages must use the _ZMQ_SNDMORE_ flag when sending each message part except the final one. RETURN VALUE ------------ The _zmq_send_const()_ function shall return number of bytes in the message if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EAGAIN*:: Non-blocking mode was requested and the message cannot be sent at the moment. *ENOTSUP*:: The _zmq_send_const()_ operation is not supported by this socket type. *EFSM*:: The _zmq_send_const()_ operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal before the message was sent. *EHOSTUNREACH*:: The message cannot be routed. EXAMPLE ------- .Sending a multi-part message ---- /* Send a multi-part message consisting of three parts to socket */ rc = zmq_send_const (socket, "ABC", 3, ZMQ_SNDMORE); assert (rc == 3); rc = zmq_send_const (socket, "DEFGH", 5, ZMQ_SNDMORE); assert (rc == 5); /* Final part; no more parts to follow */ rc = zmq_send_const (socket, "JK", 2, 0); assert (rc == 2); ---- SEE ALSO -------- linkzmq:zmq_send[3] linkzmq:zmq_recv[3] linkzmq:zmq_socket[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_z85_encode.html0000644000175000017500000004444712307431371020236 0ustar ghedoghedo zmq_z85_encode(3)

SYNOPSIS

char *zmq_z85_encode (char *dest, uint8_t *data, size_t size);

DESCRIPTION

The zmq_z85_encode() function shall encode the binary block specified by data and size into a string in dest. The size of the binary block must be divisible by 4. The dest must have sufficient space for size * 1.25 plus 1 for a null terminator. A 32-byte CURVE key is encoded as 40 ASCII characters plus a null terminator.

The encoding shall follow the ZMQ RFC 32 specification.

RETURN VALUE

The zmq_z85_encode() function shall return dest if successful, else it shall return NULL.

EXAMPLE

Encoding a CURVE key
#include <sodium.h>
uint8_t public_key [32];
uint8_t secret_key [32];
int rc = crypto_box_keypair (public_key, secret_key);
assert (rc == 0);
char encoded [41];
zmq_z85_encode (encoded, public_key, 32);
puts (encoded);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_version.30000644000175000017500000000453712307431307017151 0ustar ghedoghedo'\" t .\" Title: zmq_version .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_VERSION" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_version \- report 0MQ library version .SH "SYNOPSIS" .sp \fBvoid zmq_version (int \fR\fB\fI*major\fR\fR\fB, int \fR\fB\fI*minor\fR\fR\fB, int \fR\fB\fI*patch\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_version()\fR function shall fill in the integer variables pointed to by the \fImajor\fR, \fIminor\fR and \fIpatch\fR arguments with the major, minor and patch level components of the 0MQ library version\&. .sp This functionality is intended for applications or language bindings dynamically linking to the 0MQ library that wish to determine the actual version of the 0MQ library they are using\&. .SH "RETURN VALUE" .sp There is no return value\&. .SH "ERRORS" .sp No errors are defined\&. .SH "EXAMPLE" .PP \fBPrinting out the version of the 0MQ library\fR. .sp .if n \{\ .RS 4 .\} .nf int major, minor, patch; zmq_version (&major, &minor, &patch); printf ("Current 0MQ version is %d\&.%d\&.%d\en", major, minor, patch); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_term.30000644000175000017500000000651412307431223017303 0ustar ghedoghedo'\" t .\" Title: zmq_ctx_term .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CTX_TERM" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_ctx_term \- destroy a 0MQ context .SH "SYNOPSIS" .sp \fBint zmq_ctx_term (void \fR\fB\fI*context\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_ctx_term()\fR function shall destroy the 0MQ context \fIcontext\fR\&. .sp Context termination is performed in the following steps: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Any blocking operations currently in progress on sockets open within \fIcontext\fR shall return immediately with an error code of ETERM\&. With the exception of \fIzmq_close()\fR, any further operations on sockets open within \fIcontext\fR shall fail with an error code of ETERM\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} After interrupting all blocking calls, \fIzmq_ctx_term()\fR shall \fIblock\fR until the following conditions are satisfied: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} All sockets open within \fIcontext\fR have been closed with \fIzmq_close()\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} For each socket within \fIcontext\fR, all messages sent by the application with \fIzmq_send()\fR have either been physically transferred to a network peer, or the socket\(cqs linger period set with the \fIZMQ_LINGER\fR socket option has expired\&. .RE .RE .sp For further details regarding socket linger behavior refer to the \fIZMQ_LINGER\fR option in \fBzmq_setsockopt\fR(3)\&. .sp This function replaces the deprecated function \fBzmq_term\fR(3)\&. .SH "RETURN VALUE" .sp The \fIzmq_ctx_term()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 The provided \fIcontext\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 Termination was interrupted by a signal\&. It can be restarted if needed\&. .RE .SH "SEE ALSO" .sp \fBzmq\fR(7) \fBzmq_init\fR(3) \fBzmq_close\fR(3) \fBzmq_setsockopt\fR(3) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_version.html0000644000175000017500000004424412307431366017757 0ustar ghedoghedo zmq_version(3)

SYNOPSIS

void zmq_version (int *major, int *minor, int *patch);

DESCRIPTION

The zmq_version() function shall fill in the integer variables pointed to by the major, minor and patch arguments with the major, minor and patch level components of the ØMQ library version.

This functionality is intended for applications or language bindings dynamically linking to the ØMQ library that wish to determine the actual version of the ØMQ library they are using.

RETURN VALUE

There is no return value.

ERRORS

No errors are defined.

EXAMPLE

Printing out the version of the ØMQ library
int major, minor, patch;
zmq_version (&major, &minor, &patch);
printf ("Current 0MQ version is %d.%d.%d\n", major, minor, patch);

SEE ALSO

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_inproc.70000644000175000017500000000765212307431334016763 0ustar ghedoghedo'\" t .\" Title: zmq_inproc .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_INPROC" "7" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_inproc \- 0MQ local in\-process (inter\-thread) communication transport .SH "SYNOPSIS" .sp The in\-process transport passes messages via memory directly between threads sharing a single 0MQ \fIcontext\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp No I/O threads are involved in passing messages using the \fIinproc\fR transport\&. Therefore, if you are using a 0MQ \fIcontext\fR for in\-process messaging only you can initialise the \fIcontext\fR with zero I/O threads\&. See \fBzmq_init\fR(3) for details\&. .sp .5v .RE .SH "ADDRESSING" .sp A 0MQ endpoint is a string consisting of a \fItransport\fR:// followed by an \fIaddress\fR\&. The \fItransport\fR specifies the underlying protocol to use\&. The \fIaddress\fR specifies the transport\-specific address to connect to\&. .sp For the in\-process transport, the transport is inproc, and the meaning of the \fIaddress\fR part is defined below\&. .SS "Assigning a local address to a socket" .sp When assigning a local address to a \fIsocket\fR using \fIzmq_bind()\fR with the \fIinproc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIname\fR to create\&. The \fIname\fR must be unique within the 0MQ \fIcontext\fR associated with the \fIsocket\fR and may be up to 256 characters in length\&. No other restrictions are placed on the format of the \fIname\fR\&. .SS "Connecting a socket" .sp When connecting a \fIsocket\fR to a peer address using \fIzmq_connect()\fR with the \fIinproc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIname\fR to connect to\&. The \fIname\fR must have been previously created by assigning it to at least one \fIsocket\fR within the same 0MQ \fIcontext\fR as the \fIsocket\fR being connected\&. .SH "EXAMPLES" .PP \fBAssigning a local address to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // Assign the in\-process name "#1" rc = zmq_bind(socket, "inproc://#1"); assert (rc == 0); // Assign the in\-process name "my\-endpoint" rc = zmq_bind(socket, "inproc://my\-endpoint"); assert (rc == 0); .fi .if n \{\ .RE .\} .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf // Connect to the in\-process name "#1" rc = zmq_connect(socket, "inproc://#1"); assert (rc == 0); // Connect to the in\-process name "my\-endpoint" rc = zmq_connect(socket, "inproc://my\-endpoint"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_ipc\fR(7) \fBzmq_tcp\fR(7) \fBzmq_pgm\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_poll.30000644000175000017500000001414612307431302016422 0ustar ghedoghedo'\" t .\" Title: zmq_poll .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_POLL" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_poll \- input/output multiplexing .SH "SYNOPSIS" .sp \fBint zmq_poll (zmq_pollitem_t \fR\fB\fI*items\fR\fR\fB, int \fR\fB\fInitems\fR\fR\fB, long \fR\fB\fItimeout\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_poll()\fR function provides a mechanism for applications to multiplex input/output events in a level\-triggered fashion over a set of sockets\&. Each member of the array pointed to by the \fIitems\fR argument is a \fBzmq_pollitem_t\fR structure\&. The \fInitems\fR argument specifies the number of items in the \fIitems\fR array\&. The \fBzmq_pollitem_t\fR structure is defined as follows: .sp .if n \{\ .RS 4 .\} .nf typedef struct { void \fI*socket\fR; int \fIfd\fR; short \fIevents\fR; short \fIrevents\fR; } zmq_pollitem_t; .fi .if n \{\ .RE .\} .sp For each \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall examine either the 0MQ socket referenced by \fIsocket\fR \fBor\fR the standard socket specified by the file descriptor \fIfd\fR, for the event(s) specified in \fIevents\fR\&. If both \fIsocket\fR and \fIfd\fR are set in a single \fBzmq_pollitem_t\fR, the 0MQ socket referenced by \fIsocket\fR shall take precedence and the value of \fIfd\fR shall be ignored\&. .sp For each \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall first clear the \fIrevents\fR member, and then indicate any requested events that have occurred by setting the bit corresponding to the event condition in the \fIrevents\fR member\&. .sp If none of the requested events have occurred on any \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall wait \fItimeout\fR milliseconds for an event to occur on any of the requested items\&. If the value of \fItimeout\fR is 0, \fIzmq_poll()\fR shall return immediately\&. If the value of \fItimeout\fR is \-1, \fIzmq_poll()\fR shall block indefinitely until a requested event has occurred on at least one \fBzmq_pollitem_t\fR\&. .sp The \fIevents\fR and \fIrevents\fR members of \fBzmq_pollitem_t\fR are bit masks constructed by OR\(cqing a combination of the following event flags: .PP \fBZMQ_POLLIN\fR .RS 4 For 0MQ sockets, at least one message may be received from the \fIsocket\fR without blocking\&. For standard sockets this is equivalent to the \fIPOLLIN\fR flag of the \fIpoll()\fR system call and generally means that at least one byte of data may be read from \fIfd\fR without blocking\&. .RE .PP \fBZMQ_POLLOUT\fR .RS 4 For 0MQ sockets, at least one message may be sent to the \fIsocket\fR without blocking\&. For standard sockets this is equivalent to the \fIPOLLOUT\fR flag of the \fIpoll()\fR system call and generally means that at least one byte of data may be written to \fIfd\fR without blocking\&. .RE .PP \fBZMQ_POLLERR\fR .RS 4 For standard sockets, this flag is passed through \fIzmq_poll()\fR to the underlying \fIpoll()\fR system call and generally means that some sort of error condition is present on the socket specified by \fIfd\fR\&. For 0MQ sockets this flag has no effect if set in \fIevents\fR, and shall never be returned in \fIrevents\fR by \fIzmq_poll()\fR\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The \fIzmq_poll()\fR function may be implemented or emulated using operating system interfaces other than \fIpoll()\fR, and as such may be subject to the limits of those interfaces in ways not defined in this documentation\&. .sp .5v .RE .SH "RETURN VALUE" .sp Upon successful completion, the \fIzmq_poll()\fR function shall return the number of \fBzmq_pollitem_t\fR structures with events signaled in \fIrevents\fR or 0 if no events have been signaled\&. Upon failure, \fIzmq_poll()\fR shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBETERM\fR .RS 4 At least one of the members of the \fIitems\fR array refers to a \fIsocket\fR whose associated 0MQ \fIcontext\fR was terminated\&. .RE .PP \fBEFAULT\fR .RS 4 The provided \fIitems\fR was not valid (NULL)\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before any events were available\&. .RE .SH "EXAMPLE" .PP \fBPolling indefinitely for input events on both a 0MQ socket and a standard socket.\fR. .sp .if n \{\ .RS 4 .\} .nf zmq_pollitem_t items [2]; /* First item refers to 0MQ socket \*(Aqsocket\*(Aq */ items[0]\&.socket = socket; items[0]\&.events = ZMQ_POLLIN; /* Second item refers to standard socket \*(Aqfd\*(Aq */ items[1]\&.socket = NULL; items[1]\&.fd = fd; items[1]\&.events = ZMQ_POLLIN; /* Poll for events indefinitely */ int rc = zmq_poll (items, 2, \-1); assert (rc >= 0); /* Returned events will be stored in items[]\&.revents */ .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_socket\fR(3) \fBzmq_send\fR(3) \fBzmq_recv\fR(3) \fBzmq\fR(7) .sp Your operating system documentation for the \fIpoll()\fR system call\&. .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_destroy.30000644000175000017500000000652712307431225020033 0ustar ghedoghedo'\" t .\" Title: zmq_ctx_destroy .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CTX_DESTROY" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_ctx_destroy \- terminate a 0MQ context .SH "SYNOPSIS" .sp \fBint zmq_ctx_destroy (void \fR\fB\fI*context\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_ctx_destroy()\fR function shall destroy the 0MQ context \fIcontext\fR\&. .sp Context termination is performed in the following steps: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Any blocking operations currently in progress on sockets open within \fIcontext\fR shall return immediately with an error code of ETERM\&. With the exception of \fIzmq_close()\fR, any further operations on sockets open within \fIcontext\fR shall fail with an error code of ETERM\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} After interrupting all blocking calls, \fIzmq_ctx_destroy()\fR shall \fIblock\fR until the following conditions are satisfied: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} All sockets open within \fIcontext\fR have been closed with \fIzmq_close()\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} For each socket within \fIcontext\fR, all messages sent by the application with \fIzmq_send()\fR have either been physically transferred to a network peer, or the socket\(cqs linger period set with the \fIZMQ_LINGER\fR socket option has expired\&. .RE .RE .sp For further details regarding socket linger behavior refer to the \fIZMQ_LINGER\fR option in \fBzmq_setsockopt\fR(3)\&. .sp This function is deprecated by \fBzmq_ctx_term\fR(3)\&. .SH "RETURN VALUE" .sp The \fIzmq_ctx_destroy()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 The provided \fIcontext\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 Termination was interrupted by a signal\&. It can be restarted if needed\&. .RE .SH "SEE ALSO" .sp \fBzmq\fR(7) \fBzmq_init\fR(3) \fBzmq_close\fR(3) \fBzmq_setsockopt\fR(3) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_close.30000644000175000017500000000534012307431247017433 0ustar ghedoghedo'\" t .\" Title: zmq_msg_close .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_CLOSE" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_close \- release 0MQ message .SH "SYNOPSIS" .sp \fBint zmq_msg_close (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_close()\fR function shall inform the 0MQ infrastructure that any resources associated with the message object referenced by \fImsg\fR are no longer required and may be released\&. Actual release of resources associated with the message object shall be postponed by 0MQ until all users of the message or underlying data buffer have indicated it is no longer required\&. .sp Applications should ensure that \fIzmq_msg_close()\fR is called once a message is no longer required, otherwise memory leaks may occur\&. Note that this is NOT necessary after a successful \fIzmq_msg_send()\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_close()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 Invalid message\&. .RE .SH "SEE ALSO" .sp \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_get.30000644000175000017500000000553412307431261017106 0ustar ghedoghedo'\" t .\" Title: zmq_msg_get .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_GET" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_get \- get message property .SH "SYNOPSIS" .sp \fBint zmq_msg_get (zmq_msg_t \fR\fB\fI*message\fR\fR\fB, int \fR\fB\fIproperty\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_get()\fR function shall return the value for the property specified by the \fIproperty\fR argument for the message pointed to by the \fImessage\fR argument\&. .sp The following properties can be retrieved with the \fIzmq_msg_get()\fR function: .PP \fBZMQ_MORE\fR .RS 4 Indicates that there are more message frames to follow after the \fImessage\fR\&. .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_get()\fR function shall return the value for the property if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested \fIproperty\fR is unknown\&. .RE .SH "EXAMPLE" .PP \fBReceiving a multi-frame message\fR. .sp .if n \{\ .RS 4 .\} .nf zmq_msg_t frame; while (true) { // Create an empty 0MQ message to hold the message frame int rc = zmq_msg_init (&frame); assert (rc == 0); // Block until a message is available to be received from socket rc = zmq_msg_recv (socket, &frame, 0); assert (rc != \-1); if (zmq_msg_get (&frame, ZMQ_MORE)) fprintf (stderr, "more\en"); else { fprintf (stderr, "end\en"); break; } zmq_msg_close (&frame); } .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_msg_set\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_proxy.txt0000644000175000017500000000602412240736636017324 0ustar ghedoghedozmq_proxy(3) ============ NAME ---- zmq_proxy - start built-in 0MQ proxy SYNOPSIS -------- *int zmq_proxy (const void '*frontend', const void '*backend', const void '*capture');* DESCRIPTION ----------- The _zmq_proxy()_ function starts the built-in 0MQ proxy in the current application thread. The proxy connects a frontend socket to a backend socket. Conceptually, data flows from frontend to backend. Depending on the socket types, replies may flow in the opposite direction. The direction is conceptual only; the proxy is fully symmetric and there is no technical difference between frontend and backend. Before calling _zmq_proxy()_ you must set any socket options, and connect or bind both frontend and backend sockets. The two conventional proxy models are: _zmq_proxy()_ runs in the current thread and returns only if/when the current context is closed. If the capture socket is not NULL, the proxy shall send all messages, received on both frontend and backend, to the capture socket. The capture socket should be a 'ZMQ_PUB', 'ZMQ_DEALER', 'ZMQ_PUSH', or 'ZMQ_PAIR' socket. Refer to linkzmq:zmq_socket[3] for a description of the available socket types. EXAMPLE USAGE ------------- Shared Queue ~~~~~~~~~~~~ When the frontend is a ZMQ_ROUTER socket, and the backend is a ZMQ_DEALER socket, the proxy shall act as a shared queue that collects requests from a set of clients, and distributes these fairly among a set of services. Requests shall be fair-queued from frontend connections and distributed evenly across backend connections. Replies shall automatically return to the client that made the original request. Forwarder ~~~~~~~~~ When the frontend is a ZMQ_XSUB socket, and the backend is a ZMQ_XPUB socket, the proxy shall act as a message forwarder that collects messages from a set of publishers and forwards these to a set of subscribers. This may be used to bridge networks transports, e.g. read on tcp:// and forward on pgm://. Streamer ~~~~~~~~ When the frontend is a ZMQ_PULL socket, and the backend is a ZMQ_PUSH socket, the proxy shall collect tasks from a set of clients and forwards these to a set of workers using the pipeline pattern. RETURN VALUE ------------ The _zmq_proxy()_ function always returns `-1` and 'errno' set to *ETERM* (the 0MQ 'context' associated with either of the specified sockets was terminated). EXAMPLE ------- .Creating a shared queue proxy ---- // Create frontend and backend sockets void *frontend = zmq_socket (context, ZMQ_ROUTER); assert (backend); void *backend = zmq_socket (context, ZMQ_DEALER); assert (frontend); // Bind both sockets to TCP ports assert (zmq_bind (frontend, "tcp://*:5555") == 0); assert (zmq_bind (backend, "tcp://*:5556") == 0); // Start the queue proxy, which runs until ETERM zmq_proxy (frontend, backend, NULL); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_proxy.html0000644000175000017500000005120712307431366017450 0ustar ghedoghedo zmq_proxy(3)

SYNOPSIS

int zmq_proxy (const void *frontend, const void *backend, const void *capture);

DESCRIPTION

The zmq_proxy() function starts the built-in ØMQ proxy in the current application thread.

The proxy connects a frontend socket to a backend socket. Conceptually, data flows from frontend to backend. Depending on the socket types, replies may flow in the opposite direction. The direction is conceptual only; the proxy is fully symmetric and there is no technical difference between frontend and backend.

Before calling zmq_proxy() you must set any socket options, and connect or bind both frontend and backend sockets. The two conventional proxy models are:

zmq_proxy() runs in the current thread and returns only if/when the current context is closed.

If the capture socket is not NULL, the proxy shall send all messages, received on both frontend and backend, to the capture socket. The capture socket should be a ZMQ_PUB, ZMQ_DEALER, ZMQ_PUSH, or ZMQ_PAIR socket.

Refer to zmq_socket(3) for a description of the available socket types.

EXAMPLE USAGE

Shared Queue

When the frontend is a ZMQ_ROUTER socket, and the backend is a ZMQ_DEALER socket, the proxy shall act as a shared queue that collects requests from a set of clients, and distributes these fairly among a set of services. Requests shall be fair-queued from frontend connections and distributed evenly across backend connections. Replies shall automatically return to the client that made the original request.

Forwarder

When the frontend is a ZMQ_XSUB socket, and the backend is a ZMQ_XPUB socket, the proxy shall act as a message forwarder that collects messages from a set of publishers and forwards these to a set of subscribers. This may be used to bridge networks transports, e.g. read on tcp:// and forward on pgm://.

Streamer

When the frontend is a ZMQ_PULL socket, and the backend is a ZMQ_PUSH socket, the proxy shall collect tasks from a set of clients and forwards these to a set of workers using the pipeline pattern.

RETURN VALUE

The zmq_proxy() function always returns -1 and errno set to ETERM (the ØMQ context associated with either of the specified sockets was terminated).

EXAMPLE

Creating a shared queue proxy
//  Create frontend and backend sockets
void *frontend = zmq_socket (context, ZMQ_ROUTER);
assert (backend);
void *backend = zmq_socket (context, ZMQ_DEALER);
assert (frontend);
//  Bind both sockets to TCP ports
assert (zmq_bind (frontend, "tcp://*:5555") == 0);
assert (zmq_bind (backend, "tcp://*:5556") == 0);
//  Start the queue proxy, which runs until ETERM
zmq_proxy (frontend, backend, NULL);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_strerror.html0000644000175000017500000004420712307431365020152 0ustar ghedoghedo zmq_strerror(3)

SYNOPSIS

const char *zmq_strerror (int errnum);

DESCRIPTION

The zmq_strerror() function shall return a pointer to an error message string corresponding to the error number specified by the errnum argument. As ØMQ defines additional error numbers over and above those defined by the operating system, applications should use zmq_strerror() in preference to the standard strerror() function.

RETURN VALUE

The zmq_strerror() function shall return a pointer to an error message string.

ERRORS

No errors are defined.

EXAMPLE

Displaying an error message when a ØMQ context cannot be initialised
void *ctx = zmq_init (1, 1, 0);
if (!ctx) {
    printf ("Error occurred during zmq_init(): %s\n", zmq_strerror (errno));
    abort ();
}

SEE ALSO

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_plain.html0000644000175000017500000004314212307431376017372 0ustar ghedoghedo zmq_plain(7)

SYNOPSIS

The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality. It is intended for use on internal networks where security requirements are low. The PLAIN mechanism is defined by this document: http://rfc.zeromq.org/spec:24.

USAGE

To use PLAIN, the server shall set the ZMQ_PLAIN_SERVER option, and the client shall set the ZMQ_PLAIN_USERNAME and ZMQ_PLAIN_PASSWORD socket options. Which peer binds, and which connects, is not relevant.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_version.txt0000644000175000017500000000206112240736636017625 0ustar ghedoghedozmq_version(3) ============== NAME ---- zmq_version - report 0MQ library version SYNOPSIS -------- *void zmq_version (int '*major', int '*minor', int '*patch');* DESCRIPTION ----------- The _zmq_version()_ function shall fill in the integer variables pointed to by the 'major', 'minor' and 'patch' arguments with the major, minor and patch level components of the 0MQ library version. This functionality is intended for applications or language bindings dynamically linking to the 0MQ library that wish to determine the actual version of the 0MQ library they are using. RETURN VALUE ------------ There is no return value. ERRORS ------ No errors are defined. EXAMPLE ------- .Printing out the version of the 0MQ library ---- int major, minor, patch; zmq_version (&major, &minor, &patch); printf ("Current 0MQ version is %d.%d.%d\n", major, minor, patch); ---- SEE ALSO -------- linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_epgm.txt0000644000175000017500000001257512240736636017103 0ustar ghedoghedozmq_pgm(7) ========== NAME ---- zmq_pgm - 0MQ reliable multicast transport using PGM SYNOPSIS -------- PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks. DESCRIPTION ----------- 0MQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the 'pgm' transport) and "Encapsulated PGM" or EPGM where PGM datagrams are encapsulated inside UDP datagrams (the 'epgm' transport). The 'pgm' and 'epgm' transports can only be used with the 'ZMQ_PUB' and 'ZMQ_SUB' socket types. Further, PGM sockets are rate limited by default. For details, refer to the 'ZMQ_RATE', and 'ZMQ_RECOVERY_IVL' options documented in linkzmq:zmq_setsockopt[3]. CAUTION: The 'pgm' transport implementation requires access to raw IP sockets. Additional privileges may be required on some operating systems for this operation. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the 'epgm' transport instead which does not require any special privileges. ADDRESSING ---------- A 0MQ endpoint is a string consisting of a 'transport'`://` followed by an 'address'. The 'transport' specifies the underlying protocol to use. The 'address' specifies the transport-specific address to connect to. For the PGM transport, the transport is `pgm`, and for the EPGM protocol the transport is `epgm`. The meaning of the 'address' part is defined below. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a socket to a peer address using _zmq_connect()_ with the 'pgm' or 'epgm' transport, the 'endpoint' shall be interpreted as an 'interface' followed by a semicolon, followed by a 'multicast address', followed by a colon and a port number. An 'interface' may be specified by either of the following: * The interface name as defined by the operating system. * The primary IPv4 address assigned to the interface, in its numeric representation. NOTE: Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an 'interface'. The 'interface' part can be omitted, in that case the default one will be selected. A 'multicast address' is specified by an IPv4 multicast address in its numeric representation. WIRE FORMAT ----------- Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams. This stream of data consists of 0MQ messages encapsulated in 'frames' as described in linkzmq:zmq_tcp[7]. PGM datagram payload ~~~~~~~~~~~~~~~~~~~~ The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ: .... datagram = (offset data) offset = 2OCTET data = *OCTET .... In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message 'frame' in the datagram or containing the value `0xFFFF` if the datagram contains solely an intermediate part of a larger message. Note that offset specifies where the first message begins rather than the first message part. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet. The following diagram illustrates the layout of a single PGM datagram payload: .... +------------------+----------------------+ | offset (16 bits) | data | +------------------+----------------------+ .... The following diagram further illustrates how three example 0MQ frames are laid out in consecutive PGM datagram payloads: .... First datagram payload +--------------+-------------+---------------------+ | Frame offset | Frame 1 | Frame 2, part 1 | | 0x0000 | (Message 1) | (Message 2, part 1) | +--------------+-------------+---------------------+ Second datagram payload +--------------+---------------------+ | Frame offset | Frame 2, part 2 | | 0xFFFF | (Message 2, part 2) | +--------------+---------------------+ Third datagram payload +--------------+----------------------------+-------------+ | Frame offset | Frame 2, final 8 bytes | Frame 3 | | 0x0008 | (Message 2, final 8 bytes) | (Message 3) | +--------------+----------------------------+-------------+ .... EXAMPLE ------- .Connecting a socket ---- // Connecting to the multicast address 239.192.1.1, port 5555, // using the first Ethernet network interface on Linux // and the Encapsulated PGM protocol rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555"); assert (rc == 0); // Connecting to the multicast address 239.192.1.1, port 5555, // using the network interface with the address 192.168.1.1 // and the standard PGM protocol rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_connect[3] linkzmq:zmq_setsockopt[3] linkzmq:zmq_tcp[7] linkzmq:zmq_ipc[7] linkzmq:zmq_inproc[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_term.txt0000644000175000017500000000334012240736636017110 0ustar ghedoghedozmq_term(3) =========== NAME ---- zmq_term - terminate 0MQ context SYNOPSIS -------- *int zmq_term (void '*context');* DESCRIPTION ----------- The _zmq_term()_ function shall terminate the 0MQ context 'context'. Context termination is performed in the following steps: 1. Any blocking operations currently in progress on sockets open within 'context' shall return immediately with an error code of ETERM. With the exception of _zmq_close()_, any further operations on sockets open within 'context' shall fail with an error code of ETERM. 2. After interrupting all blocking calls, _zmq_term()_ shall _block_ until the following conditions are satisfied: * All sockets open within 'context' have been closed with _zmq_close()_. * For each socket within 'context', all messages sent by the application with _zmq_send()_ have either been physically transferred to a network peer, or the socket's linger period set with the _ZMQ_LINGER_ socket option has expired. For further details regarding socket linger behaviour refer to the _ZMQ_LINGER_ option in linkzmq:zmq_setsockopt[3]. This function is deprecated by linkzmq:zmq_ctx_term[3]. RETURN VALUE ------------ The _zmq_term()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: The provided 'context' was invalid. *EINTR*:: Termination was interrupted by a signal. It can be restarted if needed. SEE ALSO -------- linkzmq:zmq[7] linkzmq:zmq_init[3] linkzmq:zmq_close[3] linkzmq:zmq_setsockopt[3] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_z85_encode.30000644000175000017500000000476512307431321017426 0ustar ghedoghedo'\" t .\" Title: zmq_z85_encode .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_Z85_ENCODE" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_z85_encode \- encode a binary key as Z85 printable text .SH "SYNOPSIS" .sp \fBchar *zmq_z85_encode (char *dest, uint8_t *data, size_t size);\fR .SH "DESCRIPTION" .sp The \fIzmq_z85_encode()\fR function shall encode the binary block specified by \fIdata\fR and \fIsize\fR into a string in \fIdest\fR\&. The size of the binary block must be divisible by 4\&. The \fIdest\fR must have sufficient space for size * 1\&.25 plus 1 for a null terminator\&. A 32\-byte CURVE key is encoded as 40 ASCII characters plus a null terminator\&. .sp The encoding shall follow the ZMQ RFC 32 specification\&. .SH "RETURN VALUE" .sp The \fIzmq_z85_encode()\fR function shall return \fIdest\fR if successful, else it shall return NULL\&. .SH "EXAMPLE" .PP \fBEncoding a CURVE key\fR. .sp .if n \{\ .RS 4 .\} .nf #include uint8_t public_key [32]; uint8_t secret_key [32]; int rc = crypto_box_keypair (public_key, secret_key); assert (rc == 0); char encoded [41]; zmq_z85_encode (encoded, public_key, 32); puts (encoded); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_z85_decode\fR(3) \fBzmq_curve_keypair\fR(3) \fBzmq_curve\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_null.70000644000175000017500000000326212307431337016437 0ustar ghedoghedo'\" t .\" Title: zmq_null .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_NULL" "7" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_null \- no security or confidentiality .SH "SYNOPSIS" .sp The NULL mechanism is defined by the ZMTP 3\&.0 specification: \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:23\fR\m[]\&. This is the default security mechanism for ZeroMQ sockets\&. .SH "SEE ALSO" .sp \fBzmq_plain\fR(7) \fBzmq_curve\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_disconnect.txt0000644000175000017500000000277312240736636020303 0ustar ghedoghedozmq_disconnect(3) ================= NAME ---- zmq_disconnect - Disconnect a socket SYNOPSIS -------- int zmq_disconnect (void '*socket', const char '*endpoint'); DESCRIPTION ----------- The _zmq_disconnect()_ function shall disconnect a socket specified by the 'socket' argument from the endpoint specified by the 'endpoint' argument. The 'endpoint' argument is as described in linkzmq:zmq_connect[3] RETURN VALUE ------------ The _zmq_disconnect()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The endpoint supplied is invalid. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *ENOENT*:: The provided endpoint is not connected. EXAMPLE ------- .Connecting a subscriber socket to an in-process and a TCP transport ---- /* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); /* Connect it to the host server001, port 5555 using a TCP transport */ rc = zmq_connect (socket, "tcp://server001:5555"); assert (rc == 0); /* Disconnect from the previously connected endpoint */ rc = zmq_disconnect (socket, "tcp://server001:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_connect[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_proxy.30000644000175000017500000001055512307431311016635 0ustar ghedoghedo'\" t .\" Title: zmq_proxy .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_PROXY" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_proxy \- start built\-in 0MQ proxy .SH "SYNOPSIS" .sp \fBint zmq_proxy (const void \fR\fB\fI*frontend\fR\fR\fB, const void \fR\fB\fI*backend\fR\fR\fB, const void \fR\fB\fI*capture\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_proxy()\fR function starts the built\-in 0MQ proxy in the current application thread\&. .sp The proxy connects a frontend socket to a backend socket\&. Conceptually, data flows from frontend to backend\&. Depending on the socket types, replies may flow in the opposite direction\&. The direction is conceptual only; the proxy is fully symmetric and there is no technical difference between frontend and backend\&. .sp Before calling \fIzmq_proxy()\fR you must set any socket options, and connect or bind both frontend and backend sockets\&. The two conventional proxy models are: .sp \fIzmq_proxy()\fR runs in the current thread and returns only if/when the current context is closed\&. .sp If the capture socket is not NULL, the proxy shall send all messages, received on both frontend and backend, to the capture socket\&. The capture socket should be a \fIZMQ_PUB\fR, \fIZMQ_DEALER\fR, \fIZMQ_PUSH\fR, or \fIZMQ_PAIR\fR socket\&. .sp Refer to \fBzmq_socket\fR(3) for a description of the available socket types\&. .SH "EXAMPLE USAGE" .SS "Shared Queue" .sp When the frontend is a ZMQ_ROUTER socket, and the backend is a ZMQ_DEALER socket, the proxy shall act as a shared queue that collects requests from a set of clients, and distributes these fairly among a set of services\&. Requests shall be fair\-queued from frontend connections and distributed evenly across backend connections\&. Replies shall automatically return to the client that made the original request\&. .SS "Forwarder" .sp When the frontend is a ZMQ_XSUB socket, and the backend is a ZMQ_XPUB socket, the proxy shall act as a message forwarder that collects messages from a set of publishers and forwards these to a set of subscribers\&. This may be used to bridge networks transports, e\&.g\&. read on tcp:// and forward on pgm://\&. .SS "Streamer" .sp When the frontend is a ZMQ_PULL socket, and the backend is a ZMQ_PUSH socket, the proxy shall collect tasks from a set of clients and forwards these to a set of workers using the pipeline pattern\&. .SH "RETURN VALUE" .sp The \fIzmq_proxy()\fR function always returns \-1 and \fIerrno\fR set to \fBETERM\fR (the 0MQ \fIcontext\fR associated with either of the specified sockets was terminated)\&. .SH "EXAMPLE" .PP \fBCreating a shared queue proxy\fR. .sp .if n \{\ .RS 4 .\} .nf // Create frontend and backend sockets void *frontend = zmq_socket (context, ZMQ_ROUTER); assert (backend); void *backend = zmq_socket (context, ZMQ_DEALER); assert (frontend); // Bind both sockets to TCP ports assert (zmq_bind (frontend, "tcp://*:5555") == 0); assert (zmq_bind (backend, "tcp://*:5556") == 0); // Start the queue proxy, which runs until ETERM zmq_proxy (frontend, backend, NULL); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_size.txt0000644000175000017500000000161612240736636017765 0ustar ghedoghedozmq_msg_size(3) =============== NAME ---- zmq_msg_size - retrieve message content size in bytes SYNOPSIS -------- *size_t zmq_msg_size (zmq_msg_t '*msg');* DESCRIPTION ----------- The _zmq_msg_size()_ function shall return the size in bytes of the content of the message object referenced by 'msg'. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ Upon successful completion, _zmq_msg_size()_ shall return the size of the message content in bytes. ERRORS ------ No errors are defined. SEE ALSO -------- linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_epgm.html0000644000175000017500000005755512307431374017232 0ustar ghedoghedo zmq_pgm(7)

SYNOPSIS

PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks.

DESCRIPTION

ØMQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the pgm transport) and "Encapsulated PGM" or EPGM where PGM datagrams are encapsulated inside UDP datagrams (the epgm transport).

The pgm and epgm transports can only be used with the ZMQ_PUB and ZMQ_SUB socket types.

Further, PGM sockets are rate limited by default. For details, refer to the ZMQ_RATE, and ZMQ_RECOVERY_IVL options documented in zmq_setsockopt(3).

Caution
The pgm transport implementation requires access to raw IP sockets. Additional privileges may be required on some operating systems for this operation. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the epgm transport instead which does not require any special privileges.

ADDRESSING

A ØMQ endpoint is a string consisting of a transport:// followed by an address. The transport specifies the underlying protocol to use. The address specifies the transport-specific address to connect to.

For the PGM transport, the transport is pgm, and for the EPGM protocol the transport is epgm. The meaning of the address part is defined below.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the pgm or epgm transport, the endpoint shall be interpreted as an interface followed by a semicolon, followed by a multicast address, followed by a colon and a port number.

An interface may be specified by either of the following:

  • The interface name as defined by the operating system.

  • The primary IPv4 address assigned to the interface, in its numeric representation.

Note
Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an interface. The interface part can be omitted, in that case the default one will be selected.

A multicast address is specified by an IPv4 multicast address in its numeric representation.

WIRE FORMAT

Consecutive PGM datagrams are interpreted by ØMQ as a single continuous stream of data where ØMQ messages are not necessarily aligned with PGM datagram boundaries and a single ØMQ message may span several PGM datagrams. This stream of data consists of ØMQ messages encapsulated in frames as described in zmq_tcp(7).

PGM datagram payload

The following ABNF grammar represents the payload of a single PGM datagram as used by ØMQ:

datagram               = (offset data)
offset                 = 2OCTET
data                   = *OCTET

In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message frame in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message.

Note that offset specifies where the first message begins rather than the first message part. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet.

The following diagram illustrates the layout of a single PGM datagram payload:

+------------------+----------------------+
| offset (16 bits) |         data         |
+------------------+----------------------+

The following diagram further illustrates how three example ØMQ frames are laid out in consecutive PGM datagram payloads:

First datagram payload
+--------------+-------------+---------------------+
| Frame offset |   Frame 1   |   Frame 2, part 1   |
|    0x0000    | (Message 1) | (Message 2, part 1) |
+--------------+-------------+---------------------+

Second datagram payload
+--------------+---------------------+
| Frame offset |   Frame 2, part 2   |
| 0xFFFF       | (Message 2, part 2) |
+--------------+---------------------+

Third datagram payload
+--------------+----------------------------+-------------+
| Frame offset |   Frame 2, final 8 bytes   |   Frame 3   |
| 0x0008       | (Message 2, final 8 bytes) | (Message 3) |
+--------------+----------------------------+-------------+

EXAMPLE

Connecting a socket
//  Connecting to the multicast address 239.192.1.1, port 5555,
//  using the first Ethernet network interface on Linux
//  and the Encapsulated PGM protocol
rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555");
assert (rc == 0);
//  Connecting to the multicast address 239.192.1.1, port 5555,
//  using the network interface with the address 192.168.1.1
//  and the standard PGM protocol
rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555");
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_socket.30000644000175000017500000005421212307431276016754 0ustar ghedoghedo'\" t .\" Title: zmq_socket .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.4 .\" Language: English .\" .TH "ZMQ_SOCKET" "3" "03/10/2014" "0MQ 4\&.0\&.4" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_socket \- create 0MQ socket .SH "SYNOPSIS" .sp \fBvoid *zmq_socket (void \fR\fB\fI*context\fR\fR\fB, int \fR\fB\fItype\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_socket()\fR function shall create a 0MQ socket within the specified \fIcontext\fR and return an opaque handle to the newly created socket\&. The \fItype\fR argument specifies the socket type, which determines the semantics of communication over the socket\&. .sp The newly created socket is initially unbound, and not associated with any endpoints\&. In order to establish a message flow a socket must first be connected to at least one endpoint with \fBzmq_connect\fR(3), or at least one endpoint must be created for accepting incoming connections with \fBzmq_bind\fR(3)\&. .PP \fBKey differences to conventional sockets\fR. Generally speaking, conventional sockets present a \fIsynchronous\fR interface to either connection\-oriented reliable byte streams (SOCK_STREAM), or connection\-less unreliable datagrams (SOCK_DGRAM)\&. In comparison, 0MQ sockets present an abstraction of an asynchronous \fImessage queue\fR, with the exact queueing semantics depending on the socket type in use\&. Where conventional sockets transfer streams of bytes or discrete datagrams, 0MQ sockets transfer discrete \fImessages\fR\&. .sp 0MQ sockets being \fIasynchronous\fR means that the timings of the physical connection setup and tear down, reconnect and effective delivery are transparent to the user and organized by 0MQ itself\&. Further, messages may be \fIqueued\fR in the event that a peer is unavailable to receive them\&. .sp Conventional sockets allow only strict one\-to\-one (two peers), many\-to\-one (many clients, one server), or in some cases one\-to\-many (multicast) relationships\&. With the exception of \fIZMQ_PAIR\fR, 0MQ sockets may be connected \fBto multiple endpoints\fR using \fIzmq_connect()\fR, while simultaneously accepting incoming connections \fBfrom multiple endpoints\fR bound to the socket using \fIzmq_bind()\fR, thus allowing many\-to\-many relationships\&. .PP \fBThread safety\fR. 0MQ \fIsockets\fR are \fInot\fR thread safe\&. Applications MUST NOT use a socket from multiple threads except after migrating a socket from one thread to another with a "full fence" memory barrier\&. .PP \fBSocket types\fR. The following sections present the socket types defined by 0MQ, grouped by the general \fImessaging pattern\fR which is built from related socket types\&. .SS "Request\-reply pattern" .sp The request\-reply pattern is used for sending requests from a ZMQ_REQ \fIclient\fR to one or more ZMQ_REP \fIservices\fR, and receiving subsequent replies to each request sent\&. .sp The request\-reply pattern is formally defined by \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:28\fR\m[]\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_REQ\fR .RS 4 .sp A socket of type \fIZMQ_REQ\fR is used by a \fIclient\fR to send requests to and receive replies from a \fIservice\fR\&. This socket type allows only an alternating sequence of \fIzmq_send(request)\fR and subsequent \fIzmq_recv(reply)\fR calls\&. Each request sent is round\-robined among all \fIservices\fR, and each reply received is matched with the last issued request\&. .sp If no services are available, then any send operation on the socket shall block until at least one \fIservice\fR becomes available\&. The REQ socket shall not discard messages\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&1.\ \&Summary of ZMQ_REQ characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_REP\fR, \fIZMQ_ROUTER\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Send, Receive, Send, Receive, \&... T} T{ .sp Outgoing routing strategy T}:T{ .sp Round\-robin T} T{ .sp Incoming routing strategy T}:T{ .sp Last peer T} T{ .sp Action in mute state T}:T{ .sp Block T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_REP\fR .RS 4 .sp A socket of type \fIZMQ_REP\fR is used by a \fIservice\fR to receive requests from and send replies to a \fIclient\fR\&. This socket type allows only an alternating sequence of \fIzmq_recv(request)\fR and subsequent \fIzmq_send(reply)\fR calls\&. Each request received is fair\-queued from among all \fIclients\fR, and each reply sent is routed to the \fIclient\fR that issued the last request\&. If the original requester does not exist any more the reply is silently discarded\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&2.\ \&Summary of ZMQ_REP characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_REQ\fR, \fIZMQ_DEALER\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Receive, Send, Receive, Send, \&... T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Outgoing routing strategy T}:T{ .sp Last peer T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_DEALER\fR .RS 4 .sp A socket of type \fIZMQ_DEALER\fR is an advanced pattern used for extending request/reply sockets\&. Each message sent is round\-robined among all connected peers, and each message received is fair\-queued from all connected peers\&. .sp When a \fIZMQ_DEALER\fR socket enters the \fImute\fR state due to having reached the high water mark for all peers, or if there are no peers at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the mute state ends or at least one peer becomes available for sending; messages are not discarded\&. .sp When a \fIZMQ_DEALER\fR socket is connected to a \fIZMQ_REP\fR socket each message sent must consist of an empty message part, the \fIdelimiter\fR, followed by one or more \fIbody parts\fR\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&3.\ \&Summary of ZMQ_DEALER characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_ROUTER\fR, \fIZMQ_REP\fR, \fIZMQ_DEALER\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Unrestricted T} T{ .sp Outgoing routing strategy T}:T{ .sp Round\-robin T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Action in mute state T}:T{ .sp Block T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_ROUTER\fR .RS 4 .sp A socket of type \fIZMQ_ROUTER\fR is an advanced socket type used for extending request/reply sockets\&. When receiving messages a \fIZMQ_ROUTER\fR socket shall prepend a message part containing the \fIidentity\fR of the originating peer to the message before passing it to the application\&. Messages received are fair\-queued from among all connected peers\&. When sending messages a \fIZMQ_ROUTER\fR socket shall remove the first part of the message and use it to determine the \fIidentity\fR of the peer the message shall be routed to\&. If the peer does not exist anymore the message shall be silently discarded by default, unless \fIZMQ_ROUTER_MANDATORY\fR socket option is set to \fI1\fR\&. .sp When a \fIZMQ_ROUTER\fR socket enters the \fImute\fR state due to having reached the high water mark for all peers, then any messages sent to the socket shall be dropped until the mute state ends\&. Likewise, any messages routed to a peer for which the individual high water mark has been reached shall also be dropped\&. .sp When a \fIZMQ_REQ\fR socket is connected to a \fIZMQ_ROUTER\fR socket, in addition to the \fIidentity\fR of the originating peer each message received shall contain an empty \fIdelimiter\fR message part\&. Hence, the entire structure of each received message as seen by the application becomes: one or more \fIidentity\fR parts, \fIdelimiter\fR part, one or more \fIbody parts\fR\&. When sending replies to a \fIZMQ_REQ\fR socket the application must include the \fIdelimiter\fR part\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&4.\ \&Summary of ZMQ_ROUTER characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_DEALER\fR, \fIZMQ_REQ\fR, \fIZMQ_ROUTER\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Unrestricted T} T{ .sp Outgoing routing strategy T}:T{ .sp See text T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Action in mute state T}:T{ .sp Drop T} .TE .sp 1 .RE .SS "Publish\-subscribe pattern" .sp The publish\-subscribe pattern is used for one\-to\-many distribution of data from a single \fIpublisher\fR to multiple \fIsubscribers\fR in a fan out fashion\&. .sp The publish\-subscribe pattern is formally defined by \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:29\fR\m[]\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_PUB\fR .RS 4 .sp A socket of type \fIZMQ_PUB\fR is used by a \fIpublisher\fR to distribute data\&. Messages sent are distributed in a fan out fashion to all connected peers\&. The \fBzmq_recv\fR(3) function is not implemented for this socket type\&. .sp When a \fIZMQ_PUB\fR socket enters the \fImute\fR state due to having reached the high water mark for a \fIsubscriber\fR, then any messages that would be sent to the \fIsubscriber\fR in question shall instead be dropped until the mute state ends\&. The \fIzmq_send()\fR function shall never block for this socket type\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&5.\ \&Summary of ZMQ_PUB characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_SUB\fR, \fIZMQ_XSUB\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Send only T} T{ .sp Incoming routing strategy T}:T{ .sp N/A T} T{ .sp Outgoing routing strategy T}:T{ .sp Fan out T} T{ .sp Action in mute state T}:T{ .sp Drop T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_SUB\fR .RS 4 .sp A socket of type \fIZMQ_SUB\fR is used by a \fIsubscriber\fR to subscribe to data distributed by a \fIpublisher\fR\&. Initially a \fIZMQ_SUB\fR socket is not subscribed to any messages, use the \fIZMQ_SUBSCRIBE\fR option of \fBzmq_setsockopt\fR(3) to specify which messages to subscribe to\&. The \fIzmq_send()\fR function is not implemented for this socket type\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&6.\ \&Summary of ZMQ_SUB characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_PUB\fR, \fIZMQ_XPUB\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Receive only T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Outgoing routing strategy T}:T{ .sp N/A T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_XPUB\fR .RS 4 .sp Same as ZMQ_PUB except that you can receive subscriptions from the peers in form of incoming messages\&. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body\&. Messages without a sub/unsub prefix are also received, but have no effect on subscription status\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&7.\ \&Summary of ZMQ_XPUB characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_SUB\fR, \fIZMQ_XSUB\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Send messages, receive subscriptions T} T{ .sp Incoming routing strategy T}:T{ .sp N/A T} T{ .sp Outgoing routing strategy T}:T{ .sp Fan out T} T{ .sp Action in mute state T}:T{ .sp Drop T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_XSUB\fR .RS 4 .sp Same as ZMQ_SUB except that you subscribe by sending subscription messages to the socket\&. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body\&. Messages without a sub/unsub prefix may also be sent, but have no effect on subscription status\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&8.\ \&Summary of ZMQ_XSUB characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_PUB\fR, \fIZMQ_XPUB\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Receive messages, send subscriptions T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Outgoing routing strategy T}:T{ .sp N/A T} T{ .sp Action in mute state T}:T{ .sp Drop T} .TE .sp 1 .RE .SS "Pipeline pattern" .sp The pipeline pattern is used for distributing data to \fInodes\fR arranged in a pipeline\&. Data always flows down the pipeline, and each stage of the pipeline is connected to at least one \fInode\fR\&. When a pipeline stage is connected to multiple \fInodes\fR data is round\-robined among all connected \fInodes\fR\&. .sp The pipeline pattern is formally defined by \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:30\fR\m[]\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_PUSH\fR .RS 4 .sp A socket of type \fIZMQ_PUSH\fR is used by a pipeline \fInode\fR to send messages to downstream pipeline \fInodes\fR\&. Messages are round\-robined to all connected downstream \fInodes\fR\&. The \fIzmq_recv()\fR function is not implemented for this socket type\&. .sp When a \fIZMQ_PUSH\fR socket enters the \fImute\fR state due to having reached the high water mark for all downstream \fInodes\fR, or if there are no downstream \fInodes\fR at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the mute state ends or at least one downstream \fInode\fR becomes available for sending; messages are not discarded\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&9.\ \&Summary of ZMQ_PUSH characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_PULL\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Send only T} T{ .sp Incoming routing strategy T}:T{ .sp N/A T} T{ .sp Outgoing routing strategy T}:T{ .sp Round\-robin T} T{ .sp Action in mute state T}:T{ .sp Block T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_PULL\fR .RS 4 .sp A socket of type \fIZMQ_PULL\fR is used by a pipeline \fInode\fR to receive messages from upstream pipeline \fInodes\fR\&. Messages are fair\-queued from among all connected upstream \fInodes\fR\&. The \fIzmq_send()\fR function is not implemented for this socket type\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&10.\ \&Summary of ZMQ_PULL characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_PUSH\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Receive only T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Outgoing routing strategy T}:T{ .sp N/A T} T{ .sp Action in mute state T}:T{ .sp Block T} .TE .sp 1 .RE .SS "Exclusive pair pattern" .sp The exclusive pair pattern is used to connect a peer to precisely one other peer\&. This pattern is used for inter\-thread communication across the inproc transport\&. .sp The exclusive pair pattern is formally defined by \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:31\fR\m[]\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_PAIR\fR .RS 4 .sp A socket of type \fIZMQ_PAIR\fR can only be connected to a single peer at any one time\&. No message routing or filtering is performed on messages sent over a \fIZMQ_PAIR\fR socket\&. .sp When a \fIZMQ_PAIR\fR socket enters the \fImute\fR state due to having reached the high water mark for the connected peer, or if no peer is connected, then any \fBzmq_send\fR(3) operations on the socket shall block until the peer becomes available for sending; messages are not discarded\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp \fIZMQ_PAIR\fR sockets are designed for inter\-thread communication across the \fBzmq_inproc\fR(7) transport and do not implement functionality such as auto\-reconnection\&. \fIZMQ_PAIR\fR sockets are considered experimental and may have other missing or broken aspects\&. .sp .5v .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&11.\ \&Summary of ZMQ_PAIR characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_PAIR\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Unrestricted T} T{ .sp Incoming routing strategy T}:T{ .sp N/A T} T{ .sp Outgoing routing strategy T}:T{ .sp N/A T} T{ .sp Action in mute state T}:T{ .sp Block T} .TE .sp 1 .RE .SS "Native Pattern" .sp The native pattern is used for communicating with TCP peers and allows asynchronous requests and replies in either direction\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_STREAM\fR .RS 4 .sp A socket of type \fIZMQ_STREAM\fR is used to send and receive TCP data from a non\-0MQ peer, when using the tcp:// transport\&. A \fIZMQ_STREAM\fR socket can act as client and/or server, sending and/or receiving TCP data asynchronously\&. .sp When receiving TCP data, a \fIZMQ_STREAM\fR socket shall prepend a message part containing the \fIidentity\fR of the originating peer to the message before passing it to the application\&. Messages received are fair\-queued from among all connected peers\&. .sp When sending TCP data, a \fIZMQ_STREAM\fR socket shall remove the first part of the message and use it to determine the \fIidentity\fR of the peer the message shall be routed to, and unroutable messages shall cause an EHOSTUNREACH or EAGAIN error\&. .sp To open a connection to a server, use the zmq_connect call, and then fetch the socket identity using the ZMQ_IDENTITY zmq_getsockopt call\&. .sp To close a specific client connection, as a server, send the identity frame followed by a zero\-length message (see EXAMPLE section)\&. .sp The ZMQ_MSGMORE flag is ignored on data frames\&. You must send one identity frame followed by one data frame\&. .sp Also, please note that omitting the ZMQ_MSGMORE flag will prevent sending further data (from any client) on the same socket\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&12.\ \&Summary of ZMQ_STREAM characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp none\&. T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Unrestricted T} T{ .sp Outgoing routing strategy T}:T{ .sp See text T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Action in mute state T}:T{ .sp EAGAIN T} .TE .sp 1 .RE .SH "RETURN VALUE" .sp The \fIzmq_socket()\fR function shall return an opaque handle to the newly created socket if successful\&. Otherwise, it shall return NULL and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested socket \fItype\fR is invalid\&. .RE .PP \fBEFAULT\fR .RS 4 The provided \fIcontext\fR is invalid\&. .RE .PP \fBEMFILE\fR .RS 4 The limit on the total number of open 0MQ sockets has been reached\&. .RE .PP \fBETERM\fR .RS 4 The context specified was terminated\&. .RE .SH "EXAMPLE" .PP \fBCreating a simple HTTP server using ZMQ_STREAM\fR. .sp .if n \{\ .RS 4 .\} .nf void *ctx = zmq_ctx_new (); assert (ctx); /* Create ZMQ_STREAM socket */ void *socket = zmq_socket (ctx, ZMQ_STREAM); assert (socket); int rc = zmq_bind (socket, "tcp://*:8080"); assert (rc == 0); /* Data structure to hold the ZMQ_STREAM ID */ uint8_t id [256]; size_t id_size = 256; while (1) { /* Get HTTP request; ID frame and then request */ id_size = zmq_recv (server, id, 256, 0); assert (id_size > 0); /* Prepares the response */ char http_response [] = "HTTP/1\&.0 200 OK\er\en" "Content\-Type: text/plain\er\en" "\er\en" "Hello, World!"; /* Sends the ID frame followed by the response */ zmq_send (socket, id, id_size, ZMQ_SNDMORE); zmq_send (socket, http_response, strlen (http_response), ZMQ_SNDMORE); /* Closes the connection by sending the ID frame followed by a zero response */ zmq_send (socket, id, id_size, ZMQ_SNDMORE); zmq_send (socket, 0, 0, ZMQ_SNDMORE); /* NOTE: If we don\*(Aqt use ZMQ_SNDMORE, then we won\*(Aqt be able to send more */ /* message to any client */ } zmq_close (socket); zmq_ctx_destroy (ctx); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_init\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_send\fR(3) \fBzmq_recv\fR(3) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_poll.txt0000644000175000017500000001044612240736636017114 0ustar ghedoghedozmq_poll(3) =========== NAME ---- zmq_poll - input/output multiplexing SYNOPSIS -------- *int zmq_poll (zmq_pollitem_t '*items', int 'nitems', long 'timeout');* DESCRIPTION ----------- The _zmq_poll()_ function provides a mechanism for applications to multiplex input/output events in a level-triggered fashion over a set of sockets. Each member of the array pointed to by the 'items' argument is a *zmq_pollitem_t* structure. The 'nitems' argument specifies the number of items in the 'items' array. The *zmq_pollitem_t* structure is defined as follows: ["literal", subs="quotes"] typedef struct { void '*socket'; int 'fd'; short 'events'; short 'revents'; } zmq_pollitem_t; For each *zmq_pollitem_t* item, _zmq_poll()_ shall examine either the 0MQ socket referenced by 'socket' *or* the standard socket specified by the file descriptor 'fd', for the event(s) specified in 'events'. If both 'socket' and 'fd' are set in a single *zmq_pollitem_t*, the 0MQ socket referenced by 'socket' shall take precedence and the value of 'fd' shall be ignored. For each *zmq_pollitem_t* item, _zmq_poll()_ shall first clear the 'revents' member, and then indicate any requested events that have occurred by setting the bit corresponding to the event condition in the 'revents' member. If none of the requested events have occurred on any *zmq_pollitem_t* item, _zmq_poll()_ shall wait 'timeout' milliseconds for an event to occur on any of the requested items. If the value of 'timeout' is `0`, _zmq_poll()_ shall return immediately. If the value of 'timeout' is `-1`, _zmq_poll()_ shall block indefinitely until a requested event has occurred on at least one *zmq_pollitem_t*. The 'events' and 'revents' members of *zmq_pollitem_t* are bit masks constructed by OR'ing a combination of the following event flags: *ZMQ_POLLIN*:: For 0MQ sockets, at least one message may be received from the 'socket' without blocking. For standard sockets this is equivalent to the 'POLLIN' flag of the _poll()_ system call and generally means that at least one byte of data may be read from 'fd' without blocking. *ZMQ_POLLOUT*:: For 0MQ sockets, at least one message may be sent to the 'socket' without blocking. For standard sockets this is equivalent to the 'POLLOUT' flag of the _poll()_ system call and generally means that at least one byte of data may be written to 'fd' without blocking. *ZMQ_POLLERR*:: For standard sockets, this flag is passed through _zmq_poll()_ to the underlying _poll()_ system call and generally means that some sort of error condition is present on the socket specified by 'fd'. For 0MQ sockets this flag has no effect if set in 'events', and shall never be returned in 'revents' by _zmq_poll()_. NOTE: The _zmq_poll()_ function may be implemented or emulated using operating system interfaces other than _poll()_, and as such may be subject to the limits of those interfaces in ways not defined in this documentation. RETURN VALUE ------------ Upon successful completion, the _zmq_poll()_ function shall return the number of *zmq_pollitem_t* structures with events signaled in 'revents' or `0` if no events have been signaled. Upon failure, _zmq_poll()_ shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *ETERM*:: At least one of the members of the 'items' array refers to a 'socket' whose associated 0MQ 'context' was terminated. *EFAULT*:: The provided 'items' was not valid (NULL). *EINTR*:: The operation was interrupted by delivery of a signal before any events were available. EXAMPLE ------- .Polling indefinitely for input events on both a 0MQ socket and a standard socket. ---- zmq_pollitem_t items [2]; /* First item refers to 0MQ socket 'socket' */ items[0].socket = socket; items[0].events = ZMQ_POLLIN; /* Second item refers to standard socket 'fd' */ items[1].socket = NULL; items[1].fd = fd; items[1].events = ZMQ_POLLIN; /* Poll for events indefinitely */ int rc = zmq_poll (items, 2, -1); assert (rc >= 0); /* Returned events will be stored in items[].revents */ ---- SEE ALSO -------- linkzmq:zmq_socket[3] linkzmq:zmq_send[3] linkzmq:zmq_recv[3] linkzmq:zmq[7] Your operating system documentation for the _poll()_ system call. AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_recvmsg.txt0000644000175000017500000000710412240736636017611 0ustar ghedoghedozmq_recvmsg(3) ============== NAME ---- zmq_recvmsg - receive a message part from a socket SYNOPSIS -------- *int zmq_recvmsg (void '*socket', zmq_msg_t '*msg', int 'flags');* DESCRIPTION ----------- The _zmq_recvmsg()_ function shall receive a message part from the socket referenced by the 'socket' argument and store it in the message referenced by the 'msg' argument. Any content previously stored in 'msg' shall be properly deallocated. If there are no message parts available on the specified 'socket' the _zmq_recvmsg()_ function shall block until the request can be satisfied. The 'flags' argument is a combination of the flags defined below: *ZMQ_DONTWAIT*:: Specifies that the operation should be performed in non-blocking mode. If there are no messages available on the specified 'socket', the _zmq_recvmsg()_ function shall fail with 'errno' set to EAGAIN. NOTE: this API method is deprecated in favor of zmq_msg_recv(3). Multi-part messages ~~~~~~~~~~~~~~~~~~~ A 0MQ message is composed of 1 or more message parts. Each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages: peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except by available memory. An application that processes multi-part messages must use the _ZMQ_RCVMORE_ linkzmq:zmq_getsockopt[3] option after calling _zmq_recvmsg()_ to determine if there are further parts to receive. RETURN VALUE ------------ The _zmq_recvmsg()_ function shall return number of bytes in the message if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EAGAIN*:: Non-blocking mode was requested and no messages are available at the moment. *ENOTSUP*:: The _zmq_recvmsg()_ operation is not supported by this socket type. *EFSM*:: The _zmq_recvmsg()_ operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal before a message was available. *EFAULT*:: The message passed to the function was invalid. EXAMPLE ------- .Receiving a message from a socket ---- /* Create an empty 0MQ message */ zmq_msg_t msg; int rc = zmq_msg_init (&msg); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_recvmsg (socket, &msg, 0); assert (rc != -1); /* Release message */ zmq_msg_close (&msg); ---- .Receiving a multi-part message ---- int64_t more; size_t more_size = sizeof (more); do { /* Create an empty 0MQ message to hold the message part */ zmq_msg_t part; int rc = zmq_msg_init (&part); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_recvmsg (socket, &part, 0); assert (rc != -1); /* Determine if more message parts are to follow */ rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); zmq_msg_close (&part); } while (more); ---- SEE ALSO -------- linkzmq:zmq_recv[3] linkzmq:zmq_send[3] linkzmq:zmq_getsockopt[3] linkzmq:zmq_socket[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_recv.txt0000644000175000017500000000535012240736636017103 0ustar ghedoghedozmq_recv(3) =========== NAME ---- zmq_recv - receive a message part from a socket SYNOPSIS -------- *int zmq_recv (void '*socket', void '*buf', size_t 'len', int 'flags');* DESCRIPTION ----------- The _zmq_recv()_ function shall receive a message from the socket referenced by the 'socket' argument and store it in the buffer referenced by the 'buf' argument. Any bytes exceeding the length specified by the 'len' argument shall be truncated. If there are no messages available on the specified 'socket' the _zmq_recv()_ function shall block until the request can be satisfied. The 'flags' argument is a combination of the flags defined below: *ZMQ_DONTWAIT*:: Specifies that the operation should be performed in non-blocking mode. If there are no messages available on the specified 'socket', the _zmq_recv()_ function shall fail with 'errno' set to EAGAIN. Multi-part messages ~~~~~~~~~~~~~~~~~~~ A 0MQ message is composed of 1 or more message parts. 0MQ ensures atomic delivery of messages: peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except by available memory. An application that processes multi-part messages must use the _ZMQ_RCVMORE_ linkzmq:zmq_getsockopt[3] option after calling _zmq_recv()_ to determine if there are further parts to receive. RETURN VALUE ------------ The _zmq_recv()_ function shall return number of bytes in the message if successful. Note that the value can exceed the value of the 'len' parameter in case the message was truncated. If not successful the function shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EAGAIN*:: Non-blocking mode was requested and no messages are available at the moment. *ENOTSUP*:: The _zmq_recv()_ operation is not supported by this socket type. *EFSM*:: The _zmq_recv()_ operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal before a message was available. EXAMPLE ------- .Receiving a message from a socket ---- char buf [256]; nbytes = zmq_recv (socket, buf, 256, 0); assert (nbytes != -1); ---- SEE ALSO -------- linkzmq:zmq_send[3] linkzmq:zmq_getsockopt[3] linkzmq:zmq_socket[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_poll.html0000644000175000017500000005543512307431364017242 0ustar ghedoghedo zmq_poll(3)

SYNOPSIS

int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);

DESCRIPTION

The zmq_poll() function provides a mechanism for applications to multiplex input/output events in a level-triggered fashion over a set of sockets. Each member of the array pointed to by the items argument is a zmq_pollitem_t structure. The nitems argument specifies the number of items in the items array. The zmq_pollitem_t structure is defined as follows:

typedef struct
{
    void *socket;
    int fd;
    short events;
    short revents;
} zmq_pollitem_t;

For each zmq_pollitem_t item, zmq_poll() shall examine either the ØMQ socket referenced by socket or the standard socket specified by the file descriptor fd, for the event(s) specified in events. If both socket and fd are set in a single zmq_pollitem_t, the ØMQ socket referenced by socket shall take precedence and the value of fd shall be ignored.

For each zmq_pollitem_t item, zmq_poll() shall first clear the revents member, and then indicate any requested events that have occurred by setting the bit corresponding to the event condition in the revents member.

If none of the requested events have occurred on any zmq_pollitem_t item, zmq_poll() shall wait timeout milliseconds for an event to occur on any of the requested items. If the value of timeout is 0, zmq_poll() shall return immediately. If the value of timeout is -1, zmq_poll() shall block indefinitely until a requested event has occurred on at least one zmq_pollitem_t.

The events and revents members of zmq_pollitem_t are bit masks constructed by OR’ing a combination of the following event flags:

ZMQ_POLLIN

For ØMQ sockets, at least one message may be received from the socket without blocking. For standard sockets this is equivalent to the POLLIN flag of the poll() system call and generally means that at least one byte of data may be read from fd without blocking.

ZMQ_POLLOUT

For ØMQ sockets, at least one message may be sent to the socket without blocking. For standard sockets this is equivalent to the POLLOUT flag of the poll() system call and generally means that at least one byte of data may be written to fd without blocking.

ZMQ_POLLERR

For standard sockets, this flag is passed through zmq_poll() to the underlying poll() system call and generally means that some sort of error condition is present on the socket specified by fd. For ØMQ sockets this flag has no effect if set in events, and shall never be returned in revents by zmq_poll().

Note
The zmq_poll() function may be implemented or emulated using operating system interfaces other than poll(), and as such may be subject to the limits of those interfaces in ways not defined in this documentation.

RETURN VALUE

Upon successful completion, the zmq_poll() function shall return the number of zmq_pollitem_t structures with events signaled in revents or 0 if no events have been signaled. Upon failure, zmq_poll() shall return -1 and set errno to one of the values defined below.

ERRORS

ETERM

At least one of the members of the items array refers to a socket whose associated ØMQ context was terminated.

EFAULT

The provided items was not valid (NULL).

EINTR

The operation was interrupted by delivery of a signal before any events were available.

EXAMPLE

Polling indefinitely for input events on both a ØMQ socket and a standard socket.
zmq_pollitem_t items [2];
/* First item refers to 0MQ socket 'socket' */
items[0].socket = socket;
items[0].events = ZMQ_POLLIN;
/* Second item refers to standard socket 'fd' */
items[1].socket = NULL;
items[1].fd = fd;
items[1].events = ZMQ_POLLIN;
/* Poll for events indefinitely */
int rc = zmq_poll (items, 2, -1);
assert (rc >= 0);
/* Returned events will be stored in items[].revents */

SEE ALSO

Your operating system documentation for the poll() system call.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_init_data.html0000644000175000017500000004766112307431350021073 0ustar ghedoghedo zmq_msg_init_data(3)

SYNOPSIS

typedef void (zmq_free_fn) (void *data, void *hint);

int zmq_msg_init_data (zmq_msg_t *msg, void *data, size_t size, zmq_free_fn *ffn, void *hint);

DESCRIPTION

The zmq_msg_init_data() function shall initialise the message object referenced by msg to represent the content referenced by the buffer located at address data, size bytes long. No copy of data shall be performed and ØMQ shall take ownership of the supplied buffer.

If provided, the deallocation function ffn shall be called once the data buffer is no longer required by ØMQ, with the data and hint arguments supplied to zmq_msg_init_data().

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.
Caution
The deallocation function ffn needs to be thread-safe, since it will be called from an arbitrary thread.
Caution
The functions zmq_msg_init(), zmq_msg_init_data() and zmq_msg_init_size() are mutually exclusive. Never initialize the same zmq_msg_t twice.

RETURN VALUE

The zmq_msg_init_data() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

ENOMEM

Insufficient storage space is available.

EXAMPLE

Initialising a message from a supplied buffer
void my_free (void *data, void *hint)
{
    free (data);
}

    /*  ...  */

void *data = malloc (6);
assert (data);
memcpy (data, "ABCDEF", 6);
zmq_msg_t msg;
rc = zmq_msg_init_data (&msg, data, 6, my_free, NULL);
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_set.30000644000175000017500000000426612307431263017125 0ustar ghedoghedo'\" t .\" Title: zmq_msg_set .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_SET" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_set \- set message property .SH "SYNOPSIS" .sp \fBint zmq_msg_set (zmq_msg_t \fR\fB\fI*message\fR\fR\fB, int \fR\fB\fIproperty\fR\fR\fB, int \fR\fB\fIvalue\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_set()\fR function shall set the property specified by the \fIproperty\fR argument to the value of the \fIvalue\fR argument for the 0MQ message fragment pointed to by the \fImessage\fR argument\&. .sp Currently the \fIzmq_msg_set()\fR function does not support any property names\&. .SH "RETURN VALUE" .sp The \fIzmq_msg_set()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested property \fIproperty\fR is unknown\&. .RE .SH "SEE ALSO" .sp \fBzmq_msg_get\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_set.html0000644000175000017500000004774712307431347017755 0ustar ghedoghedo zmq_ctx_set(3)

SYNOPSIS

int zmq_ctx_set (void *context, int option_name, int option_value);

DESCRIPTION

The zmq_ctx_set() function shall set the option specified by the option_name argument to the value of the option_value argument.

The zmq_ctx_set() function accepts the following options:

ZMQ_IO_THREADS: Set number of I/O threads

The ZMQ_IO_THREADS argument specifies the size of the ØMQ thread pool to handle I/O operations. If your application is using only the inproc transport for messaging you may set this to zero, otherwise set it to at least one. This option only applies before creating any sockets on the context.

Default value

1

ZMQ_MAX_SOCKETS: Set maximum number of sockets

The ZMQ_MAX_SOCKETS argument sets the maximum number of sockets allowed on the context.

Default value

1024

ZMQ_IPV6: Set IPv6 option

The ZMQ_IPV6 argument sets the IPv6 value for all sockets created in the context from this point onwards. A value of 1 means IPv6 is enabled, while 0 means the socket will use only IPv4. When IPv6 is enabled, a socket will connect to, or accept connections from, both IPv4 and IPv6 hosts.

Default value

0

RETURN VALUE

The zmq_ctx_set() function returns zero if successful. Otherwise it returns -1 and sets errno to one of the values defined below.

ERRORS

EINVAL

The requested option option_name is unknown.

EXAMPLE

Setting a limit on the number of sockets
void *context = zmq_ctx_new ();
zmq_ctx_set (context, ZMQ_MAX_SOCKETS, 256);
int max_sockets = zmq_ctx_get (context, ZMQ_MAX_SOCKETS);
assert (max_sockets == 256);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_set.txt0000644000175000017500000000407212240736636017615 0ustar ghedoghedozmq_ctx_set(3) ============== NAME ---- zmq_ctx_set - set context options SYNOPSIS -------- *int zmq_ctx_set (void '*context', int 'option_name', int 'option_value');* DESCRIPTION ----------- The _zmq_ctx_set()_ function shall set the option specified by the 'option_name' argument to the value of the 'option_value' argument. The _zmq_ctx_set()_ function accepts the following options: ZMQ_IO_THREADS: Set number of I/O threads ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_IO_THREADS' argument specifies the size of the 0MQ thread pool to handle I/O operations. If your application is using only the 'inproc' transport for messaging you may set this to zero, otherwise set it to at least one. This option only applies before creating any sockets on the context. [horizontal] Default value:: 1 ZMQ_MAX_SOCKETS: Set maximum number of sockets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_MAX_SOCKETS' argument sets the maximum number of sockets allowed on the context. [horizontal] Default value:: 1024 ZMQ_IPV6: Set IPv6 option ~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_IPV6' argument sets the IPv6 value for all sockets created in the context from this point onwards. A value of `1` means IPv6 is enabled, while `0` means the socket will use only IPv4. When IPv6 is enabled, a socket will connect to, or accept connections from, both IPv4 and IPv6 hosts. [horizontal] Default value:: 0 RETURN VALUE ------------ The _zmq_ctx_set()_ function returns zero if successful. Otherwise it returns `-1` and sets 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested option _option_name_ is unknown. EXAMPLE ------- .Setting a limit on the number of sockets ---- void *context = zmq_ctx_new (); zmq_ctx_set (context, ZMQ_MAX_SOCKETS, 256); int max_sockets = zmq_ctx_get (context, ZMQ_MAX_SOCKETS); assert (max_sockets == 256); ---- SEE ALSO -------- linkzmq:zmq_ctx_get[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_errno.txt0000644000175000017500000000220412240736636017264 0ustar ghedoghedozmq_errno(3) ============ NAME ---- zmq_errno - retrieve value of errno for the calling thread SYNOPSIS -------- *int zmq_errno (void);* DESCRIPTION ----------- The _zmq_errno()_ function shall retrieve the value of the 'errno' variable for the calling thread. The _zmq_errno()_ function is provided to assist users on non-POSIX systems who are experiencing issues with retrieving the correct value of 'errno' directly. Specifically, users on Win32 systems whose application is using a different C run-time library from the C run-time library in use by 0MQ will need to use _zmq_errno()_ for correct operation. IMPORTANT: Users not experiencing issues with retrieving the correct value of 'errno' should not use this function and should instead access the 'errno' variable directly. RETURN VALUE ------------ The _zmq_errno()_ function shall return the value of the 'errno' variable for the calling thread. ERRORS ------ No errors are defined. SEE ALSO -------- linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_unbind.txt0000644000175000017500000000263712240736636017430 0ustar ghedoghedozmq_unbind(3) ============== NAME ---- zmq_unbind - Stop accepting connections on a socket SYNOPSIS -------- int zmq_unbind (void '*socket', const char '*endpoint'); DESCRIPTION ----------- The _zmq_unbind()_ function shall unbind a socket specified by the 'socket' argument from the endpoint specified by the 'endpoint' argument. The 'endpoint' argument is as described in linkzmq:zmq_bind[3] RETURN VALUE ------------ The _zmq_unbind()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The endpoint supplied is invalid. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. EXAMPLE ------- .Unbind a subscriber socket from a TCP transport ---- /* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); /* Connect it to the host server001, port 5555 using a TCP transport */ rc = zmq_bind (socket, "tcp://127.0.0.1:5555"); assert (rc == 0); /* Disconnect from the previously connected endpoint */ rc = zmq_unbind (socket, "tcp://127.0.0.1:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_null.txt0000644000175000017500000000075612240736636017123 0ustar ghedoghedozmq_null(7) =========== NAME ---- zmq_null - no security or confidentiality SYNOPSIS -------- The NULL mechanism is defined by the ZMTP 3.0 specification: . This is the default security mechanism for ZeroMQ sockets. SEE ALSO -------- linkzmq:zmq_plain[7] linkzmq:zmq_curve[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_new.html0000644000175000017500000004405612307431345017737 0ustar ghedoghedo zmq_ctx_new(3)

SYNOPSIS

void *zmq_ctx_new ();

DESCRIPTION

The zmq_ctx_new() function creates a new ØMQ context.

This function replaces the deprecated function zmq_init(3).

Thread safety

A ØMQ context is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller.

RETURN VALUE

The zmq_ctx_new() function shall return an opaque handle to the newly created context if successful. Otherwise it shall return NULL and set errno to one of the values defined below.

ERRORS

No error values are defined for this function.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/asciidoc.conf0000644000175000017500000000240112240736636017133 0ustar ghedoghedo[paradef-default] literal-style=template="literalparagraph" [macros] (?su)[\\]?(?Plinkzmq):(?P\S*?)\[(?P.*?)\]= ifdef::backend-docbook[] [linkzmq-inlinemacro] {0%{target}} {0#} {0#{target}{0}} {0#} endif::backend-docbook[] ifdef::backend-xhtml11[] [linkzmq-inlinemacro] {target}{0?({0})} endif::backend-xhtml11[] ifdef::doctype-manpage[] ifdef::backend-docbook[] [header] template::[header-declarations] {mantitle} {manvolnum} 0MQ {zmq_version} 0MQ Manual {manname} {manpurpose} endif::backend-docbook[] endif::doctype-manpage[] ifdef::backend-xhtml11[] [footer] {disable-javascript%

} endif::backend-xhtml11[] [replacements] ifdef::backend-xhtml11[] 0MQ=ØMQ endif::backend-xhtml11[] zeromq3-4.0.4+dfsg.orig/doc/zmq_curve_keypair.html0000644000175000017500000004460112307431372021134 0ustar ghedoghedo zmq_curve_keypair(3)

SYNOPSIS

int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key);

DESCRIPTION

The zmq_curve_keypair() function shall return a newly generated random keypair consisting of a public key and a secret key. The caller provides two buffers, each at least 41 octets large, in which this method will store the keys. The keys are encoded using zmq_z85_encode(3).

RETURN VALUE

The zmq_curve_keypair() function shall return 0 if successful, else it shall return -1 and set errno to one of the values defined below.

ERRORS

ENOTSUP

The libzmq library was not built with cryptographic support (libsodium).

EXAMPLE

Generating a new CURVE keypair
char public_key [41];
char secret_key [41];
int rc = crypto_box_keypair (public_key, secret_key);
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_term.txt0000644000175000017500000000340612240736636017771 0ustar ghedoghedozmq_ctx_term(3) =============== NAME ---- zmq_ctx_term - destroy a 0MQ context SYNOPSIS -------- *int zmq_ctx_term (void '*context');* DESCRIPTION ----------- The _zmq_ctx_term()_ function shall destroy the 0MQ context 'context'. Context termination is performed in the following steps: 1. Any blocking operations currently in progress on sockets open within 'context' shall return immediately with an error code of ETERM. With the exception of _zmq_close()_, any further operations on sockets open within 'context' shall fail with an error code of ETERM. 2. After interrupting all blocking calls, _zmq_ctx_term()_ shall _block_ until the following conditions are satisfied: * All sockets open within 'context' have been closed with _zmq_close()_. * For each socket within 'context', all messages sent by the application with _zmq_send()_ have either been physically transferred to a network peer, or the socket's linger period set with the _ZMQ_LINGER_ socket option has expired. For further details regarding socket linger behavior refer to the _ZMQ_LINGER_ option in linkzmq:zmq_setsockopt[3]. This function replaces the deprecated function linkzmq:zmq_term[3]. RETURN VALUE ------------ The _zmq_ctx_term()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: The provided 'context' was invalid. *EINTR*:: Termination was interrupted by a signal. It can be restarted if needed. SEE ALSO -------- linkzmq:zmq[7] linkzmq:zmq_init[3] linkzmq:zmq_close[3] linkzmq:zmq_setsockopt[3] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_move.html0000644000175000017500000004475012307431351020102 0ustar ghedoghedo zmq_msg_move(3)

SYNOPSIS

int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src);

DESCRIPTION

The zmq_msg_move() function shall move the content of the message object referenced by src to the message object referenced by dest. No actual copying of message content is performed, dest is simply updated to reference the new content. src becomes an empty message after calling zmq_msg_move(). The original content of dest, if any, shall be released.

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

The zmq_msg_move() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

Invalid message.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_destroy.html0000644000175000017500000004642312307431346020640 0ustar ghedoghedo zmq_ctx_destroy(3)

SYNOPSIS

int zmq_ctx_destroy (void *context);

DESCRIPTION

The zmq_ctx_destroy() function shall destroy the ØMQ context context.

Context termination is performed in the following steps:

  1. Any blocking operations currently in progress on sockets open within context shall return immediately with an error code of ETERM. With the exception of zmq_close(), any further operations on sockets open within context shall fail with an error code of ETERM.

  2. After interrupting all blocking calls, zmq_ctx_destroy() shall block until the following conditions are satisfied:

    • All sockets open within context have been closed with zmq_close().

    • For each socket within context, all messages sent by the application with zmq_send() have either been physically transferred to a network peer, or the socket’s linger period set with the ZMQ_LINGER socket option has expired.

For further details regarding socket linger behavior refer to the ZMQ_LINGER option in zmq_setsockopt(3).

This function is deprecated by zmq_ctx_term(3).

RETURN VALUE

The zmq_ctx_destroy() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

The provided context was invalid.

EINTR

Termination was interrupted by a signal. It can be restarted if needed.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_init.html0000644000175000017500000004446112307431370017231 0ustar ghedoghedo zmq_init(3)

SYNOPSIS

void *zmq_init (int io_threads);

DESCRIPTION

The zmq_init() function initialises a ØMQ context.

The io_threads argument specifies the size of the ØMQ thread pool to handle I/O operations. If your application is using only the inproc transport for messaging you may set this to zero, otherwise set it to at least one.

Thread safety

A ØMQ context is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller.

This function is deprecated by zmq_ctx_new(3).

RETURN VALUE

The zmq_init() function shall return an opaque handle to the initialised context if successful. Otherwise it shall return NULL and set errno to one of the values defined below.

ERRORS

EINVAL

An invalid number of io_threads was requested.

SEE ALSO

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_socket.txt0000644000175000017500000004013412251014562017420 0ustar ghedoghedozmq_socket(3) ============= NAME ---- zmq_socket - create 0MQ socket SYNOPSIS -------- *void *zmq_socket (void '*context', int 'type');* DESCRIPTION ----------- The 'zmq_socket()' function shall create a 0MQ socket within the specified 'context' and return an opaque handle to the newly created socket. The 'type' argument specifies the socket type, which determines the semantics of communication over the socket. The newly created socket is initially unbound, and not associated with any endpoints. In order to establish a message flow a socket must first be connected to at least one endpoint with linkzmq:zmq_connect[3], or at least one endpoint must be created for accepting incoming connections with linkzmq:zmq_bind[3]. .Key differences to conventional sockets Generally speaking, conventional sockets present a _synchronous_ interface to either connection-oriented reliable byte streams (SOCK_STREAM), or connection-less unreliable datagrams (SOCK_DGRAM). In comparison, 0MQ sockets present an abstraction of an asynchronous _message queue_, with the exact queueing semantics depending on the socket type in use. Where conventional sockets transfer streams of bytes or discrete datagrams, 0MQ sockets transfer discrete _messages_. 0MQ sockets being _asynchronous_ means that the timings of the physical connection setup and tear down, reconnect and effective delivery are transparent to the user and organized by 0MQ itself. Further, messages may be _queued_ in the event that a peer is unavailable to receive them. Conventional sockets allow only strict one-to-one (two peers), many-to-one (many clients, one server), or in some cases one-to-many (multicast) relationships. With the exception of 'ZMQ_PAIR', 0MQ sockets may be connected *to multiple endpoints* using _zmq_connect()_, while simultaneously accepting incoming connections *from multiple endpoints* bound to the socket using _zmq_bind()_, thus allowing many-to-many relationships. .Thread safety 0MQ 'sockets' are _not_ thread safe. Applications MUST NOT use a socket from multiple threads except after migrating a socket from one thread to another with a "full fence" memory barrier. .Socket types The following sections present the socket types defined by 0MQ, grouped by the general _messaging pattern_ which is built from related socket types. Request-reply pattern ~~~~~~~~~~~~~~~~~~~~~ The request-reply pattern is used for sending requests from a ZMQ_REQ _client_ to one or more ZMQ_REP _services_, and receiving subsequent replies to each request sent. The request-reply pattern is formally defined by http://rfc.zeromq.org/spec:28. ZMQ_REQ ^^^^^^^ A socket of type 'ZMQ_REQ' is used by a _client_ to send requests to and receive replies from a _service_. This socket type allows only an alternating sequence of _zmq_send(request)_ and subsequent _zmq_recv(reply)_ calls. Each request sent is round-robined among all _services_, and each reply received is matched with the last issued request. If no services are available, then any send operation on the socket shall block until at least one _service_ becomes available. The REQ socket shall not discard messages. [horizontal] .Summary of ZMQ_REQ characteristics Compatible peer sockets:: 'ZMQ_REP', 'ZMQ_ROUTER' Direction:: Bidirectional Send/receive pattern:: Send, Receive, Send, Receive, ... Outgoing routing strategy:: Round-robin Incoming routing strategy:: Last peer Action in mute state:: Block ZMQ_REP ^^^^^^^ A socket of type 'ZMQ_REP' is used by a _service_ to receive requests from and send replies to a _client_. This socket type allows only an alternating sequence of _zmq_recv(request)_ and subsequent _zmq_send(reply)_ calls. Each request received is fair-queued from among all _clients_, and each reply sent is routed to the _client_ that issued the last request. If the original requester does not exist any more the reply is silently discarded. [horizontal] .Summary of ZMQ_REP characteristics Compatible peer sockets:: 'ZMQ_REQ', 'ZMQ_DEALER' Direction:: Bidirectional Send/receive pattern:: Receive, Send, Receive, Send, ... Incoming routing strategy:: Fair-queued Outgoing routing strategy:: Last peer ZMQ_DEALER ^^^^^^^^^^ A socket of type 'ZMQ_DEALER' is an advanced pattern used for extending request/reply sockets. Each message sent is round-robined among all connected peers, and each message received is fair-queued from all connected peers. When a 'ZMQ_DEALER' socket enters the 'mute' state due to having reached the high water mark for all peers, or if there are no peers at all, then any linkzmq:zmq_send[3] operations on the socket shall block until the mute state ends or at least one peer becomes available for sending; messages are not discarded. When a 'ZMQ_DEALER' socket is connected to a 'ZMQ_REP' socket each message sent must consist of an empty message part, the _delimiter_, followed by one or more _body parts_. [horizontal] .Summary of ZMQ_DEALER characteristics Compatible peer sockets:: 'ZMQ_ROUTER', 'ZMQ_REP', 'ZMQ_DEALER' Direction:: Bidirectional Send/receive pattern:: Unrestricted Outgoing routing strategy:: Round-robin Incoming routing strategy:: Fair-queued Action in mute state:: Block ZMQ_ROUTER ^^^^^^^^^^ A socket of type 'ZMQ_ROUTER' is an advanced socket type used for extending request/reply sockets. When receiving messages a 'ZMQ_ROUTER' socket shall prepend a message part containing the _identity_ of the originating peer to the message before passing it to the application. Messages received are fair-queued from among all connected peers. When sending messages a 'ZMQ_ROUTER' socket shall remove the first part of the message and use it to determine the _identity_ of the peer the message shall be routed to. If the peer does not exist anymore the message shall be silently discarded by default, unless 'ZMQ_ROUTER_MANDATORY' socket option is set to '1'. When a 'ZMQ_ROUTER' socket enters the 'mute' state due to having reached the high water mark for all peers, then any messages sent to the socket shall be dropped until the mute state ends. Likewise, any messages routed to a peer for which the individual high water mark has been reached shall also be dropped. When a 'ZMQ_REQ' socket is connected to a 'ZMQ_ROUTER' socket, in addition to the _identity_ of the originating peer each message received shall contain an empty _delimiter_ message part. Hence, the entire structure of each received message as seen by the application becomes: one or more _identity_ parts, _delimiter_ part, one or more _body parts_. When sending replies to a 'ZMQ_REQ' socket the application must include the _delimiter_ part. [horizontal] .Summary of ZMQ_ROUTER characteristics Compatible peer sockets:: 'ZMQ_DEALER', 'ZMQ_REQ', 'ZMQ_ROUTER' Direction:: Bidirectional Send/receive pattern:: Unrestricted Outgoing routing strategy:: See text Incoming routing strategy:: Fair-queued Action in mute state:: Drop Publish-subscribe pattern ~~~~~~~~~~~~~~~~~~~~~~~~~ The publish-subscribe pattern is used for one-to-many distribution of data from a single _publisher_ to multiple _subscribers_ in a fan out fashion. The publish-subscribe pattern is formally defined by http://rfc.zeromq.org/spec:29. ZMQ_PUB ^^^^^^^ A socket of type 'ZMQ_PUB' is used by a _publisher_ to distribute data. Messages sent are distributed in a fan out fashion to all connected peers. The linkzmq:zmq_recv[3] function is not implemented for this socket type. When a 'ZMQ_PUB' socket enters the 'mute' state due to having reached the high water mark for a _subscriber_, then any messages that would be sent to the _subscriber_ in question shall instead be dropped until the mute state ends. The _zmq_send()_ function shall never block for this socket type. [horizontal] .Summary of ZMQ_PUB characteristics Compatible peer sockets:: 'ZMQ_SUB', 'ZMQ_XSUB' Direction:: Unidirectional Send/receive pattern:: Send only Incoming routing strategy:: N/A Outgoing routing strategy:: Fan out Action in mute state:: Drop ZMQ_SUB ^^^^^^^ A socket of type 'ZMQ_SUB' is used by a _subscriber_ to subscribe to data distributed by a _publisher_. Initially a 'ZMQ_SUB' socket is not subscribed to any messages, use the 'ZMQ_SUBSCRIBE' option of linkzmq:zmq_setsockopt[3] to specify which messages to subscribe to. The _zmq_send()_ function is not implemented for this socket type. [horizontal] .Summary of ZMQ_SUB characteristics Compatible peer sockets:: 'ZMQ_PUB', 'ZMQ_XPUB' Direction:: Unidirectional Send/receive pattern:: Receive only Incoming routing strategy:: Fair-queued Outgoing routing strategy:: N/A ZMQ_XPUB ^^^^^^^^ Same as ZMQ_PUB except that you can receive subscriptions from the peers in form of incoming messages. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. Messages without a sub/unsub prefix are also received, but have no effect on subscription status. [horizontal] .Summary of ZMQ_XPUB characteristics Compatible peer sockets:: 'ZMQ_SUB', 'ZMQ_XSUB' Direction:: Unidirectional Send/receive pattern:: Send messages, receive subscriptions Incoming routing strategy:: N/A Outgoing routing strategy:: Fan out Action in mute state:: Drop ZMQ_XSUB ^^^^^^^^ Same as ZMQ_SUB except that you subscribe by sending subscription messages to the socket. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. Messages without a sub/unsub prefix may also be sent, but have no effect on subscription status. [horizontal] .Summary of ZMQ_XSUB characteristics Compatible peer sockets:: 'ZMQ_PUB', 'ZMQ_XPUB' Direction:: Unidirectional Send/receive pattern:: Receive messages, send subscriptions Incoming routing strategy:: Fair-queued Outgoing routing strategy:: N/A Action in mute state:: Drop Pipeline pattern ~~~~~~~~~~~~~~~~ The pipeline pattern is used for distributing data to _nodes_ arranged in a pipeline. Data always flows down the pipeline, and each stage of the pipeline is connected to at least one _node_. When a pipeline stage is connected to multiple _nodes_ data is round-robined among all connected _nodes_. The pipeline pattern is formally defined by http://rfc.zeromq.org/spec:30. ZMQ_PUSH ^^^^^^^^ A socket of type 'ZMQ_PUSH' is used by a pipeline _node_ to send messages to downstream pipeline _nodes_. Messages are round-robined to all connected downstream _nodes_. The _zmq_recv()_ function is not implemented for this socket type. When a 'ZMQ_PUSH' socket enters the 'mute' state due to having reached the high water mark for all downstream _nodes_, or if there are no downstream _nodes_ at all, then any linkzmq:zmq_send[3] operations on the socket shall block until the mute state ends or at least one downstream _node_ becomes available for sending; messages are not discarded. [horizontal] .Summary of ZMQ_PUSH characteristics Compatible peer sockets:: 'ZMQ_PULL' Direction:: Unidirectional Send/receive pattern:: Send only Incoming routing strategy:: N/A Outgoing routing strategy:: Round-robin Action in mute state:: Block ZMQ_PULL ^^^^^^^^ A socket of type 'ZMQ_PULL' is used by a pipeline _node_ to receive messages from upstream pipeline _nodes_. Messages are fair-queued from among all connected upstream _nodes_. The _zmq_send()_ function is not implemented for this socket type. [horizontal] .Summary of ZMQ_PULL characteristics Compatible peer sockets:: 'ZMQ_PUSH' Direction:: Unidirectional Send/receive pattern:: Receive only Incoming routing strategy:: Fair-queued Outgoing routing strategy:: N/A Action in mute state:: Block Exclusive pair pattern ~~~~~~~~~~~~~~~~~~~~~~ The exclusive pair pattern is used to connect a peer to precisely one other peer. This pattern is used for inter-thread communication across the inproc transport. The exclusive pair pattern is formally defined by http://rfc.zeromq.org/spec:31. ZMQ_PAIR ^^^^^^^^ A socket of type 'ZMQ_PAIR' can only be connected to a single peer at any one time. No message routing or filtering is performed on messages sent over a 'ZMQ_PAIR' socket. When a 'ZMQ_PAIR' socket enters the 'mute' state due to having reached the high water mark for the connected peer, or if no peer is connected, then any linkzmq:zmq_send[3] operations on the socket shall block until the peer becomes available for sending; messages are not discarded. NOTE: 'ZMQ_PAIR' sockets are designed for inter-thread communication across the linkzmq:zmq_inproc[7] transport and do not implement functionality such as auto-reconnection. 'ZMQ_PAIR' sockets are considered experimental and may have other missing or broken aspects. [horizontal] .Summary of ZMQ_PAIR characteristics Compatible peer sockets:: 'ZMQ_PAIR' Direction:: Bidirectional Send/receive pattern:: Unrestricted Incoming routing strategy:: N/A Outgoing routing strategy:: N/A Action in mute state:: Block Native Pattern ~~~~~~~~~~~~~~ The native pattern is used for communicating with TCP peers and allows asynchronous requests and replies in either direction. ZMQ_STREAM ^^^^^^^^^^ A socket of type 'ZMQ_STREAM' is used to send and receive TCP data from a non-0MQ peer, when using the tcp:// transport. A 'ZMQ_STREAM' socket can act as client and/or server, sending and/or receiving TCP data asynchronously. When receiving TCP data, a 'ZMQ_STREAM' socket shall prepend a message part containing the _identity_ of the originating peer to the message before passing it to the application. Messages received are fair-queued from among all connected peers. When sending TCP data, a 'ZMQ_STREAM' socket shall remove the first part of the message and use it to determine the _identity_ of the peer the message shall be routed to, and unroutable messages shall cause an EHOSTUNREACH or EAGAIN error. To open a connection to a server, use the zmq_connect call, and then fetch the socket identity using the ZMQ_IDENTITY zmq_getsockopt call. To close a specific client connection, as a server, send the identity frame followed by a zero-length message (see EXAMPLE section). The ZMQ_MSGMORE flag is ignored on data frames. You must send one identity frame followed by one data frame. Also, please note that omitting the ZMQ_MSGMORE flag will prevent sending further data (from any client) on the same socket. [horizontal] .Summary of ZMQ_STREAM characteristics Compatible peer sockets:: none. Direction:: Bidirectional Send/receive pattern:: Unrestricted Outgoing routing strategy:: See text Incoming routing strategy:: Fair-queued Action in mute state:: EAGAIN RETURN VALUE ------------ The _zmq_socket()_ function shall return an opaque handle to the newly created socket if successful. Otherwise, it shall return NULL and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested socket 'type' is invalid. *EFAULT*:: The provided 'context' is invalid. *EMFILE*:: The limit on the total number of open 0MQ sockets has been reached. *ETERM*:: The context specified was terminated. EXAMPLE ------- .Creating a simple HTTP server using ZMQ_STREAM ---- void *ctx = zmq_ctx_new (); assert (ctx); /* Create ZMQ_STREAM socket */ void *socket = zmq_socket (ctx, ZMQ_STREAM); assert (socket); int rc = zmq_bind (socket, "tcp://*:8080"); assert (rc == 0); /* Data structure to hold the ZMQ_STREAM ID */ uint8_t id [256]; size_t id_size = 256; while (1) { /* Get HTTP request; ID frame and then request */ id_size = zmq_recv (server, id, 256, 0); assert (id_size > 0); /* Prepares the response */ char http_response [] = "HTTP/1.0 200 OK\r\n" "Content-Type: text/plain\r\n" "\r\n" "Hello, World!"; /* Sends the ID frame followed by the response */ zmq_send (socket, id, id_size, ZMQ_SNDMORE); zmq_send (socket, http_response, strlen (http_response), ZMQ_SNDMORE); /* Closes the connection by sending the ID frame followed by a zero response */ zmq_send (socket, id, id_size, ZMQ_SNDMORE); zmq_send (socket, 0, 0, ZMQ_SNDMORE); /* NOTE: If we don't use ZMQ_SNDMORE, then we won't be able to send more */ /* message to any client */ } zmq_close (socket); zmq_ctx_destroy (ctx); ---- SEE ALSO -------- linkzmq:zmq_init[3] linkzmq:zmq_setsockopt[3] linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_send[3] linkzmq:zmq_recv[3] linkzmq:zmq_inproc[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_disconnect.html0000644000175000017500000004571712307431345020426 0ustar ghedoghedo zmq_disconnect(3)

SYNOPSIS

int zmq_disconnect (void *socket, const char *endpoint);

DESCRIPTION

The zmq_disconnect() function shall disconnect a socket specified by the socket argument from the endpoint specified by the endpoint argument.

The endpoint argument is as described in zmq_connect(3)

RETURN VALUE

The zmq_disconnect() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The endpoint supplied is invalid.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

ENOENT

The provided endpoint is not connected.

EXAMPLE

Connecting a subscriber socket to an in-process and a TCP transport
/* Create a ZMQ_SUB socket */
void *socket = zmq_socket (context, ZMQ_SUB);
assert (socket);
/* Connect it to the host server001, port 5555 using a TCP transport */
rc = zmq_connect (socket, "tcp://server001:5555");
assert (rc == 0);
/* Disconnect from the previously connected endpoint */
rc = zmq_disconnect (socket, "tcp://server001:5555");
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_new.txt0000644000175000017500000000175512240736636017620 0ustar ghedoghedozmq_ctx_new(3) ============== NAME ---- zmq_ctx_new - create new 0MQ context SYNOPSIS -------- *void *zmq_ctx_new ();* DESCRIPTION ----------- The _zmq_ctx_new()_ function creates a new 0MQ 'context'. This function replaces the deprecated function linkzmq:zmq_init[3]. .Thread safety A 0MQ 'context' is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller. RETURN VALUE ------------ The _zmq_ctx_new()_ function shall return an opaque handle to the newly created 'context' if successful. Otherwise it shall return NULL and set 'errno' to one of the values defined below. ERRORS ------ No error values are defined for this function. SEE ALSO -------- linkzmq:zmq[7] linkzmq:zmq_ctx_set[3] linkzmq:zmq_ctx_get[3] linkzmq:zmq_ctx_term[3] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_send.txt0000644000175000017500000000610412240736636017073 0ustar ghedoghedozmq_send(3) =========== NAME ---- zmq_send - send a message part on a socket SYNOPSIS -------- *int zmq_send (void '*socket', void '*buf', size_t 'len', int 'flags');* DESCRIPTION ----------- The _zmq_send()_ function shall queue a message created from the buffer referenced by the 'buf' and 'len' arguments. The 'flags' argument is a combination of the flags defined below: *ZMQ_DONTWAIT*:: For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high-water mark), specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the 'socket', the _zmq_send()_ function shall fail with 'errno' set to EAGAIN. *ZMQ_SNDMORE*:: Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description. NOTE: A successful invocation of _zmq_send()_ does not indicate that the message has been transmitted to the network, only that it has been queued on the 'socket' and 0MQ has assumed responsibility for the message. Multi-part messages ~~~~~~~~~~~~~~~~~~~ A 0MQ message is composed of 1 or more message parts. 0MQ ensures atomic delivery of messages: peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except by available memory. An application that sends multi-part messages must use the _ZMQ_SNDMORE_ flag when sending each message part except the final one. RETURN VALUE ------------ The _zmq_send()_ function shall return number of bytes in the message if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EAGAIN*:: Non-blocking mode was requested and the message cannot be sent at the moment. *ENOTSUP*:: The _zmq_send()_ operation is not supported by this socket type. *EFSM*:: The _zmq_send()_ operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal before the message was sent. *EHOSTUNREACH*:: The message cannot be routed. EXAMPLE ------- .Sending a multi-part message ---- /* Send a multi-part message consisting of three parts to socket */ rc = zmq_send (socket, "ABC", 3, ZMQ_SNDMORE); assert (rc == 3); rc = zmq_send (socket, "DEFGH", 5, ZMQ_SNDMORE); assert (rc == 5); /* Final part; no more parts to follow */ rc = zmq_send (socket, "JK", 2, 0); assert (rc == 2); ---- SEE ALSO -------- linkzmq:zmq_send_const[3] linkzmq:zmq_recv[3] linkzmq:zmq_socket[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_init_data.txt0000644000175000017500000000401512240736636020743 0ustar ghedoghedozmq_msg_init_data(3) ==================== NAME ---- zmq_msg_init_data - initialise 0MQ message from a supplied buffer SYNOPSIS -------- *typedef void (zmq_free_fn) (void '*data', void '*hint');* *int zmq_msg_init_data (zmq_msg_t '*msg', void '*data', size_t 'size', zmq_free_fn '*ffn', void '*hint');* DESCRIPTION ----------- The _zmq_msg_init_data()_ function shall initialise the message object referenced by 'msg' to represent the content referenced by the buffer located at address 'data', 'size' bytes long. No copy of 'data' shall be performed and 0MQ shall take ownership of the supplied buffer. If provided, the deallocation function 'ffn' shall be called once the data buffer is no longer required by 0MQ, with the 'data' and 'hint' arguments supplied to _zmq_msg_init_data()_. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. CAUTION: The deallocation function 'ffn' needs to be thread-safe, since it will be called from an arbitrary thread. CAUTION: The functions _zmq_msg_init()_, _zmq_msg_init_data()_ and _zmq_msg_init_size()_ are mutually exclusive. Never initialize the same 'zmq_msg_t' twice. RETURN VALUE ------------ The _zmq_msg_init_data()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *ENOMEM*:: Insufficient storage space is available. EXAMPLE ------- .Initialising a message from a supplied buffer ---- void my_free (void *data, void *hint) { free (data); } /* ... */ void *data = malloc (6); assert (data); memcpy (data, "ABCDEF", 6); zmq_msg_t msg; rc = zmq_msg_init_data (&msg, data, 6, my_free, NULL); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_close[3] linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_get.txt0000644000175000017500000000303112240736636017563 0ustar ghedoghedozmq_msg_get(3) ============== NAME ---- zmq_msg_get - get message property SYNOPSIS -------- *int zmq_msg_get (zmq_msg_t '*message', int 'property');* DESCRIPTION ----------- The _zmq_msg_get()_ function shall return the value for the property specified by the 'property' argument for the message pointed to by the 'message' argument. The following properties can be retrieved with the _zmq_msg_get()_ function: *ZMQ_MORE*:: Indicates that there are more message frames to follow after the 'message'. RETURN VALUE ------------ The _zmq_msg_get()_ function shall return the value for the property if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested _property_ is unknown. EXAMPLE ------- .Receiving a multi-frame message ---- zmq_msg_t frame; while (true) { // Create an empty 0MQ message to hold the message frame int rc = zmq_msg_init (&frame); assert (rc == 0); // Block until a message is available to be received from socket rc = zmq_msg_recv (socket, &frame, 0); assert (rc != -1); if (zmq_msg_get (&frame, ZMQ_MORE)) fprintf (stderr, "more\n"); else { fprintf (stderr, "end\n"); break; } zmq_msg_close (&frame); } ---- SEE ALSO -------- linkzmq:zmq_msg_set[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_getsockopt.30000644000175000017500000006753612307431267017663 0ustar ghedoghedo'\" t .\" Title: zmq_getsockopt .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_GETSOCKOPT" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_getsockopt \- get 0MQ socket options .SH "SYNOPSIS" .sp \fBint zmq_getsockopt (void \fR\fB\fI*socket\fR\fR\fB, int \fR\fB\fIoption_name\fR\fR\fB, void \fR\fB\fI*option_value\fR\fR\fB, size_t \fR\fB\fI*option_len\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_getsockopt()\fR function shall retrieve the value for the option specified by the \fIoption_name\fR argument for the 0MQ socket pointed to by the \fIsocket\fR argument, and store it in the buffer pointed to by the \fIoption_value\fR argument\&. The \fIoption_len\fR argument is the size in bytes of the buffer pointed to by \fIoption_value\fR; upon successful completion \fIzmq_getsockopt()\fR shall modify the \fIoption_len\fR argument to indicate the actual size of the option value stored in the buffer\&. .sp The following options can be retrieved with the \fIzmq_getsockopt()\fR function: .SS "ZMQ_TYPE: Retrieve socket type" .sp The \fIZMQ_TYPE\fR option shall retrieve the socket type for the specified \fIsocket\fR\&. The socket type is specified at socket creation time and cannot be modified afterwards\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RCVMORE: More message data parts to follow" .sp The \fIZMQ_RCVMORE\fR option shall return True (1) if the message part last received from the \fIsocket\fR was a data part with more parts to follow\&. If there are no data parts to follow, this option shall return False (0)\&. .sp Refer to \fBzmq_send\fR(3) and \fBzmq_recv\fR(3) for a detailed description of multi\-part messages\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_SNDHWM: Retrieves high water mark for outbound messages" .sp The \fIZMQ_SNDHWM\fR option shall return the high water mark for outbound messages on the specified \fIsocket\fR\&. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified \fIsocket\fR is communicating with\&. A value of zero means no limit\&. .sp If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages\&. Refer to the individual socket descriptions in \fBzmq_socket\fR(3) for details on the exact action taken for each socket type\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp messages T} T{ .sp Default value T}:T{ .sp 1000 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RCVHWM: Retrieve high water mark for inbound messages" .sp The \fIZMQ_RCVHWM\fR option shall return the high water mark for inbound messages on the specified \fIsocket\fR\&. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified \fIsocket\fR is communicating with\&. A value of zero means no limit\&. .sp If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages\&. Refer to the individual socket descriptions in \fBzmq_socket\fR(3) for details on the exact action taken for each socket type\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp messages T} T{ .sp Default value T}:T{ .sp 1000 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_AFFINITY: Retrieve I/O thread affinity" .sp The \fIZMQ_AFFINITY\fR option shall retrieve the I/O thread affinity for newly created connections on the specified \fIsocket\fR\&. .sp Affinity determines which threads from the 0MQ I/O thread pool associated with the socket\(cqs \fIcontext\fR shall handle newly created connections\&. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all 0MQ I/O threads in the thread pool\&. For non\-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on\&. For example, a value of 3 specifies that subsequent connections on \fIsocket\fR shall be handled exclusively by I/O threads 1 and 2\&. .sp See also \fBzmq_init\fR(3) for details on allocating the number of I/O threads for a specific \fIcontext\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp N/A (bitmap) T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp N/A T} .TE .sp 1 .SS "ZMQ_IDENTITY: Retrieve socket identity" .sp The \fIZMQ_IDENTITY\fR option shall retrieve the identity of the specified \fIsocket\fR\&. Socket identity is used only by request/reply pattern\&. Namely, it can be used in tandem with ROUTER socket to route messages to the peer with specific identity\&. .sp Identity should be at least one byte and at most 255 bytes long\&. Identities starting with binary zero are reserved for use by 0MQ infrastructure\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp NULL T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_REP, ZMQ_REQ, ZMQ_ROUTER, ZMQ_DEALER\&. T} .TE .sp 1 .SS "ZMQ_RATE: Retrieve multicast data rate" .sp The \fIZMQ_RATE\fR option shall retrieve the maximum send or receive data rate for multicast transports using the specified \fIsocket\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp kilobits per second T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_RECOVERY_IVL: Get multicast recovery interval" .sp The \fIZMQ_RECOVERY_IVL\fR option shall retrieve the recovery interval for multicast transports using the specified \fIsocket\fR\&. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 10000 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_SNDBUF: Retrieve kernel transmit buffer size" .sp The \fIZMQ_SNDBUF\fR option shall retrieve the underlying kernel transmit buffer size for the specified \fIsocket\fR\&. A value of zero means that the OS default is in effect\&. For details refer to your operating system documentation for the \fISO_SNDBUF\fR socket option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RCVBUF: Retrieve kernel receive buffer size" .sp The \fIZMQ_RCVBUF\fR option shall retrieve the underlying kernel receive buffer size for the specified \fIsocket\fR\&. A value of zero means that the OS default is in effect\&. For details refer to your operating system documentation for the \fISO_RCVBUF\fR socket option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_LINGER: Retrieve linger period for socket shutdown" .sp The \fIZMQ_LINGER\fR option shall retrieve the linger period for the specified \fIsocket\fR\&. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with \fBzmq_close\fR(3), and further affects the termination of the socket\(cqs context with \fBzmq_term\fR(3)\&. The following outlines the different behaviours: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The default value of \fI\-1\fR specifies an infinite linger period\&. Pending messages shall not be discarded after a call to \fIzmq_close()\fR; attempting to terminate the socket\(cqs context with \fIzmq_term()\fR shall block until all pending messages have been sent to a peer\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The value of \fI0\fR specifies no linger period\&. Pending messages shall be discarded immediately when the socket is closed with \fIzmq_close()\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Positive values specify an upper bound for the linger period in milliseconds\&. Pending messages shall not be discarded after a call to \fIzmq_close()\fR; attempting to terminate the socket\(cqs context with \fIzmq_term()\fR shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ Option value type T}:T{ int T} T{ Option value unit T}:T{ milliseconds T} T{ Default value T}:T{ \-1 (infinite) T} T{ Applicable socket types T}:T{ all T} .TE .sp 1 .RE .SS "ZMQ_RECONNECT_IVL: Retrieve reconnection interval" .sp The \fIZMQ_RECONNECT_IVL\fR option shall retrieve the initial reconnection interval for the specified \fIsocket\fR\&. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection\-oriented transports\&. The value \-1 means no reconnection\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports T} .TE .sp 1 .SS "ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval" .sp The \fIZMQ_RECONNECT_IVL_MAX\fR option shall retrieve the maximum reconnection interval for the specified \fIsocket\fR\&. This is the maximum period 0MQ shall wait between attempts to reconnect\&. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached\&. This allows for exponential backoff strategy\&. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Values less than ZMQ_RECONNECT_IVL will be ignored\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 0 (only use ZMQ_RECONNECT_IVL) T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transport T} .TE .sp 1 .SS "ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections" .sp The \fIZMQ_BACKLOG\fR option shall retrieve the maximum length of the queue of outstanding peer connections for the specified \fIsocket\fR; this only applies to connection\-oriented transports\&. For details refer to your operating system documentation for the \fIlisten\fR function\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp connections T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports T} .TE .sp 1 .SS "ZMQ_MAXMSGSIZE: Maximum acceptable inbound message size" .sp The option shall retrieve limit for the inbound messages\&. If a peer sends a message larger than ZMQ_MAXMSGSIZE it is disconnected\&. Value of \-1 means \fIno limit\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp \-1 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_MULTICAST_HOPS: Maximum network hops for multicast packets" .sp The option shall retrieve time\-to\-live used for outbound multicast packets\&. The default of 1 means that the multicast packets don\(cqt leave the local network\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp network hops T} T{ .sp Default value T}:T{ .sp 1 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN" .sp Retrieve the timeout for recv operation on the socket\&. If the value is 0, \fIzmq_recv(3)\fR will return immediately, with a EAGAIN error if there is no message to receive\&. If the value is \-1, it will block until a message is available\&. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 (infinite) T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN" .sp Retrieve the timeout for send operation on the socket\&. If the value is 0, \fIzmq_send(3)\fR will return immediately, with a EAGAIN error if the message cannot be sent\&. If the value is \-1, it will block until the message is sent\&. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 (infinite) T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_IPV6: Retrieve IPv6 socket status" .sp Retrieve the IPv6 option for the socket\&. A value of 1 means IPv6 is enabled on the socket, while 0 means the socket will use only IPv4\&. When IPv6 is enabled the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp 0 (false) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_IPV4ONLY: Retrieve IPv4\-only socket override status" .sp Retrieve the IPv4\-only option for the socket\&. This option is deprecated\&. Please use the ZMQ_IPV6 option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp 1 (true) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_IMMEDIATE: Retrieve attach\-on\-connect value" .sp Retrieve the state of the attach on connect value\&. If set to 1, will delay the attachment of a pipe on connect until the underlying connection has completed\&. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp 0 (false) T} T{ .sp Applicable socket types T}:T{ .sp all, primarily when using TCP/IPC transports\&. T} .TE .sp 1 .SS "ZMQ_FD: Retrieve file descriptor associated with the socket" .sp The \fIZMQ_FD\fR option shall retrieve the file descriptor associated with the specified \fIsocket\fR\&. The returned file descriptor can be used to integrate the socket into an existing event loop; the 0MQ library shall signal any pending events on the socket in an \fIedge\-triggered\fR fashion by making the file descriptor become ready for reading\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The ability to read from the returned file descriptor does not necessarily indicate that messages are available to be read from, or can be written to, the underlying socket; applications must retrieve the actual event state with a subsequent retrieval of the \fIZMQ_EVENTS\fR option\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The returned file descriptor is also used internally by the \fIzmq_send\fR and \fIzmq_recv\fR functions\&. As the descriptor is edge triggered, applications must update the state of \fIZMQ_EVENTS\fR after each invocation of \fIzmq_send\fR or \fIzmq_recv\fR\&.To be more explicit: after calling \fIzmq_send\fR the socket may become readable (and vice versa) without triggering a read event on the file descriptor\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The returned file descriptor is intended for use with a \fIpoll\fR or similar system call only\&. Applications must never attempt to read or write data to it directly, neither should they try to close it\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int on POSIX systems, SOCKET on Windows T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_EVENTS: Retrieve socket event state" .sp The \fIZMQ_EVENTS\fR option shall retrieve the event state for the specified \fIsocket\fR\&. The returned value is a bit mask constructed by OR\(cqing a combination of the following event flags: .PP \fBZMQ_POLLIN\fR .RS 4 Indicates that at least one message may be received from the specified socket without blocking\&. .RE .PP \fBZMQ_POLLOUT\fR .RS 4 Indicates that at least one message may be sent to the specified socket without blocking\&. .RE .sp The combination of a file descriptor returned by the \fIZMQ_FD\fR option being ready for reading but no actual events returned by a subsequent retrieval of the \fIZMQ_EVENTS\fR option is valid; applications should simply ignore this case and restart their polling operation/event loop\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp N/A (flags) T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_LAST_ENDPOINT: Retrieve the last endpoint set" .sp The \fIZMQ_LAST_ENDPOINT\fR option shall retrieve the last endpoint bound for TCP and IPC transports\&. The returned value will be a string in the form of a ZMQ DSN\&. Note that if the TCP host is INADDR_ANY, indicated by a *, then the returned address will be 0\&.0\&.0\&.0 (for IPv4)\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp NULL\-terminated character string T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp NULL T} T{ .sp Applicable socket types T}:T{ .sp all, when binding TCP or IPC transports T} .TE .sp 1 .SS "ZMQ_TCP_KEEPALIVE: Override SO_KEEPALIVE socket option" .sp Override \fISO_KEEPALIVE\fR socket option(where supported by OS)\&. The default value of \-1 means to skip any overrides and leave it to OS default\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp \-1,0,1 T} T{ .sp Default value T}:T{ .sp \-1 (leave to OS default) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPCNT(or TCP_KEEPALIVE on some OS)" .sp Override \fITCP_KEEPCNT\fR(or \fITCP_KEEPALIVE\fR on some OS) socket option (where supported by OS)\&. The default value of \-1 means to skip any overrides and leave it to OS default\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp \-1,>0 T} T{ .sp Default value T}:T{ .sp \-1 (leave to OS default) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_TCP_KEEPALIVE_CNT: Override TCP_KEEPCNT socket option" .sp Override \fITCP_KEEPCNT\fR socket option(where supported by OS)\&. The default value of \-1 means to skip any overrides and leave it to OS default\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp \-1,>0 T} T{ .sp Default value T}:T{ .sp \-1 (leave to OS default) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_TCP_KEEPALIVE_INTVL: Override TCP_KEEPINTVL socket option" .sp Override \fITCP_KEEPINTVL\fR socket option(where supported by OS)\&. The default value of \-1 means to skip any overrides and leave it to OS default\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp \-1,>0 T} T{ .sp Default value T}:T{ .sp \-1 (leave to OS default) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_MECHANISM: Retrieve current security mechanism" .sp The \fIZMQ_MECHANISM\fR option shall retrieve the current security mechanism for the socket\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp ZMQ_NULL, ZMQ_PLAIN, or ZMQ_CURVE T} T{ .sp Default value T}:T{ .sp ZMQ_NULL T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP or IPC transports T} .TE .sp 1 .SS "ZMQ_PLAIN_SERVER: Retrieve current PLAIN server role" .sp Returns the \fIZMQ_PLAIN_SERVER\fR option, if any, previously set on the socket\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp 0, 1 T} T{ .sp Default value T}:T{ .sp int T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP or IPC transports T} .TE .sp 1 .SS "ZMQ_PLAIN_USERNAME: Retrieve current PLAIN username" .sp The \fIZMQ_PLAIN_USERNAME\fR option shall retrieve the last username set for the PLAIN security mechanism\&. The returned value shall be a NULL\-terminated string and MAY be empty\&. The returned size SHALL include the terminating null byte\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp NULL\-terminated character string T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp null string T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP or IPC transports T} .TE .sp 1 .SS "ZMQ_PLAIN_PASSWORD: Retrieve current password" .sp The \fIZMQ_PLAIN_PASSWORD\fR option shall retrieve the last password set for the PLAIN security mechanism\&. The returned value shall be a NULL\-terminated string and MAY be empty\&. The returned size SHALL include the terminating null byte\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp NULL\-terminated character string T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp null string T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP or IPC transports T} .TE .sp 1 .SS "ZMQ_CURVE_PUBLICKEY: Retrieve current CURVE public key" .sp Retrieves the current long term public key for the socket\&. You can provide either a 32 byte buffer, to retrieve the binary key value, or a 41 byte buffer, to retrieve the key in a printable Z85 format\&. NOTE: to fetch a printable key, the buffer must be 41 bytes large to hold the 40\-char key value and one null byte\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data or Z85 text string T} T{ .sp Option value size T}:T{ .sp 32 or 41 T} T{ .sp Default value T}:T{ .sp null T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_CURVE_SECRETKEY: Retrieve current CURVE secret key" .sp Retrieves the current long term secret key for the socket\&. You can provide either a 32 byte buffer, to retrieve the binary key value, or a 41 byte buffer, to retrieve the key in a printable Z85 format\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data or Z85 text string T} T{ .sp Option value size T}:T{ .sp 32 or 41 T} T{ .sp Default value T}:T{ .sp null T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_CURVE_SERVERKEY: Retrieve current CURVE server key" .sp Retrieves the current server key for the client socket\&. You can provide either a 32 byte buffer, to retrieve the binary key value, or a 40 byte buffer, to retrieve the key in a printable Z85 format\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data or Z85 text string T} T{ .sp Option value size T}:T{ .sp 32 or 41 T} T{ .sp Default value T}:T{ .sp null T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_ZAP_DOMAIN: Retrieve RFC 27 authentication domain" .sp The \fIZMQ_ZAP_DOMAIN\fR option shall retrieve the last ZAP domain set for the socket\&. The returned value shall be a NULL\-terminated string and MAY be empty\&. The returned size SHALL include the terminating null byte\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp character string T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp not set T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SH "RETURN VALUE" .sp The \fIzmq_getsockopt()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested option \fIoption_name\fR is unknown, or the requested \fIoption_len\fR or \fIoption_value\fR is invalid, or the size of the buffer pointed to by \fIoption_value\fR, as specified by \fIoption_len\fR, is insufficient for storing the option value\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal\&. .RE .SH "EXAMPLE" .PP \fBRetrieving the high water mark for outgoing messages\fR. .sp .if n \{\ .RS 4 .\} .nf /* Retrieve high water mark into sndhwm */ int sndhwm; size_t sndhwm_size = sizeof (sndhwm); rc = zmq_getsockopt (socket, ZMQ_SNDHWM, &sndhwm, &sndhwm_size); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_setsockopt\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_send.html0000644000175000017500000005505712307431353020071 0ustar ghedoghedo zmq_msg_send(3)

SYNOPSIS

int zmq_msg_send (zmq_msg_t *msg, void *socket, int flags);

DESCRIPTION

The zmq_msg_send() function is identical to zmq_sendmsg(3), which shall be deprecated in future versions. zmq_msg_send() is more consistent with other message manipulation functions.

The zmq_msg_send() function shall queue the message referenced by the msg argument to be sent to the socket referenced by the socket argument. The flags argument is a combination of the flags defined below:

ZMQ_DONTWAIT

For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high-water mark), specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the socket, the zmq_msg_send() function shall fail with errno set to EAGAIN.

ZMQ_SNDMORE

Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description.

The zmq_msg_t structure passed to zmq_msg_send() is nullified during the call. If you want to send the same message to multiple sockets you have to copy it using (e.g. using zmq_msg_copy()).

Note
A successful invocation of zmq_msg_send() does not indicate that the message has been transmitted to the network, only that it has been queued on the socket and ØMQ has assumed responsibility for the message. You do not need to call zmq_msg_close() after a successful zmq_msg_send().

Multi-part messages

A ØMQ message is composed of 1 or more message parts. Each message part is an independent zmq_msg_t in its own right. ØMQ ensures atomic delivery of messages: peers shall receive either all message parts of a message or none at all. The total number of message parts is unlimited except by available memory.

An application that sends multi-part messages must use the ZMQ_SNDMORE flag when sending each message part except the final one.

RETURN VALUE

The zmq_msg_send() function shall return number of bytes in the message if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EAGAIN

Non-blocking mode was requested and the message cannot be sent at the moment.

ENOTSUP

The zmq_msg_send() operation is not supported by this socket type.

EFSM

The zmq_msg_send() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal before the message was sent.

EFAULT

Invalid message.

EHOSTUNREACH

The message cannot be routed.

EXAMPLE

Filling in a message and sending it to a socket
/* Create a new message, allocating 6 bytes for message content */
zmq_msg_t msg;
int rc = zmq_msg_init_size (&msg, 6);
assert (rc == 0);
/* Fill in message content with 'AAAAAA' */
memset (zmq_msg_data (&msg), 'A', 6);
/* Send the message to the socket */
rc = zmq_msg_send (&msg, socket, 0);
assert (rc == 6);
Sending a multi-part message
/* Send a multi-part message consisting of three parts to socket */
rc = zmq_msg_send (&part1, socket, ZMQ_SNDMORE);
rc = zmq_msg_send (&part2, socket, ZMQ_SNDMORE);
/* Final part; no more parts to follow */
rc = zmq_msg_send (&part3, socket, 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_get.html0000644000175000017500000004572312307431347017731 0ustar ghedoghedo zmq_ctx_get(3)

SYNOPSIS

int zmq_ctx_get (void *context, int option_name);

DESCRIPTION

The zmq_ctx_get() function shall return the option specified by the option_name argument.

The zmq_ctx_get() function accepts the following option names:

ZMQ_IO_THREADS: Get number of I/O threads

The ZMQ_IO_THREADS argument returns the size of the ØMQ thread pool for this context.

ZMQ_MAX_SOCKETS: Get maximum number of sockets

The ZMQ_MAX_SOCKETS argument returns the maximum number of sockets allowed for this context.

ZMQ_IPV6: Set IPv6 option

The ZMQ_IPV6 argument returns the IPv6 option for the context.

RETURN VALUE

The zmq_ctx_get() function returns a value of 0 or greater if successful. Otherwise it returns -1 and sets errno to one of the values defined below.

ERRORS

EINVAL

The requested option option_name is unknown.

EXAMPLE

Setting a limit on the number of sockets
void *context = zmq_ctx_new ();
zmq_ctx_set (context, ZMQ_MAX_SOCKETS, 256);
int max_sockets = zmq_ctx_get (context, ZMQ_MAX_SOCKETS);
assert (max_sockets == 256);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq.txt0000644000175000017500000001657212240736636016074 0ustar ghedoghedozmq(7) ====== NAME ---- zmq - 0MQ lightweight messaging kernel SYNOPSIS -------- *#include * *cc* ['flags'] 'files' *-lzmq* ['libraries'] DESCRIPTION ----------- The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised _messaging middleware_ products. 0MQ sockets provide an abstraction of asynchronous _message queues_, multiple _messaging patterns_, message filtering (_subscriptions_), seamless access to multiple _transport protocols_ and more. This documentation presents an overview of 0MQ concepts, describes how 0MQ abstracts standard sockets and provides a reference manual for the functions provided by the 0MQ library. Context ~~~~~~~ Before using any 0MQ library functions you must create a 0MQ 'context'. When you exit your application you must destroy the 'context'. These functions let you work with 'contexts': Create a new 0MQ context:: linkzmq:zmq_ctx_new[3] Work with context properties:: linkzmq:zmq_ctx_set[3] linkzmq:zmq_ctx_get[3] Destroy a 0MQ context:: linkzmq:zmq_ctx_term[3] These deprecated functions let you create and destroy 'contexts': Initialise 0MQ context:: linkzmq:zmq_init[3] Terminate 0MQ context:: linkzmq:zmq_term[3] Thread safety ^^^^^^^^^^^^^ A 0MQ 'context' is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller. Individual 0MQ 'sockets' are _not_ thread safe except in the case where full memory barriers are issued when migrating a socket from one thread to another. In practice this means applications can create a socket in one thread with _zmq_socket()_ and then pass it to a _newly created_ thread as part of thread initialization, for example via a structure passed as an argument to _pthread_create()_. Multiple contexts ^^^^^^^^^^^^^^^^^ Multiple 'contexts' may coexist within a single application. Thus, an application can use 0MQ directly and at the same time make use of any number of additional libraries or components which themselves make use of 0MQ as long as the above guidelines regarding thread safety are adhered to. Messages ~~~~~~~~ A 0MQ message is a discrete unit of data passed between applications or components of the same application. 0MQ messages have no internal structure and from the point of view of 0MQ itself they are considered to be opaque binary data. The following functions are provided to work with messages: Initialise a message:: linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] Sending and receiving a message:: linkzmq:zmq_msg_send[3] linkzmq:zmq_msg_recv[3] Release a message:: linkzmq:zmq_msg_close[3] Access message content:: linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] linkzmq:zmq_msg_more[3] Work with message properties:: linkzmq:zmq_msg_get[3] linkzmq:zmq_msg_set[3] Message manipulation:: linkzmq:zmq_msg_copy[3] linkzmq:zmq_msg_move[3] Sockets ~~~~~~~ 0MQ sockets present an abstraction of a asynchronous _message queue_, with the exact queueing semantics depending on the socket type in use. See linkzmq:zmq_socket[3] for the socket types provided. The following functions are provided to work with sockets: Creating a socket:: linkzmq:zmq_socket[3] Closing a socket:: linkzmq:zmq_close[3] Manipulating socket options:: linkzmq:zmq_getsockopt[3] linkzmq:zmq_setsockopt[3] Establishing a message flow:: linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] Sending and receiving messages:: linkzmq:zmq_msg_send[3] linkzmq:zmq_msg_recv[3] linkzmq:zmq_send[3] linkzmq:zmq_recv[3] linkzmq:zmq_send_const[3] Monitoring socket events: linkzmq:zmq_socket_monitor[3] .Input/output multiplexing 0MQ provides a mechanism for applications to multiplex input/output events over a set containing both 0MQ sockets and standard sockets. This mechanism mirrors the standard _poll()_ system call, and is described in detail in linkzmq:zmq_poll[3]. Transports ~~~~~~~~~~ A 0MQ socket can use multiple different underlying transport mechanisms. Each transport mechanism is suited to a particular purpose and has its own advantages and drawbacks. The following transport mechanisms are provided: Unicast transport using TCP:: linkzmq:zmq_tcp[7] Reliable multicast transport using PGM:: linkzmq:zmq_pgm[7] Local inter-process communication transport:: linkzmq:zmq_ipc[7] Local in-process (inter-thread) communication transport:: linkzmq:zmq_inproc[7] Proxies ~~~~~~~ 0MQ provides 'proxies' to create fanout and fan-in topologies. A proxy connects a 'frontend' socket to a 'backend' socket and switches all messages between the two sockets, opaquely. A proxy may optionally capture all traffic to a third socket. To start a proxy in an application thread, use linkzmq:zmq_proxy[3]. Security ~~~~~~~~ A 0MQ socket can select a security mechanism. Both peers must use the same security mechanism. The following security mechanisms are provided for IPC and TCP connections: Null security:: linkzmq:zmq_null[7] Plain-text authentication using username and password:: linkzmq:zmq_plain[7] Elliptic curve authentication and encryption:: linkzmq:zmq_curve[7] Generate a CURVE keypair in armored text format: linkzmq:zmq_curve_keypair[3] Convert an armored key into a 32-byte binary key: linkzmq:zmq_z85_decode[3] Convert a 32-byte binary CURVE key to an armored text string: linkzmq:zmq_z85_encode[3] ERROR HANDLING -------------- The 0MQ library functions handle errors using the standard conventions found on POSIX systems. Generally, this means that upon failure a 0MQ library function shall return either a NULL value (if returning a pointer) or a negative value (if returning an integer), and the actual error code shall be stored in the 'errno' variable. On non-POSIX systems some users may experience issues with retrieving the correct value of the 'errno' variable. The _zmq_errno()_ function is provided to assist in these cases; for details refer to linkzmq:zmq_errno[3]. The _zmq_strerror()_ function is provided to translate 0MQ-specific error codes into error message strings; for details refer to linkzmq:zmq_strerror[3]. MISCELLANEOUS ------------- The following miscellaneous functions are provided: Report 0MQ library version:: linkzmq:zmq_version[3] LANGUAGE BINDINGS ----------------- The 0MQ library provides interfaces suitable for calling from programs in any language; this documentation documents those interfaces as they would be used by C programmers. The intent is that programmers using 0MQ from other languages shall refer to this documentation alongside any documentation provided by the vendor of their language binding. Language bindings ($$C++$$, Python, PHP, Ruby, Java and more) are provided by members of the 0MQ community and pointers can be found on the 0MQ website. AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . RESOURCES --------- Main web site: Report bugs to the 0MQ development mailing list: COPYING ------- Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL). For details see the files `COPYING` and `COPYING.LESSER` included with the 0MQ distribution. zeromq3-4.0.4+dfsg.orig/doc/zmq_disconnect.30000644000175000017500000000550712307431216017612 0ustar ghedoghedo'\" t .\" Title: zmq_disconnect .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_DISCONNECT" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_disconnect \- Disconnect a socket .SH "SYNOPSIS" .sp int zmq_disconnect (void \fI*socket\fR, const char \fI*endpoint\fR); .SH "DESCRIPTION" .sp The \fIzmq_disconnect()\fR function shall disconnect a socket specified by the \fIsocket\fR argument from the endpoint specified by the \fIendpoint\fR argument\&. .sp The \fIendpoint\fR argument is as described in \fBzmq_connect\fR(3) .SH "RETURN VALUE" .sp The \fIzmq_disconnect()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The endpoint supplied is invalid\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBENOENT\fR .RS 4 The provided endpoint is not connected\&. .RE .SH "EXAMPLE" .PP \fBConnecting a subscriber socket to an in-process and a TCP transport\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); /* Connect it to the host server001, port 5555 using a TCP transport */ rc = zmq_connect (socket, "tcp://server001:5555"); assert (rc == 0); /* Disconnect from the previously connected endpoint */ rc = zmq_disconnect (socket, "tcp://server001:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_connect\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq.html0000644000175000017500000007117312307431373016211 0ustar ghedoghedo zmq(7)

SYNOPSIS

#include <zmq.h>

cc [flags] files -lzmq [libraries]

DESCRIPTION

The ØMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. ØMQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more.

This documentation presents an overview of ØMQ concepts, describes how ØMQ abstracts standard sockets and provides a reference manual for the functions provided by the ØMQ library.

Context

Before using any ØMQ library functions you must create a ØMQ context. When you exit your application you must destroy the context. These functions let you work with contexts:

Create a new ØMQ context

zmq_ctx_new(3)

Work with context properties

zmq_ctx_set(3) zmq_ctx_get(3)

Destroy a ØMQ context

zmq_ctx_term(3)

These deprecated functions let you create and destroy contexts:

Initialise ØMQ context

zmq_init(3)

Terminate ØMQ context

zmq_term(3)

Thread safety

A ØMQ context is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller.

Individual ØMQ sockets are not thread safe except in the case where full memory barriers are issued when migrating a socket from one thread to another. In practice this means applications can create a socket in one thread with zmq_socket() and then pass it to a newly created thread as part of thread initialization, for example via a structure passed as an argument to pthread_create().

Multiple contexts

Multiple contexts may coexist within a single application. Thus, an application can use ØMQ directly and at the same time make use of any number of additional libraries or components which themselves make use of ØMQ as long as the above guidelines regarding thread safety are adhered to.

Messages

A ØMQ message is a discrete unit of data passed between applications or components of the same application. ØMQ messages have no internal structure and from the point of view of ØMQ itself they are considered to be opaque binary data.

The following functions are provided to work with messages:

Initialise a message

zmq_msg_init(3) zmq_msg_init_size(3) zmq_msg_init_data(3)

Sending and receiving a message

zmq_msg_send(3) zmq_msg_recv(3)

Release a message

zmq_msg_close(3)

Access message content

zmq_msg_data(3) zmq_msg_size(3) zmq_msg_more(3)

Work with message properties

zmq_msg_get(3) zmq_msg_set(3)

Message manipulation

zmq_msg_copy(3) zmq_msg_move(3)

Sockets

ØMQ sockets present an abstraction of a asynchronous message queue, with the exact queueing semantics depending on the socket type in use. See zmq_socket(3) for the socket types provided.

The following functions are provided to work with sockets:

Creating a socket

zmq_socket(3)

Closing a socket

zmq_close(3)

Manipulating socket options

zmq_getsockopt(3) zmq_setsockopt(3)

Establishing a message flow

zmq_bind(3) zmq_connect(3)

Sending and receiving messages

zmq_msg_send(3) zmq_msg_recv(3) zmq_send(3) zmq_recv(3) zmq_send_const(3)

Monitoring socket events: zmq_socket_monitor(3)

Input/output multiplexing

ØMQ provides a mechanism for applications to multiplex input/output events over a set containing both ØMQ sockets and standard sockets. This mechanism mirrors the standard poll() system call, and is described in detail in zmq_poll(3).

Transports

A ØMQ socket can use multiple different underlying transport mechanisms. Each transport mechanism is suited to a particular purpose and has its own advantages and drawbacks.

The following transport mechanisms are provided:

Unicast transport using TCP

zmq_tcp(7)

Reliable multicast transport using PGM

zmq_pgm(7)

Local inter-process communication transport

zmq_ipc(7)

Local in-process (inter-thread) communication transport

zmq_inproc(7)

Proxies

ØMQ provides proxies to create fanout and fan-in topologies. A proxy connects a frontend socket to a backend socket and switches all messages between the two sockets, opaquely. A proxy may optionally capture all traffic to a third socket. To start a proxy in an application thread, use zmq_proxy(3).

Security

A ØMQ socket can select a security mechanism. Both peers must use the same security mechanism.

The following security mechanisms are provided for IPC and TCP connections:

Null security

zmq_null(7)

Plain-text authentication using username and password

zmq_plain(7)

Elliptic curve authentication and encryption

zmq_curve(7)

Generate a CURVE keypair in armored text format: zmq_curve_keypair(3)

Convert an armored key into a 32-byte binary key: zmq_z85_decode(3)

Convert a 32-byte binary CURVE key to an armored text string: zmq_z85_encode(3)

ERROR HANDLING

The ØMQ library functions handle errors using the standard conventions found on POSIX systems. Generally, this means that upon failure a ØMQ library function shall return either a NULL value (if returning a pointer) or a negative value (if returning an integer), and the actual error code shall be stored in the errno variable.

On non-POSIX systems some users may experience issues with retrieving the correct value of the errno variable. The zmq_errno() function is provided to assist in these cases; for details refer to zmq_errno(3).

The zmq_strerror() function is provided to translate ØMQ-specific error codes into error message strings; for details refer to zmq_strerror(3).

MISCELLANEOUS

The following miscellaneous functions are provided:

Report ØMQ library version

zmq_version(3)

LANGUAGE BINDINGS

The ØMQ library provides interfaces suitable for calling from programs in any language; this documentation documents those interfaces as they would be used by C programmers. The intent is that programmers using ØMQ from other languages shall refer to this documentation alongside any documentation provided by the vendor of their language binding.

Language bindings (C++, Python, PHP, Ruby, Java and more) are provided by members of the ØMQ community and pointers can be found on the ØMQ website.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.

RESOURCES

Main web site: http://www.zeromq.org/

Report bugs to the ØMQ development mailing list: <zeromq-dev@lists.zeromq.org>

COPYING

Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL). For details see the files COPYING and COPYING.LESSER included with the ØMQ distribution.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_data.30000644000175000017500000000431212307431245017233 0ustar ghedoghedo'\" t .\" Title: zmq_msg_data .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_DATA" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_data \- retrieve pointer to message content .SH "SYNOPSIS" .sp \fBvoid *zmq_msg_data (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_data()\fR function shall return a pointer to the message content of the message object referenced by \fImsg\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp Upon successful completion, \fIzmq_msg_data()\fR shall return a pointer to the message content\&. .SH "ERRORS" .sp No errors are defined\&. .SH "SEE ALSO" .sp \fBzmq_msg_size\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_ipc.html0000644000175000017500000005222712307431375017045 0ustar ghedoghedo zmq_ipc(7)

SYNOPSIS

The inter-process transport passes messages between local processes using a system-dependent IPC mechanism.

Note
The inter-process transport is currently only implemented on operating systems that provide UNIX domain sockets.

ADDRESSING

A ØMQ endpoint is a string consisting of a transport:// followed by an address. The transport specifies the underlying protocol to use. The address specifies the transport-specific address to connect to.

For the inter-process transport, the transport is ipc, and the meaning of the address part is defined below.

Binding a socket

When binding a socket to a local address using zmq_bind() with the ipc transport, the endpoint shall be interpreted as an arbitrary string identifying the pathname to create. The pathname must be unique within the operating system namespace used by the ipc implementation, and must fulfill any restrictions placed by the operating system on the format and length of a pathname.

When the address is *, zmq_bind() shall generate a unique temporary pathname. The caller should retrieve this pathname using the ZMQ_LAST_ENDPOINT socket option. See zmq_getsockopt(3) for details.

Note
any existing binding to the same endpoint shall be overridden. That is, if a second process binds to an endpoint already bound by a process, this will succeed and the first process will lose its binding. In this behavior, the ipc transport is not consistent with the tcp or inproc transports.
Note
the endpoint pathname must be writable by the process. When the endpoint starts with /, e.g., ipc:///pathname, this will be an absolute pathname. If the endpoint specifies a directory that does not exist, the bind shall fail.
Note
on Linux only, when the endpoint pathname starts with @, the abstract namespace shall be used. The abstract namespace is independent of the filesystem and if a process attempts to bind an endpoint already bound by a process, it will fail. See unix(7) for details.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the ipc transport, the endpoint shall be interpreted as an arbitrary string identifying the pathname to connect to. The pathname must have been previously created within the operating system namespace by assigning it to a socket with zmq_bind().

EXAMPLES

Assigning a local address to a socket
//  Assign the pathname "/tmp/feeds/0"
rc = zmq_bind(socket, "ipc:///tmp/feeds/0");
assert (rc == 0);
Connecting a socket
//  Connect to the pathname "/tmp/feeds/0"
rc = zmq_connect(socket, "ipc:///tmp/feeds/0");
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_term.30000644000175000017500000000644712307431320016430 0ustar ghedoghedo'\" t .\" Title: zmq_term .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_TERM" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_term \- terminate 0MQ context .SH "SYNOPSIS" .sp \fBint zmq_term (void \fR\fB\fI*context\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_term()\fR function shall terminate the 0MQ context \fIcontext\fR\&. .sp Context termination is performed in the following steps: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Any blocking operations currently in progress on sockets open within \fIcontext\fR shall return immediately with an error code of ETERM\&. With the exception of \fIzmq_close()\fR, any further operations on sockets open within \fIcontext\fR shall fail with an error code of ETERM\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} After interrupting all blocking calls, \fIzmq_term()\fR shall \fIblock\fR until the following conditions are satisfied: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} All sockets open within \fIcontext\fR have been closed with \fIzmq_close()\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} For each socket within \fIcontext\fR, all messages sent by the application with \fIzmq_send()\fR have either been physically transferred to a network peer, or the socket\(cqs linger period set with the \fIZMQ_LINGER\fR socket option has expired\&. .RE .RE .sp For further details regarding socket linger behaviour refer to the \fIZMQ_LINGER\fR option in \fBzmq_setsockopt\fR(3)\&. .sp This function is deprecated by \fBzmq_ctx_term\fR(3)\&. .SH "RETURN VALUE" .sp The \fIzmq_term()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 The provided \fIcontext\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 Termination was interrupted by a signal\&. It can be restarted if needed\&. .RE .SH "SEE ALSO" .sp \fBzmq\fR(7) \fBzmq_init\fR(3) \fBzmq_close\fR(3) \fBzmq_setsockopt\fR(3) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_errno.html0000644000175000017500000004432412307431365017415 0ustar ghedoghedo zmq_errno(3)

SYNOPSIS

int zmq_errno (void);

DESCRIPTION

The zmq_errno() function shall retrieve the value of the errno variable for the calling thread.

The zmq_errno() function is provided to assist users on non-POSIX systems who are experiencing issues with retrieving the correct value of errno directly. Specifically, users on Win32 systems whose application is using a different C run-time library from the C run-time library in use by ØMQ will need to use zmq_errno() for correct operation.

Important
Users not experiencing issues with retrieving the correct value of errno should not use this function and should instead access the errno variable directly.

RETURN VALUE

The zmq_errno() function shall return the value of the errno variable for the calling thread.

ERRORS

No errors are defined.

SEE ALSO

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_null.html0000644000175000017500000004206212307431376017241 0ustar ghedoghedo zmq_null(7)

SYNOPSIS

The NULL mechanism is defined by the ZMTP 3.0 specification: http://rfc.zeromq.org/spec:23. This is the default security mechanism for ZeroMQ sockets.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_get.30000644000175000017500000000534112307431227017114 0ustar ghedoghedo'\" t .\" Title: zmq_ctx_get .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CTX_GET" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_ctx_get \- get context options .SH "SYNOPSIS" .sp \fBint zmq_ctx_get (void \fR\fB\fI*context\fR\fR\fB, int \fR\fB\fIoption_name\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_ctx_get()\fR function shall return the option specified by the \fIoption_name\fR argument\&. .sp The \fIzmq_ctx_get()\fR function accepts the following option names: .SS "ZMQ_IO_THREADS: Get number of I/O threads" .sp The \fIZMQ_IO_THREADS\fR argument returns the size of the 0MQ thread pool for this context\&. .SS "ZMQ_MAX_SOCKETS: Get maximum number of sockets" .sp The \fIZMQ_MAX_SOCKETS\fR argument returns the maximum number of sockets allowed for this context\&. .SS "ZMQ_IPV6: Set IPv6 option" .sp The \fIZMQ_IPV6\fR argument returns the IPv6 option for the context\&. .SH "RETURN VALUE" .sp The \fIzmq_ctx_get()\fR function returns a value of 0 or greater if successful\&. Otherwise it returns \-1 and sets \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested option \fIoption_name\fR is unknown\&. .RE .SH "EXAMPLE" .PP \fBSetting a limit on the number of sockets\fR. .sp .if n \{\ .RS 4 .\} .nf void *context = zmq_ctx_new (); zmq_ctx_set (context, ZMQ_MAX_SOCKETS, 256); int max_sockets = zmq_ctx_get (context, ZMQ_MAX_SOCKETS); assert (max_sockets == 256); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_ctx_set\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/Makefile.in0000644000175000017500000004301212307430721016544 0ustar ghedoghedo# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_DOC_TRUE@am__append_1 = $(MAN_HTML) subdir = doc DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man3dir = $(mandir)/man3 am__installdirs = "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man7dir)" man7dir = $(mandir)/man7 NROFF = nroff MANS = $(dist_man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MAN3 = zmq_bind.3 zmq_unbind.3 zmq_connect.3 zmq_disconnect.3 zmq_close.3 \ zmq_ctx_new.3 zmq_ctx_term.3 zmq_ctx_destroy.3 zmq_ctx_get.3 zmq_ctx_set.3 \ zmq_msg_init.3 zmq_msg_init_data.3 zmq_msg_init_size.3 \ zmq_msg_move.3 zmq_msg_copy.3 zmq_msg_size.3 zmq_msg_data.3 zmq_msg_close.3 \ zmq_msg_send.3 zmq_msg_recv.3 \ zmq_send.3 zmq_recv.3 zmq_send_const.3 \ zmq_msg_get.3 zmq_msg_set.3 zmq_msg_more.3 \ zmq_getsockopt.3 zmq_setsockopt.3 \ zmq_socket.3 zmq_socket_monitor.3 zmq_poll.3 \ zmq_errno.3 zmq_strerror.3 zmq_version.3 zmq_proxy.3 \ zmq_sendmsg.3 zmq_recvmsg.3 zmq_init.3 zmq_term.3 \ zmq_z85_encode.3 zmq_z85_decode.3 zmq_curve_keypair.3 MAN7 = zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7 \ zmq_null.7 zmq_plain.7 zmq_curve.7 MAN_DOC = $(MAN1) $(MAN3) $(MAN7) MAN_TXT = $(MAN3:%.3=%.txt) $(MAN7:%.7=%.txt) MAN_HTML = $(MAN_TXT:%.txt=%.html) @INSTALL_MAN_TRUE@dist_man_MANS = $(MAN_DOC) EXTRA_DIST = asciidoc.conf $(MAN_TXT) $(am__append_1) MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML) @BUILD_DOC_TRUE@SUFFIXES = .html .txt .xml .3 .7 all: all-am .SUFFIXES: .SUFFIXES: .html .txt .xml .3 .7 .1 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man3: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" @list=''; test -n "$(man3dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) install-man7: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man7dir)" || $(MKDIR_P) "$(DESTDIR)$(man7dir)" @list=''; test -n "$(man7dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.7[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man7dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man7dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man7dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man7dir)" || exit $$?; }; \ done; } uninstall-man7: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man7dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.7[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man7dir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man7dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man3 install-man7 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man3 uninstall-man7 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man3 install-man7 install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-man uninstall-man3 uninstall-man7 dist-hook : $(MAN_DOC) $(MAN_HTML) @BUILD_DOC_TRUE@.txt.html: @BUILD_DOC_TRUE@ asciidoc -d manpage -b xhtml11 -f $(srcdir)/asciidoc.conf \ @BUILD_DOC_TRUE@ -azmq_version=@PACKAGE_VERSION@ -o$@ $< @BUILD_DOC_TRUE@.txt.xml: @BUILD_DOC_TRUE@ asciidoc -d manpage -b docbook -f $(srcdir)/asciidoc.conf \ @BUILD_DOC_TRUE@ -azmq_version=@PACKAGE_VERSION@ -o$@ $< @BUILD_DOC_TRUE@.xml.1: @BUILD_DOC_TRUE@ xmlto man $< @BUILD_DOC_TRUE@.xml.3: @BUILD_DOC_TRUE@ xmlto man $< @BUILD_DOC_TRUE@.xml.7: @BUILD_DOC_TRUE@ xmlto man $< @BUILD_DOC_TRUE@zmq_epgm.7: zmq_pgm.7 @BUILD_DOC_TRUE@ cp zmq_pgm.7 $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq3-4.0.4+dfsg.orig/doc/zmq_ipc.txt0000644000175000017500000000613412240736636016720 0ustar ghedoghedozmq_ipc(7) ========== NAME ---- zmq_ipc - 0MQ local inter-process communication transport SYNOPSIS -------- The inter-process transport passes messages between local processes using a system-dependent IPC mechanism. NOTE: The inter-process transport is currently only implemented on operating systems that provide UNIX domain sockets. ADDRESSING ---------- A 0MQ endpoint is a string consisting of a 'transport'`://` followed by an 'address'. The 'transport' specifies the underlying protocol to use. The 'address' specifies the transport-specific address to connect to. For the inter-process transport, the transport is `ipc`, and the meaning of the 'address' part is defined below. Binding a socket ~~~~~~~~~~~~~~~~ When binding a 'socket' to a local address using _zmq_bind()_ with the 'ipc' transport, the 'endpoint' shall be interpreted as an arbitrary string identifying the 'pathname' to create. The 'pathname' must be unique within the operating system namespace used by the 'ipc' implementation, and must fulfill any restrictions placed by the operating system on the format and length of a 'pathname'. When the address is `*`, _zmq_bind()_ shall generate a unique temporary pathname. The caller should retrieve this pathname using the ZMQ_LAST_ENDPOINT socket option. See linkzmq:zmq_getsockopt[3] for details. NOTE: any existing binding to the same endpoint shall be overridden. That is, if a second process binds to an endpoint already bound by a process, this will succeed and the first process will lose its binding. In this behavior, the 'ipc' transport is not consistent with the 'tcp' or 'inproc' transports. NOTE: the endpoint pathname must be writable by the process. When the endpoint starts with '/', e.g., `ipc:///pathname`, this will be an _absolute_ pathname. If the endpoint specifies a directory that does not exist, the bind shall fail. NOTE: on Linux only, when the endpoint pathname starts with `@`, the abstract namespace shall be used. The abstract namespace is independent of the filesystem and if a process attempts to bind an endpoint already bound by a process, it will fail. See unix(7) for details. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a 'socket' to a peer address using _zmq_connect()_ with the 'ipc' transport, the 'endpoint' shall be interpreted as an arbitrary string identifying the 'pathname' to connect to. The 'pathname' must have been previously created within the operating system namespace by assigning it to a 'socket' with _zmq_bind()_. EXAMPLES -------- .Assigning a local address to a socket ---- // Assign the pathname "/tmp/feeds/0" rc = zmq_bind(socket, "ipc:///tmp/feeds/0"); assert (rc == 0); ---- .Connecting a socket ---- // Connect to the pathname "/tmp/feeds/0" rc = zmq_connect(socket, "ipc:///tmp/feeds/0"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_inproc[7] linkzmq:zmq_tcp[7] linkzmq:zmq_pgm[7] linkzmq:zmq_getsockopt[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_curve.txt0000644000175000017500000000551512240736636017273 0ustar ghedoghedozmq_curve(7) ============ NAME ---- zmq_curve - secure authentication and confidentiality SYNOPSIS -------- The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server. CURVE is intended for use on public networks. The CURVE mechanism is defined by this document: . CLIENT AND SERVER ROLES ----------------------- A socket using CURVE can be either client or server, at any moment, but not both. The role is independent of bind/connect direction. A socket can change roles at any point by setting new options. The role affects all zmq_connect and zmq_bind calls that follow it. To become a CURVE server, the application sets the ZMQ_CURVE_SERVER option on the socket, and then sets the ZMQ_CURVE_SECRETKEY option to provide the socket with its long-term secret key. The application does not provide the socket with its long-term public key, which is used only by clients. To become a CURVE client, the application sets the ZMQ_CURVE_SERVERKEY option with the long-term public key of the server it intends to connect to, or accept connections from, next. The application then sets the ZMQ_CURVE_PUBLICKEY and ZMQ_CURVE_SECRETKEY options with its client long-term key pair. If the server does authentication it will be based on the client's long term public key. KEY ENCODING ------------ The standard representation for keys in source code is either 32 bytes of base 256 (binary) data, or 40 characters of base 85 data encoded using the Z85 algorithm defined by http://rfc.zeromq.org/spec:32. The Z85 algorithm is designed to produce printable key strings for use in configuration files, the command line, and code. There is a reference implementation in C at https://github.com/zeromq/rfc/tree/master/src. TEST KEY VALUES --------------- For test cases, the client shall use this long-term key pair (specified as hexadecimal and in Z85): ---- public: BB88471D65E2659B30C55A5321CEBB5AAB2B70A398645C26DCA2B2FCB43FC518 Yne@$w-vo}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7 secret: 8E0BDD697628B91D8F245587EE95C5B04D48963F79259877B49CD9063AEAD3B7 JTKVSB%%)wK0E.X)V>+}o?pNmC{O&4W4b!Ni{Lh6 ---- SEE ALSO -------- linkzmq:zmq_z85_encode[3] linkzmq:zmq_z85_decode[3] linkzmq:zmq_setsockopt[3] linkzmq:zmq_null[7] linkzmq:zmq_plain[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_move.30000644000175000017500000000512212307431240017263 0ustar ghedoghedo'\" t .\" Title: zmq_msg_move .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_MOVE" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_move \- move content of a message to another message .SH "SYNOPSIS" .sp \fBint zmq_msg_move (zmq_msg_t \fR\fB\fI*dest\fR\fR\fB, zmq_msg_t \fR\fB\fI*src\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_move()\fR function shall move the content of the message object referenced by \fIsrc\fR to the message object referenced by \fIdest\fR\&. No actual copying of message content is performed, \fIdest\fR is simply updated to reference the new content\&. \fIsrc\fR becomes an empty message after calling \fIzmq_msg_move()\fR\&. The original content of \fIdest\fR, if any, shall be released\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_move()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 Invalid message\&. .RE .SH "SEE ALSO" .sp \fBzmq_msg_copy\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_more.30000644000175000017500000000532312307431264017270 0ustar ghedoghedo'\" t .\" Title: zmq_msg_more .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_MORE" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_more \- indicate if there are more message parts to receive .SH "SYNOPSIS" .sp \fBint zmq_msg_more (zmq_msg_t \fR\fB\fI*message\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_more()\fR function indicates whether this is part of a multi\-part message, and there are further parts to receive\&. This method can safely be called after \fIzmq_msg_close()\fR\&. This method is identical to \fIzmq_msg_get()\fR with an argument of ZMQ_MORE\&. .SH "RETURN VALUE" .sp The \fIzmq_msg_more()\fR function shall return zero if this is the final part of a multi\-part message, or the only part of a single\-part message\&. It shall return 1 if there are further parts to receive\&. .SH "EXAMPLE" .PP \fBReceiving a multi-part message\fR. .sp .if n \{\ .RS 4 .\} .nf zmq_msg_t part; while (true) { // Create an empty 0MQ message to hold the message part int rc = zmq_msg_init (&part); assert (rc == 0); // Block until a message is available to be received from socket rc = zmq_msg_recv (socket, &part, 0); assert (rc != \-1); if (zmq_msg_more (&part)) fprintf (stderr, "more\en"); else { fprintf (stderr, "end\en"); break; } zmq_msg_close (&part); } .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_msg_get\fR(3) \fBzmq_msg_set\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_close.html0000644000175000017500000004504712307431345017376 0ustar ghedoghedo zmq_close(3)

SYNOPSIS

int zmq_close (void *socket);

DESCRIPTION

The zmq_close() function shall destroy the socket referenced by the socket argument. Any outstanding messages physically received from the network but not yet received by the application with zmq_recv() shall be discarded. The behaviour for discarding messages sent by the application with zmq_send() but not yet physically transferred to the network depends on the value of the ZMQ_LINGER socket option for the specified socket.

Note
The default setting of ZMQ_LINGER does not discard unsent messages; this behaviour may cause the application to block when calling zmq_term(). For details refer to zmq_setsockopt(3) and zmq_term(3).

RETURN VALUE

The zmq_close() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

ENOTSOCK

The provided socket was invalid.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_send_const.html0000644000175000017500000005267412307431355020435 0ustar ghedoghedo zmq_send_const(3)

SYNOPSIS

int zmq_send_const (void *socket, void *buf, size_t len, int flags);

DESCRIPTION

The zmq_send_const() function shall queue a message created from the buffer referenced by the buf and len arguments. The message buffer is assumed to be constant-memory and will therefore not be copied or deallocated in any way. The flags argument is a combination of the flags defined below:

ZMQ_DONTWAIT

For socket types (DEALER, PUSH) that block when there are no available peers (or all peers have full high-water mark), specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the socket, the zmq_send_const() function shall fail with errno set to EAGAIN.

ZMQ_SNDMORE

Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description.

Note
A successful invocation of zmq_send_const() does not indicate that the message has been transmitted to the network, only that it has been queued on the socket and ØMQ has assumed responsibility for the message.

Multi-part messages

A ØMQ message is composed of 1 or more message parts. ØMQ ensures atomic delivery of messages: peers shall receive either all message parts of a message or none at all. The total number of message parts is unlimited except by available memory.

An application that sends multi-part messages must use the ZMQ_SNDMORE flag when sending each message part except the final one.

RETURN VALUE

The zmq_send_const() function shall return number of bytes in the message if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EAGAIN

Non-blocking mode was requested and the message cannot be sent at the moment.

ENOTSUP

The zmq_send_const() operation is not supported by this socket type.

EFSM

The zmq_send_const() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal before the message was sent.

EHOSTUNREACH

The message cannot be routed.

EXAMPLE

Sending a multi-part message
/* Send a multi-part message consisting of three parts to socket */
rc = zmq_send_const (socket, "ABC", 3, ZMQ_SNDMORE);
assert (rc == 3);
rc = zmq_send_const (socket, "DEFGH", 5, ZMQ_SNDMORE);
assert (rc == 5);
/* Final part; no more parts to follow */
rc = zmq_send_const (socket, "JK", 2, 0);
assert (rc == 2);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_copy.txt0000644000175000017500000000267112240736636017767 0ustar ghedoghedozmq_msg_copy(3) =============== NAME ---- zmq_msg_copy - copy content of a message to another message SYNOPSIS -------- *int zmq_msg_copy (zmq_msg_t '*dest', zmq_msg_t '*src');* DESCRIPTION ----------- The _zmq_msg_copy()_ function shall copy the message object referenced by 'src' to the message object referenced by 'dest'. The original content of 'dest', if any, shall be released. CAUTION: The implementation may choose not to physically copy the message content, rather to share the underlying buffer between 'src' and 'dest'. Avoid modifying message content after a message has been copied with _zmq_msg_copy()_, doing so can result in undefined behaviour. If what you need is an actual hard copy, allocate a new message using _zmq_msg_init_size()_ and copy the message content using _memcpy()_. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ The _zmq_msg_copy()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: Invalid message. SEE ALSO -------- linkzmq:zmq_msg_move[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_data.txt0000644000175000017500000000160212240736636017717 0ustar ghedoghedozmq_msg_data(3) =============== NAME ---- zmq_msg_data - retrieve pointer to message content SYNOPSIS -------- *void *zmq_msg_data (zmq_msg_t '*msg');* DESCRIPTION ----------- The _zmq_msg_data()_ function shall return a pointer to the message content of the message object referenced by 'msg'. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ Upon successful completion, _zmq_msg_data()_ shall return a pointer to the message content. ERRORS ------ No errors are defined. SEE ALSO -------- linkzmq:zmq_msg_size[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_setsockopt.30000644000175000017500000010204612307431273017656 0ustar ghedoghedo'\" t .\" Title: zmq_setsockopt .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.4 .\" Language: English .\" .TH "ZMQ_SETSOCKOPT" "3" "03/10/2014" "0MQ 4\&.0\&.4" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_setsockopt \- set 0MQ socket options .SH "SYNOPSIS" .sp \fBint zmq_setsockopt (void \fR\fB\fI*socket\fR\fR\fB, int \fR\fB\fIoption_name\fR\fR\fB, const void \fR\fB\fI*option_value\fR\fR\fB, size_t \fR\fB\fIoption_len\fR\fR\fB);\fR .sp Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE, ZMQ_LINGER, ZMQ_ROUTER_MANDATORY, ZMQ_PROBE_ROUTER, ZMQ_XPUB_VERBOSE, ZMQ_REQ_CORRELATE, and ZMQ_REQ_RELAXED, only take effect for subsequent socket bind/connects\&. .sp Specifically, security options take effect for subsequent bind/connect calls, and can be changed at any time to affect subsequent binds and/or connects\&. .SH "DESCRIPTION" .sp The \fIzmq_setsockopt()\fR function shall set the option specified by the \fIoption_name\fR argument to the value pointed to by the \fIoption_value\fR argument for the 0MQ socket pointed to by the \fIsocket\fR argument\&. The \fIoption_len\fR argument is the size of the option value in bytes\&. .sp The following socket options can be set with the \fIzmq_setsockopt()\fR function: .SS "ZMQ_SNDHWM: Set high water mark for outbound messages" .sp The \fIZMQ_SNDHWM\fR option shall set the high water mark for outbound messages on the specified \fIsocket\fR\&. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified \fIsocket\fR is communicating with\&. A value of zero means no limit\&. .sp If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages\&. Refer to the individual socket descriptions in \fBzmq_socket\fR(3) for details on the exact action taken for each socket type\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp 0MQ does not guarantee that the socket will accept as many as ZMQ_SNDHWM messages, and the actual limit may be as much as 60\-70% lower depending on the flow of messages on the socket\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp messages T} T{ .sp Default value T}:T{ .sp 1000 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RCVHWM: Set high water mark for inbound messages" .sp The \fIZMQ_RCVHWM\fR option shall set the high water mark for inbound messages on the specified \fIsocket\fR\&. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified \fIsocket\fR is communicating with\&. A value of zero means no limit\&. .sp If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages\&. Refer to the individual socket descriptions in \fBzmq_socket\fR(3) for details on the exact action taken for each socket type\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp messages T} T{ .sp Default value T}:T{ .sp 1000 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_AFFINITY: Set I/O thread affinity" .sp The \fIZMQ_AFFINITY\fR option shall set the I/O thread affinity for newly created connections on the specified \fIsocket\fR\&. .sp Affinity determines which threads from the 0MQ I/O thread pool associated with the socket\(cqs \fIcontext\fR shall handle newly created connections\&. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all 0MQ I/O threads in the thread pool\&. For non\-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on\&. For example, a value of 3 specifies that subsequent connections on \fIsocket\fR shall be handled exclusively by I/O threads 1 and 2\&. .sp See also \fBzmq_init\fR(3) for details on allocating the number of I/O threads for a specific \fIcontext\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp N/A (bitmap) T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp N/A T} .TE .sp 1 .SS "ZMQ_SUBSCRIBE: Establish message filter" .sp The \fIZMQ_SUBSCRIBE\fR option shall establish a new message filter on a \fIZMQ_SUB\fR socket\&. Newly created \fIZMQ_SUB\fR sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter\&. .sp An empty \fIoption_value\fR of length zero shall subscribe to all incoming messages\&. A non\-empty \fIoption_value\fR shall subscribe to all messages beginning with the specified prefix\&. Multiple filters may be attached to a single \fIZMQ_SUB\fR socket, in which case a message shall be accepted if it matches at least one filter\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_SUB T} .TE .sp 1 .SS "ZMQ_UNSUBSCRIBE: Remove message filter" .sp The \fIZMQ_UNSUBSCRIBE\fR option shall remove an existing message filter on a \fIZMQ_SUB\fR socket\&. The filter specified must match an existing filter previously established with the \fIZMQ_SUBSCRIBE\fR option\&. If the socket has several instances of the same filter attached the \fIZMQ_UNSUBSCRIBE\fR option shall remove only one instance, leaving the rest in place and functional\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_SUB T} .TE .sp 1 .SS "ZMQ_IDENTITY: Set socket identity" .sp The \fIZMQ_IDENTITY\fR option shall set the identity of the specified \fIsocket\fR when connecting to a ROUTER socket\&. The identity should be from 1 to 255 bytes long and MAY NOT start with binary zero\&. .sp If two clients use the same identity when connecting to a ROUTER, the ROUTER socket shall accept only the first such client and reject the others\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp NULL T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_REQ, ZMQ_REP, ZMQ_ROUTER, ZMQ_DEALER\&. T} .TE .sp 1 .SS "ZMQ_RATE: Set multicast data rate" .sp The \fIZMQ_RATE\fR option shall set the maximum send or receive data rate for multicast transports such as \fBzmq_pgm\fR(7) using the specified \fIsocket\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp kilobits per second T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_RECOVERY_IVL: Set multicast recovery interval" .sp The \fIZMQ_RECOVERY_IVL\fR option shall set the recovery interval for multicast transports using the specified \fIsocket\fR\&. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory\&. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in\-memory buffer\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 10000 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_SNDBUF: Set kernel transmit buffer size" .sp The \fIZMQ_SNDBUF\fR option shall set the underlying kernel transmit buffer size for the \fIsocket\fR to the specified size in bytes\&. A value of zero means leave the OS default unchanged\&. For details please refer to your operating system documentation for the \fISO_SNDBUF\fR socket option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RCVBUF: Set kernel receive buffer size" .sp The \fIZMQ_RCVBUF\fR option shall set the underlying kernel receive buffer size for the \fIsocket\fR to the specified size in bytes\&. A value of zero means leave the OS default unchanged\&. For details refer to your operating system documentation for the \fISO_RCVBUF\fR socket option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_LINGER: Set linger period for socket shutdown" .sp The \fIZMQ_LINGER\fR option shall set the linger period for the specified \fIsocket\fR\&. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with \fBzmq_close\fR(3), and further affects the termination of the socket\(cqs context with \fBzmq_term\fR(3)\&. The following outlines the different behaviours: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The default value of \fI\-1\fR specifies an infinite linger period\&. Pending messages shall not be discarded after a call to \fIzmq_close()\fR; attempting to terminate the socket\(cqs context with \fIzmq_term()\fR shall block until all pending messages have been sent to a peer\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The value of \fI0\fR specifies no linger period\&. Pending messages shall be discarded immediately when the socket is closed with \fIzmq_close()\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Positive values specify an upper bound for the linger period in milliseconds\&. Pending messages shall not be discarded after a call to \fIzmq_close()\fR; attempting to terminate the socket\(cqs context with \fIzmq_term()\fR shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ Option value type T}:T{ int T} T{ Option value unit T}:T{ milliseconds T} T{ Default value T}:T{ \-1 (infinite) T} T{ Applicable socket types T}:T{ all T} .TE .sp 1 .RE .SS "ZMQ_RECONNECT_IVL: Set reconnection interval" .sp The \fIZMQ_RECONNECT_IVL\fR option shall set the initial reconnection interval for the specified \fIsocket\fR\&. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection\-oriented transports\&. The value \-1 means no reconnection\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports T} .TE .sp 1 .SS "ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval" .sp The \fIZMQ_RECONNECT_IVL_MAX\fR option shall set the maximum reconnection interval for the specified \fIsocket\fR\&. This is the maximum period 0MQ shall wait between attempts to reconnect\&. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached\&. This allows for exponential backoff strategy\&. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Values less than ZMQ_RECONNECT_IVL will be ignored\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 0 (only use ZMQ_RECONNECT_IVL) T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports T} .TE .sp 1 .SS "ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections" .sp The \fIZMQ_BACKLOG\fR option shall set the maximum length of the queue of outstanding peer connections for the specified \fIsocket\fR; this only applies to connection\-oriented transports\&. For details refer to your operating system documentation for the \fIlisten\fR function\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp connections T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports\&. T} .TE .sp 1 .SS "ZMQ_MAXMSGSIZE: Maximum acceptable inbound message size" .sp Limits the size of the inbound message\&. If a peer sends a message larger than ZMQ_MAXMSGSIZE it is disconnected\&. Value of \-1 means \fIno limit\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp \-1 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_MULTICAST_HOPS: Maximum network hops for multicast packets" .sp Sets the time\-to\-live field in every multicast packet sent from this socket\&. The default is 1 which means that the multicast packets don\(cqt leave the local network\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp network hops T} T{ .sp Default value T}:T{ .sp 1 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN" .sp Sets the timeout for receive operation on the socket\&. If the value is 0, \fIzmq_recv(3)\fR will return immediately, with a EAGAIN error if there is no message to receive\&. If the value is \-1, it will block until a message is available\&. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 (infinite) T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN" .sp Sets the timeout for send operation on the socket\&. If the value is 0, \fIzmq_send(3)\fR will return immediately, with a EAGAIN error if the message cannot be sent\&. If the value is \-1, it will block until the message is sent\&. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 (infinite) T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_IPV6: Enable IPv6 on socket" .sp Set the IPv6 option for the socket\&. A value of 1 means IPv6 is enabled on the socket, while 0 means the socket will use only IPv4\&. When IPv6 is enabled the socket will connect to, or accept connections from, both IPv4 and IPv6 hosts\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp 0 (false) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_IPV4ONLY: Use IPv4\-only on socket" .sp Set the IPv4\-only option for the socket\&. This option is deprecated\&. Please use the ZMQ_IPV6 option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp 1 (true) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_IMMEDIATE: Queue messages only to completed connections" .sp By default queues will fill on outgoing connections even if the connection has not completed\&. This can lead to "lost" messages on sockets with round\-robin routing (REQ, PUSH, DEALER)\&. If this option is set to 1, messages shall be queued only to completed connections\&. This will cause the socket to block if there are no other connections, but will prevent queues from filling on pipes awaiting connection\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp 0 (false) T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports\&. T} .TE .sp 1 .SS "ZMQ_ROUTER_MANDATORY: accept only routable messages on ROUTER sockets" .sp Sets the ROUTER socket behavior when an unroutable message is encountered\&. A value of 0 is the default and discards the message silently when it cannot be routed\&. A value of 1 returns an \fIEHOSTUNREACH\fR error code if the message cannot be routed\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp 0, 1 T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_ROUTER T} .TE .sp 1 .SS "ZMQ_ROUTER_RAW: switch ROUTER socket to raw mode" .sp Sets the raw mode on the ROUTER, when set to 1\&. When the ROUTER socket is in raw mode, and when using the tcp:// transport, it will read and write TCP data without 0MQ framing\&. This lets 0MQ applications talk to non\-0MQ applications\&. When using raw mode, you cannot set explicit identities, and the ZMQ_MSGMORE flag is ignored when sending data messages\&. In raw mode you can close a specific connection by sending it a zero\-length message (following the identity frame)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp This option is deprecated, please use ZMQ_STREAM sockets instead\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp 0, 1 T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_ROUTER T} .TE .sp 1 .SS "ZMQ_PROBE_ROUTER: bootstrap connections to ROUTER sockets" .sp When set to 1, the socket will automatically send an empty message when a new connection is made or accepted\&. You may set this on REQ, DEALER, or ROUTER sockets connected to a ROUTER socket\&. The application must filter such empty messages\&. The ZMQ_PROBE_ROUTER option in effect provides the ROUTER application with an event signaling the arrival of a new peer\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp do not set this option on a socket that talks to any other socket types: the results are undefined\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp 0, 1 T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_ROUTER, ZMQ_DEALER, ZMQ_REQ T} .TE .sp 1 .SS "ZMQ_XPUB_VERBOSE: provide all subscription messages on XPUB sockets" .sp Sets the \fIXPUB\fR socket behavior on new subscriptions and unsubscriptions\&. A value of \fI0\fR is the default and passes only new subscription messages to upstream\&. A value of \fI1\fR passes all subscription messages upstream\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp 0, 1 T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_XPUB T} .TE .sp 1 .SS "ZMQ_REQ_CORRELATE: match replies with requests" .sp The default behavior of REQ sockets is to rely on the ordering of messages to match requests and responses and that is usually sufficient\&. When this option is set to 1, the REQ socket will prefix outgoing messages with an extra frame containing a request id\&. That means the full message is (request id, 0, user frames\&...)\&. The REQ socket will discard all incoming messages that don\(cqt begin with these two frames\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp 0, 1 T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_REQ T} .TE .sp 1 .SS "ZMQ_REQ_RELAXED: relax strict alternation between request and reply" .sp By default, a REQ socket does not allow initiating a new request with \fIzmq_send(3)\fR until the reply to the previous one has been received\&. When set to 1, sending another message is allowed and has the effect of disconnecting the underlying connection to the peer from which the reply was expected, triggering a reconnection attempt on transports that support it\&. The request\-reply state machine is reset and a new request is sent to the next available peer\&. .sp If set to 1, also enable ZMQ_REQ_CORRELATE to ensure correct matching of requests and replies\&. Otherwise a late reply to an aborted request can be reported as the reply to the superseding request\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp 0, 1 T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_REQ T} .TE .sp 1 .SS "ZMQ_TCP_KEEPALIVE: Override SO_KEEPALIVE socket option" .sp Override \fISO_KEEPALIVE\fR socket option (where supported by OS)\&. The default value of \-1 means to skip any overrides and leave it to OS default\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp \-1,0,1 T} T{ .sp Default value T}:T{ .sp \-1 (leave to OS default) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_TCP_KEEPALIVE_IDLE: Override TCP_KEEPCNT (or TCP_KEEPALIVE on some OS)" .sp Override \fITCP_KEEPCNT\fR(or \fITCP_KEEPALIVE\fR on some OS) socket option (where supported by OS)\&. The default value of \-1 means to skip any overrides and leave it to OS default\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp \-1,>0 T} T{ .sp Default value T}:T{ .sp \-1 (leave to OS default) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_TCP_KEEPALIVE_CNT: Override TCP_KEEPCNT socket option" .sp Override \fITCP_KEEPCNT\fR socket option (where supported by OS)\&. The default value of \-1 means to skip any overrides and leave it to OS default\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp \-1,>0 T} T{ .sp Default value T}:T{ .sp \-1 (leave to OS default) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_TCP_KEEPALIVE_INTVL: Override TCP_KEEPINTVL socket option" .sp Override \fITCP_KEEPINTVL\fR socket option(where supported by OS)\&. The default value of \-1 means to skip any overrides and leave it to OS default\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp \-1,>0 T} T{ .sp Default value T}:T{ .sp \-1 (leave to OS default) T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_TCP_ACCEPT_FILTER: Assign filters to allow new TCP connections" .sp Assign an arbitrary number of filters that will be applied for each new TCP transport connection on a listening socket\&. If no filters are applied, then the TCP transport allows connections from any IP address\&. If at least one filter is applied then new connection source ip should be matched\&. To clear all filters call zmq_setsockopt(socket, ZMQ_TCP_ACCEPT_FILTER, NULL, 0)\&. Filter is a null\-terminated string with ipv6 or ipv4 CIDR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp no filters (allow from all) T} T{ .sp Applicable socket types T}:T{ .sp all listening sockets, when using TCP transports\&. T} .TE .sp 1 .SS "ZMQ_PLAIN_SERVER: Set PLAIN server role" .sp Defines whether the socket will act as server for PLAIN security, see \fBzmq_plain\fR(7)\&. A value of \fI1\fR means the socket will act as PLAIN server\&. A value of \fI0\fR means the socket will not act as PLAIN server, and its security role then depends on other option settings\&. Setting this to \fI0\fR shall reset the socket security to NULL\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp 0, 1 T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_PLAIN_USERNAME: Set PLAIN security username" .sp Sets the username for outgoing connections over TCP or IPC\&. If you set this to a non\-null value, the security mechanism used for connections shall be PLAIN, see \fBzmq_plain\fR(7)\&. If you set this to a null value, the security mechanism used for connections shall be NULL, see \fBzmq_null\fR(3)\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp character string T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp not set T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_PLAIN_PASSWORD: Set PLAIN security password" .sp Sets the password for outgoing connections over TCP or IPC\&. If you set this to a non\-null value, the security mechanism used for connections shall be PLAIN, see \fBzmq_plain\fR(7)\&. If you set this to a null value, the security mechanism used for connections shall be NULL, see \fBzmq_null\fR(3)\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp character string T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp not set T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_CURVE_SERVER: Set CURVE server role" .sp Defines whether the socket will act as server for CURVE security, see \fBzmq_curve\fR(7)\&. A value of \fI1\fR means the socket will act as CURVE server\&. A value of \fI0\fR means the socket will not act as CURVE server, and its security role then depends on other option settings\&. Setting this to \fI0\fR shall reset the socket security to NULL\&. When you set this you must also set the server\(cqs secret key using the ZMQ_CURVE_SECRETKEY option\&. A server socket does not need to know its own public key\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp 0, 1 T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_CURVE_PUBLICKEY: Set CURVE public key" .sp Sets the socket\(cqs long term public key\&. You must set this on CURVE client sockets, see \fBzmq_curve\fR(7)\&. You can provide the key as 32 binary bytes, or as a 40\-character string encoded in the Z85 encoding format\&. The public key must always be used with the matching secret key\&. To generate a public/secret key pair, use \fBzmq_curve_keypair\fR(3)\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data or Z85 text string T} T{ .sp Option value size T}:T{ .sp 32 or 40 T} T{ .sp Default value T}:T{ .sp NULL T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_CURVE_SECRETKEY: Set CURVE secret key" .sp Sets the socket\(cqs long term secret key\&. You must set this on both CURVE client and server sockets, see \fBzmq_curve\fR(7)\&. You can provide the key as 32 binary bytes, or as a 40\-character string encoded in the Z85 encoding format\&. To generate a public/secret key pair, use \fBzmq_curve_keypair\fR(3)\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data or Z85 text string T} T{ .sp Option value size T}:T{ .sp 32 or 40 T} T{ .sp Default value T}:T{ .sp NULL T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_CURVE_SERVERKEY: Set CURVE server key" .sp Sets the socket\(cqs long term server key\&. You must set this on CURVE client sockets, see \fBzmq_curve\fR(7)\&. You can provide the key as 32 binary bytes, or as a 40\-character string encoded in the Z85 encoding format\&. This key must have been generated together with the server\(cqs secret key\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data or Z85 text string T} T{ .sp Option value size T}:T{ .sp 32 or 40 T} T{ .sp Default value T}:T{ .sp NULL T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_ZAP_DOMAIN: Set RFC 27 authentication domain" .sp Sets the domain for ZAP (ZMQ RFC 27) authentication\&. For NULL security (the default on all tcp:// connections), ZAP authentication only happens if you set a non\-empty domain\&. For PLAIN and CURVE security, ZAP requests are always made, if there is a ZAP handler present\&. See \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:27\fR\m[] for more details\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp character string T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp not set T} T{ .sp Applicable socket types T}:T{ .sp all, when using TCP transport T} .TE .sp 1 .SS "ZMQ_CONFLATE: Keep only last message" .sp If set, a socket shall keep only one message in its inbound/outbound queue, this message being the last message received/the last message to be sent\&. Ignores \fIZMQ_RECVHWM\fR and \fIZMQ_SENDHWM\fR options\&. Does not supports multi\-part messages, in particular, only one part of it is kept in the socket internal queue\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp 0 (false) T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_PULL, ZMQ_PUSH, ZMQ_SUB, ZMQ_PUB, ZMQ_DEALER T} .TE .sp 1 .SH "RETURN VALUE" .sp The \fIzmq_setsockopt()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested option \fIoption_name\fR is unknown, or the requested \fIoption_len\fR or \fIoption_value\fR is invalid\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal\&. .RE .SH "EXAMPLE" .PP \fBSubscribing to messages on a ZMQ_SUB socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Subscribe to all messages */ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "", 0); assert (rc == 0); /* Subscribe to messages prefixed with "ANIMALS\&.CATS" */ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS\&.CATS", 12); .fi .if n \{\ .RE .\} .PP \fBSetting I/O thread affinity\fR. .sp .if n \{\ .RS 4 .\} .nf int64_t affinity; /* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */ affinity = 1; rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity)); assert (rc); rc = zmq_bind (socket, "tcp://lo:5555"); assert (rc); /* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */ affinity = 2; rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity)); assert (rc); rc = zmq_bind (socket, "tcp://lo:5556"); assert (rc); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(3) \fBzmq_plain\fR(7) \fBzmq_curve\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_ctx_new.30000644000175000017500000000430012307431222017113 0ustar ghedoghedo'\" t .\" Title: zmq_ctx_new .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CTX_NEW" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_ctx_new \- create new 0MQ context .SH "SYNOPSIS" .sp \fBvoid *zmq_ctx_new ();\fR .SH "DESCRIPTION" .sp The \fIzmq_ctx_new()\fR function creates a new 0MQ \fIcontext\fR\&. .sp This function replaces the deprecated function \fBzmq_init\fR(3)\&. .PP \fBThread safety\fR. A 0MQ \fIcontext\fR is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller\&. .SH "RETURN VALUE" .sp The \fIzmq_ctx_new()\fR function shall return an opaque handle to the newly created \fIcontext\fR if successful\&. Otherwise it shall return NULL and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .sp No error values are defined for this function\&. .SH "SEE ALSO" .sp \fBzmq\fR(7) \fBzmq_ctx_set\fR(3) \fBzmq_ctx_get\fR(3) \fBzmq_ctx_term\fR(3) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_connect.html0000644000175000017500000005353212307431344017717 0ustar ghedoghedo zmq_connect(3)

SYNOPSIS

int zmq_connect (void *socket, const char *endpoint);

DESCRIPTION

The zmq_connect() function connects the socket to an endpoint and then accepts incoming connections on that endpoint.

The endpoint is a string consisting of a transport:// followed by an address. The transport specifies the underlying protocol to use. The address specifies the transport-specific address to connect to.

ØMQ provides the the following transports:

tcp

unicast transport using TCP, see zmq_tcp(7)

ipc

local inter-process communication transport, see zmq_ipc(7)

inproc

local in-process (inter-thread) communication transport, see zmq_inproc(7)

pgm, epgm

reliable multicast transport using PGM, see zmq_pgm(7)

Every ØMQ socket type except ZMQ_PAIR supports one-to-many and many-to-one semantics. The precise semantics depend on the socket type and are defined in zmq_socket(3).

Note
for most transports and socket types the connection is not performed immediately but as needed by ØMQ. Thus a successful call to zmq_connect() does not mean that the connection was or could actually be established. Because of this, for most transports and socket types the order in which a server socket is bound and a client socket is connected to it does not matter. The first exception is when using the inproc:// transport: you must call zmq_bind() before calling zmq_connect(). The second exception are ZMQ_PAIR sockets, which do not automatically reconnect to endpoints.
Note
following a zmq_connect(), for socket types except for ZMQ_ROUTER, the socket enters its normal ready state. By contrast, following a zmq_bind() alone, the socket enters a mute state in which the socket blocks or drops messages according to the socket type, as defined in zmq_socket(3). A ZMQ_ROUTER socket enters its normal ready state for a specific peer only when handshaking is complete for that peer, which may take an arbitrary time.

RETURN VALUE

The zmq_connect() function returns zero if successful. Otherwise it returns -1 and sets errno to one of the values defined below.

ERRORS

EINVAL

The endpoint supplied is invalid.

EPROTONOSUPPORT

The requested transport protocol is not supported.

ENOCOMPATPROTO

The requested transport protocol is not compatible with the socket type.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EMTHREAD

No I/O thread is available to accomplish the task.

EXAMPLE

Connecting a subscriber socket to an in-process and a TCP transport
/* Create a ZMQ_SUB socket */
void *socket = zmq_socket (context, ZMQ_SUB);
assert (socket);
/* Connect it to an in-process transport with the address 'my_publisher' */
int rc = zmq_connect (socket, "inproc://my_publisher");
assert (rc == 0);
/* Connect it to the host server001, port 5555 using a TCP transport */
rc = zmq_connect (socket, "tcp://server001:5555");
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_recv.txt0000644000175000017500000000735312240736636017756 0ustar ghedoghedozmq_msg_recv(3) =============== NAME ---- zmq_msg_recv - receive a message part from a socket SYNOPSIS -------- *int zmq_msg_recv (zmq_msg_t '*msg', void '*socket', int 'flags');* DESCRIPTION ----------- The _zmq_msg_recv()_ function is identical to linkzmq:zmq_recvmsg[3], which shall be deprecated in future versions. _zmq_msg_recv()_ is more consistent with other message manipulation functions. The _zmq_msg_recv()_ function shall receive a message part from the socket referenced by the 'socket' argument and store it in the message referenced by the 'msg' argument. Any content previously stored in 'msg' shall be properly deallocated. If there are no message parts available on the specified 'socket' the _zmq_msg_recv()_ function shall block until the request can be satisfied. The 'flags' argument is a combination of the flags defined below: *ZMQ_DONTWAIT*:: Specifies that the operation should be performed in non-blocking mode. If there are no messages available on the specified 'socket', the _zmq_msg_recv()_ function shall fail with 'errno' set to EAGAIN. Multi-part messages ~~~~~~~~~~~~~~~~~~~ A 0MQ message is composed of 1 or more message parts. Each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages: peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited except by available memory. An application that processes multi-part messages must use the _ZMQ_RCVMORE_ linkzmq:zmq_getsockopt[3] option after calling _zmq_msg_recv()_ to determine if there are further parts to receive. RETURN VALUE ------------ The _zmq_msg_recv()_ function shall return number of bytes in the message if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EAGAIN*:: Non-blocking mode was requested and no messages are available at the moment. *ENOTSUP*:: The _zmq_msg_recv()_ operation is not supported by this socket type. *EFSM*:: The _zmq_msg_recv()_ operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal before a message was available. *EFAULT*:: The message passed to the function was invalid. EXAMPLE ------- .Receiving a message from a socket ---- /* Create an empty 0MQ message */ zmq_msg_t msg; int rc = zmq_msg_init (&msg); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_msg_recv (&msg, socket, 0); assert (rc != -1); /* Release message */ zmq_msg_close (&msg); ---- .Receiving a multi-part message ---- int64_t more; size_t more_size = sizeof (more); do { /* Create an empty 0MQ message to hold the message part */ zmq_msg_t part; int rc = zmq_msg_init (&part); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_msg_recv (&part, socket, 0); assert (rc != -1); /* Determine if more message parts are to follow */ rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); zmq_msg_close (&part); } while (more); ---- SEE ALSO -------- linkzmq:zmq_recv[3] linkzmq:zmq_send[3] linkzmq:zmq_msg_send[3] linkzmq:zmq_getsockopt[3] linkzmq:zmq_socket[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_inproc.txt0000644000175000017500000000470412240736636017440 0ustar ghedoghedozmq_inproc(7) ============= NAME ---- zmq_inproc - 0MQ local in-process (inter-thread) communication transport SYNOPSIS -------- The in-process transport passes messages via memory directly between threads sharing a single 0MQ 'context'. NOTE: No I/O threads are involved in passing messages using the 'inproc' transport. Therefore, if you are using a 0MQ 'context' for in-process messaging only you can initialise the 'context' with zero I/O threads. See linkzmq:zmq_init[3] for details. ADDRESSING ---------- A 0MQ endpoint is a string consisting of a 'transport'`://` followed by an 'address'. The 'transport' specifies the underlying protocol to use. The 'address' specifies the transport-specific address to connect to. For the in-process transport, the transport is `inproc`, and the meaning of the 'address' part is defined below. Assigning a local address to a socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When assigning a local address to a 'socket' using _zmq_bind()_ with the 'inproc' transport, the 'endpoint' shall be interpreted as an arbitrary string identifying the 'name' to create. The 'name' must be unique within the 0MQ 'context' associated with the 'socket' and may be up to 256 characters in length. No other restrictions are placed on the format of the 'name'. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a 'socket' to a peer address using _zmq_connect()_ with the 'inproc' transport, the 'endpoint' shall be interpreted as an arbitrary string identifying the 'name' to connect to. The 'name' must have been previously created by assigning it to at least one 'socket' within the same 0MQ 'context' as the 'socket' being connected. EXAMPLES -------- .Assigning a local address to a socket ---- // Assign the in-process name "#1" rc = zmq_bind(socket, "inproc://#1"); assert (rc == 0); // Assign the in-process name "my-endpoint" rc = zmq_bind(socket, "inproc://my-endpoint"); assert (rc == 0); ---- .Connecting a socket ---- // Connect to the in-process name "#1" rc = zmq_connect(socket, "inproc://#1"); assert (rc == 0); // Connect to the in-process name "my-endpoint" rc = zmq_connect(socket, "inproc://my-endpoint"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_ipc[7] linkzmq:zmq_tcp[7] linkzmq:zmq_pgm[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_more.html0000644000175000017500000004501512307431357020077 0ustar ghedoghedo zmq_msg_more(3)

SYNOPSIS

int zmq_msg_more (zmq_msg_t *message);

DESCRIPTION

The zmq_msg_more() function indicates whether this is part of a multi-part message, and there are further parts to receive. This method can safely be called after zmq_msg_close(). This method is identical to zmq_msg_get() with an argument of ZMQ_MORE.

RETURN VALUE

The zmq_msg_more() function shall return zero if this is the final part of a multi-part message, or the only part of a single-part message. It shall return 1 if there are further parts to receive.

EXAMPLE

Receiving a multi-part message
zmq_msg_t part;
while (true) {
    //  Create an empty 0MQ message to hold the message part
    int rc = zmq_msg_init (&part);
    assert (rc == 0);
    //  Block until a message is available to be received from socket
    rc = zmq_msg_recv (socket, &part, 0);
    assert (rc != -1);
    if (zmq_msg_more (&part))
        fprintf (stderr, "more\n");
    else {
        fprintf (stderr, "end\n");
        break;
    }
    zmq_msg_close (&part);
}

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_size.html0000644000175000017500000004404712307431352020106 0ustar ghedoghedo zmq_msg_size(3)

SYNOPSIS

size_t zmq_msg_size (zmq_msg_t *msg);

DESCRIPTION

The zmq_msg_size() function shall return the size in bytes of the content of the message object referenced by msg.

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

Upon successful completion, zmq_msg_size() shall return the size of the message content in bytes.

ERRORS

No errors are defined.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_recv.html0000644000175000017500000005126312307431355017226 0ustar ghedoghedo zmq_recv(3)

SYNOPSIS

int zmq_recv (void *socket, void *buf, size_t len, int flags);

DESCRIPTION

The zmq_recv() function shall receive a message from the socket referenced by the socket argument and store it in the buffer referenced by the buf argument. Any bytes exceeding the length specified by the len argument shall be truncated. If there are no messages available on the specified socket the zmq_recv() function shall block until the request can be satisfied. The flags argument is a combination of the flags defined below:

ZMQ_DONTWAIT

Specifies that the operation should be performed in non-blocking mode. If there are no messages available on the specified socket, the zmq_recv() function shall fail with errno set to EAGAIN.

Multi-part messages

A ØMQ message is composed of 1 or more message parts. ØMQ ensures atomic delivery of messages: peers shall receive either all message parts of a message or none at all. The total number of message parts is unlimited except by available memory.

An application that processes multi-part messages must use the ZMQ_RCVMORE zmq_getsockopt(3) option after calling zmq_recv() to determine if there are further parts to receive.

RETURN VALUE

The zmq_recv() function shall return number of bytes in the message if successful. Note that the value can exceed the value of the len parameter in case the message was truncated. If not successful the function shall return -1 and set errno to one of the values defined below.

ERRORS

EAGAIN

Non-blocking mode was requested and no messages are available at the moment.

ENOTSUP

The zmq_recv() operation is not supported by this socket type.

EFSM

The zmq_recv() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal before a message was available.

EXAMPLE

Receiving a message from a socket
char buf [256];
nbytes = zmq_recv (socket, buf, 256, 0);
assert (nbytes != -1);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_recv.30000644000175000017500000001244112307431252017261 0ustar ghedoghedo'\" t .\" Title: zmq_msg_recv .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_MSG_RECV" "3" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_recv \- receive a message part from a socket .SH "SYNOPSIS" .sp \fBint zmq_msg_recv (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, void \fR\fB\fI*socket\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_recv()\fR function is identical to \fBzmq_recvmsg\fR(3), which shall be deprecated in future versions\&. \fIzmq_msg_recv()\fR is more consistent with other message manipulation functions\&. .sp The \fIzmq_msg_recv()\fR function shall receive a message part from the socket referenced by the \fIsocket\fR argument and store it in the message referenced by the \fImsg\fR argument\&. Any content previously stored in \fImsg\fR shall be properly deallocated\&. If there are no message parts available on the specified \fIsocket\fR the \fIzmq_msg_recv()\fR function shall block until the request can be satisfied\&. The \fIflags\fR argument is a combination of the flags defined below: .PP \fBZMQ_DONTWAIT\fR .RS 4 Specifies that the operation should be performed in non\-blocking mode\&. If there are no messages available on the specified \fIsocket\fR, the \fIzmq_msg_recv()\fR function shall fail with \fIerrno\fR set to EAGAIN\&. .RE .SS "Multi\-part messages" .sp A 0MQ message is composed of 1 or more message parts\&. Each message part is an independent \fIzmq_msg_t\fR in its own right\&. 0MQ ensures atomic delivery of messages: peers shall receive either all \fImessage parts\fR of a message or none at all\&. The total number of message parts is unlimited except by available memory\&. .sp An application that processes multi\-part messages must use the \fIZMQ_RCVMORE\fR \fBzmq_getsockopt\fR(3) option after calling \fIzmq_msg_recv()\fR to determine if there are further parts to receive\&. .SH "RETURN VALUE" .sp The \fIzmq_msg_recv()\fR function shall return number of bytes in the message if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEAGAIN\fR .RS 4 Non\-blocking mode was requested and no messages are available at the moment\&. .RE .PP \fBENOTSUP\fR .RS 4 The \fIzmq_msg_recv()\fR operation is not supported by this socket type\&. .RE .PP \fBEFSM\fR .RS 4 The \fIzmq_msg_recv()\fR operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state\&. This error may occur with socket types that switch between several states, such as ZMQ_REP\&. See the \fImessaging patterns\fR section of \fBzmq_socket\fR(3) for more information\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before a message was available\&. .RE .PP \fBEFAULT\fR .RS 4 The message passed to the function was invalid\&. .RE .SH "EXAMPLE" .PP \fBReceiving a message from a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create an empty 0MQ message */ zmq_msg_t msg; int rc = zmq_msg_init (&msg); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_msg_recv (&msg, socket, 0); assert (rc != \-1); /* Release message */ zmq_msg_close (&msg); .fi .if n \{\ .RE .\} .PP \fBReceiving a multi-part message\fR. .sp .if n \{\ .RS 4 .\} .nf int64_t more; size_t more_size = sizeof (more); do { /* Create an empty 0MQ message to hold the message part */ zmq_msg_t part; int rc = zmq_msg_init (&part); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_msg_recv (&part, socket, 0); assert (rc != \-1); /* Determine if more message parts are to follow */ rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); zmq_msg_close (&part); } while (more); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_recv\fR(3) \fBzmq_send\fR(3) \fBzmq_msg_send\fR(3) \fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_init_size.txt0000644000175000017500000000270412240736636021007 0ustar ghedoghedozmq_msg_init_size(3) ==================== NAME ---- zmq_msg_init_size - initialise 0MQ message of a specified size SYNOPSIS -------- *int zmq_msg_init_size (zmq_msg_t '*msg', size_t 'size');* DESCRIPTION ----------- The _zmq_msg_init_size()_ function shall allocate any resources required to store a message 'size' bytes long and initialise the message object referenced by 'msg' to represent the newly allocated message. The implementation shall choose whether to store message content on the stack (small messages) or on the heap (large messages). For performance reasons _zmq_msg_init_size()_ shall not clear the message data. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. CAUTION: The functions _zmq_msg_init()_, _zmq_msg_init_data()_ and _zmq_msg_init_size()_ are mutually exclusive. Never initialize the same 'zmq_msg_t' twice. RETURN VALUE ------------ The _zmq_msg_init_size()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *ENOMEM*:: Insufficient storage space is available. SEE ALSO -------- linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_close[3] linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_connect.txt0000644000175000017500000000656312240736636017604 0ustar ghedoghedozmq_connect(3) ============== NAME ---- zmq_connect - create outgoing connection from socket SYNOPSIS -------- *int zmq_connect (void '*socket', const char '*endpoint');* DESCRIPTION ----------- The _zmq_connect()_ function connects the 'socket' to an 'endpoint' and then accepts incoming connections on that endpoint. The 'endpoint' is a string consisting of a 'transport'`://` followed by an 'address'. The 'transport' specifies the underlying protocol to use. The 'address' specifies the transport-specific address to connect to. 0MQ provides the the following transports: 'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7] 'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7] 'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7] 'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7] Every 0MQ socket type except 'ZMQ_PAIR' supports one-to-many and many-to-one semantics. The precise semantics depend on the socket type and are defined in linkzmq:zmq_socket[3]. NOTE: for most transports and socket types the connection is not performed immediately but as needed by 0MQ. Thus a successful call to _zmq_connect()_ does not mean that the connection was or could actually be established. Because of this, for most transports and socket types the order in which a 'server' socket is bound and a 'client' socket is connected to it does not matter. The first exception is when using the inproc:// transport: you must call _zmq_bind()_ before calling _zmq_connect()_. The second exception are _ZMQ_PAIR_ sockets, which do not automatically reconnect to endpoints. NOTE: following a _zmq_connect()_, for socket types except for ZMQ_ROUTER, the socket enters its normal 'ready' state. By contrast, following a _zmq_bind()_ alone, the socket enters a 'mute' state in which the socket blocks or drops messages according to the socket type, as defined in linkzmq:zmq_socket[3]. A ZMQ_ROUTER socket enters its normal 'ready' state for a specific peer only when handshaking is complete for that peer, which may take an arbitrary time. RETURN VALUE ------------ The _zmq_connect()_ function returns zero if successful. Otherwise it returns `-1` and sets 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The endpoint supplied is invalid. *EPROTONOSUPPORT*:: The requested 'transport' protocol is not supported. *ENOCOMPATPROTO*:: The requested 'transport' protocol is not compatible with the socket type. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EMTHREAD*:: No I/O thread is available to accomplish the task. EXAMPLE ------- .Connecting a subscriber socket to an in-process and a TCP transport ---- /* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); /* Connect it to an in-process transport with the address 'my_publisher' */ int rc = zmq_connect (socket, "inproc://my_publisher"); assert (rc == 0); /* Connect it to the host server001, port 5555 using a TCP transport */ rc = zmq_connect (socket, "tcp://server001:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_curve.70000644000175000017500000001022112307431343016577 0ustar ghedoghedo'\" t .\" Title: zmq_curve .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/10/2014 .\" Manual: 0MQ Manual .\" Source: 0MQ 4.0.1 .\" Language: English .\" .TH "ZMQ_CURVE" "7" "03/10/2014" "0MQ 4\&.0\&.1" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_curve \- secure authentication and confidentiality .SH "SYNOPSIS" .sp The CURVE mechanism defines a mechanism for secure authentication and confidentiality for communications between a client and a server\&. CURVE is intended for use on public networks\&. The CURVE mechanism is defined by this document: \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:25\fR\m[]\&. .SH "CLIENT AND SERVER ROLES" .sp A socket using CURVE can be either client or server, at any moment, but not both\&. The role is independent of bind/connect direction\&. .sp A socket can change roles at any point by setting new options\&. The role affects all zmq_connect and zmq_bind calls that follow it\&. .sp To become a CURVE server, the application sets the ZMQ_CURVE_SERVER option on the socket, and then sets the ZMQ_CURVE_SECRETKEY option to provide the socket with its long\-term secret key\&. The application does not provide the socket with its long\-term public key, which is used only by clients\&. .sp To become a CURVE client, the application sets the ZMQ_CURVE_SERVERKEY option with the long\-term public key of the server it intends to connect to, or accept connections from, next\&. The application then sets the ZMQ_CURVE_PUBLICKEY and ZMQ_CURVE_SECRETKEY options with its client long\-term key pair\&. .sp If the server does authentication it will be based on the client\(cqs long term public key\&. .SH "KEY ENCODING" .sp The standard representation for keys in source code is either 32 bytes of base 256 (binary) data, or 40 characters of base 85 data encoded using the Z85 algorithm defined by \m[blue]\fBhttp://rfc\&.zeromq\&.org/spec:32\fR\m[]\&. .sp The Z85 algorithm is designed to produce printable key strings for use in configuration files, the command line, and code\&. There is a reference implementation in C at \m[blue]\fBhttps://github\&.com/zeromq/rfc/tree/master/src\fR\m[]\&. .SH "TEST KEY VALUES" .sp For test cases, the client shall use this long\-term key pair (specified as hexadecimal and in Z85): .sp .if n \{\ .RS 4 .\} .nf public: BB88471D65E2659B30C55A5321CEBB5AAB2B70A398645C26DCA2B2FCB43FC518 Yne@$w\-vo}U?@Lns47E1%kR\&.o@n%FcmmsL/@{H8]yf7 secret: 8E0BDD697628B91D8F245587EE95C5B04D48963F79259877B49CD9063AEAD3B7 JTKVSB%%)wK0E\&.X)V>+}o?pNmC{O&4W4b!Ni{Lh6 .fi .if n \{\ .RE .\} .SH "SEE ALSO" .sp \fBzmq_z85_encode\fR(3) \fBzmq_z85_decode\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_null\fR(7) \fBzmq_plain\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This page was written by the 0MQ community\&. To make a change please read the 0MQ Contribution Policy at \m[blue]\fBhttp://www\&.zeromq\&.org/docs:contributing\fR\m[]\&. zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_move.txt0000644000175000017500000000231712240736636017760 0ustar ghedoghedozmq_msg_move(3) =============== NAME ---- zmq_msg_move - move content of a message to another message SYNOPSIS -------- *int zmq_msg_move (zmq_msg_t '*dest', zmq_msg_t '*src');* DESCRIPTION ----------- The _zmq_msg_move()_ function shall move the content of the message object referenced by 'src' to the message object referenced by 'dest'. No actual copying of message content is performed, 'dest' is simply updated to reference the new content. 'src' becomes an empty message after calling _zmq_msg_move()_. The original content of 'dest', if any, shall be released. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ The _zmq_msg_move()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: Invalid message. SEE ALSO -------- linkzmq:zmq_msg_copy[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_pgm.html0000644000175000017500000005755512307431374017065 0ustar ghedoghedo zmq_pgm(7)

SYNOPSIS

PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks.

DESCRIPTION

ØMQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the pgm transport) and "Encapsulated PGM" or EPGM where PGM datagrams are encapsulated inside UDP datagrams (the epgm transport).

The pgm and epgm transports can only be used with the ZMQ_PUB and ZMQ_SUB socket types.

Further, PGM sockets are rate limited by default. For details, refer to the ZMQ_RATE, and ZMQ_RECOVERY_IVL options documented in zmq_setsockopt(3).

Caution
The pgm transport implementation requires access to raw IP sockets. Additional privileges may be required on some operating systems for this operation. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the epgm transport instead which does not require any special privileges.

ADDRESSING

A ØMQ endpoint is a string consisting of a transport:// followed by an address. The transport specifies the underlying protocol to use. The address specifies the transport-specific address to connect to.

For the PGM transport, the transport is pgm, and for the EPGM protocol the transport is epgm. The meaning of the address part is defined below.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the pgm or epgm transport, the endpoint shall be interpreted as an interface followed by a semicolon, followed by a multicast address, followed by a colon and a port number.

An interface may be specified by either of the following:

  • The interface name as defined by the operating system.

  • The primary IPv4 address assigned to the interface, in its numeric representation.

Note
Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an interface. The interface part can be omitted, in that case the default one will be selected.

A multicast address is specified by an IPv4 multicast address in its numeric representation.

WIRE FORMAT

Consecutive PGM datagrams are interpreted by ØMQ as a single continuous stream of data where ØMQ messages are not necessarily aligned with PGM datagram boundaries and a single ØMQ message may span several PGM datagrams. This stream of data consists of ØMQ messages encapsulated in frames as described in zmq_tcp(7).

PGM datagram payload

The following ABNF grammar represents the payload of a single PGM datagram as used by ØMQ:

datagram               = (offset data)
offset                 = 2OCTET
data                   = *OCTET

In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message frame in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message.

Note that offset specifies where the first message begins rather than the first message part. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet.

The following diagram illustrates the layout of a single PGM datagram payload:

+------------------+----------------------+
| offset (16 bits) |         data         |
+------------------+----------------------+

The following diagram further illustrates how three example ØMQ frames are laid out in consecutive PGM datagram payloads:

First datagram payload
+--------------+-------------+---------------------+
| Frame offset |   Frame 1   |   Frame 2, part 1   |
|    0x0000    | (Message 1) | (Message 2, part 1) |
+--------------+-------------+---------------------+

Second datagram payload
+--------------+---------------------+
| Frame offset |   Frame 2, part 2   |
| 0xFFFF       | (Message 2, part 2) |
+--------------+---------------------+

Third datagram payload
+--------------+----------------------------+-------------+
| Frame offset |   Frame 2, final 8 bytes   |   Frame 3   |
| 0x0008       | (Message 2, final 8 bytes) | (Message 3) |
+--------------+----------------------------+-------------+

EXAMPLE

Connecting a socket
//  Connecting to the multicast address 239.192.1.1, port 5555,
//  using the first Ethernet network interface on Linux
//  and the Encapsulated PGM protocol
rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555");
assert (rc == 0);
//  Connecting to the multicast address 239.192.1.1, port 5555,
//  using the network interface with the address 192.168.1.1
//  and the standard PGM protocol
rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555");
assert (rc == 0);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/Makefile.am0000644000175000017500000000277312240736636016556 0ustar ghedoghedoMAN3 = zmq_bind.3 zmq_unbind.3 zmq_connect.3 zmq_disconnect.3 zmq_close.3 \ zmq_ctx_new.3 zmq_ctx_term.3 zmq_ctx_destroy.3 zmq_ctx_get.3 zmq_ctx_set.3 \ zmq_msg_init.3 zmq_msg_init_data.3 zmq_msg_init_size.3 \ zmq_msg_move.3 zmq_msg_copy.3 zmq_msg_size.3 zmq_msg_data.3 zmq_msg_close.3 \ zmq_msg_send.3 zmq_msg_recv.3 \ zmq_send.3 zmq_recv.3 zmq_send_const.3 \ zmq_msg_get.3 zmq_msg_set.3 zmq_msg_more.3 \ zmq_getsockopt.3 zmq_setsockopt.3 \ zmq_socket.3 zmq_socket_monitor.3 zmq_poll.3 \ zmq_errno.3 zmq_strerror.3 zmq_version.3 zmq_proxy.3 \ zmq_sendmsg.3 zmq_recvmsg.3 zmq_init.3 zmq_term.3 \ zmq_z85_encode.3 zmq_z85_decode.3 zmq_curve_keypair.3 MAN7 = zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7 \ zmq_null.7 zmq_plain.7 zmq_curve.7 MAN_DOC = $(MAN1) $(MAN3) $(MAN7) MAN_TXT = $(MAN3:%.3=%.txt) MAN_TXT += $(MAN7:%.7=%.txt) MAN_HTML = $(MAN_TXT:%.txt=%.html) if INSTALL_MAN dist_man_MANS = $(MAN_DOC) endif EXTRA_DIST = asciidoc.conf $(MAN_TXT) if BUILD_DOC EXTRA_DIST += $(MAN_HTML) endif MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML) dist-hook : $(MAN_DOC) $(MAN_HTML) if BUILD_DOC SUFFIXES=.html .txt .xml .3 .7 .txt.html: asciidoc -d manpage -b xhtml11 -f $(srcdir)/asciidoc.conf \ -azmq_version=@PACKAGE_VERSION@ -o$@ $< .txt.xml: asciidoc -d manpage -b docbook -f $(srcdir)/asciidoc.conf \ -azmq_version=@PACKAGE_VERSION@ -o$@ $< .xml.1: xmlto man $< .xml.3: xmlto man $< .xml.7: xmlto man $< zmq_epgm.7: zmq_pgm.7 cp zmq_pgm.7 $@ endif zeromq3-4.0.4+dfsg.orig/doc/zmq_plain.txt0000644000175000017500000000162212240736636017245 0ustar ghedoghedozmq_plain(7) ============ NAME ---- zmq_plain - clear-text authentication SYNOPSIS -------- The PLAIN mechanism defines a simple username/password mechanism that lets a server authenticate a client. PLAIN makes no attempt at security or confidentiality. It is intended for use on internal networks where security requirements are low. The PLAIN mechanism is defined by this document: . USAGE ----- To use PLAIN, the server shall set the ZMQ_PLAIN_SERVER option, and the client shall set the ZMQ_PLAIN_USERNAME and ZMQ_PLAIN_PASSWORD socket options. Which peer binds, and which connects, is not relevant. SEE ALSO -------- linkzmq:zmq_setsockopt[3] linkzmq:zmq_null[7] linkzmq:zmq_curve[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_init.txt0000644000175000017500000000252112240736636017752 0ustar ghedoghedozmq_msg_init(3) =============== NAME ---- zmq_msg_init - initialise empty 0MQ message SYNOPSIS -------- *int zmq_msg_init (zmq_msg_t '*msg');* DESCRIPTION ----------- The _zmq_msg_init()_ function shall initialise the message object referenced by 'msg' to represent an empty message. This function is most useful when called before receiving a message with _zmq_recv()_. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. CAUTION: The functions _zmq_msg_init()_, _zmq_msg_init_data()_ and _zmq_msg_init_size()_ are mutually exclusive. Never initialize the same 'zmq_msg_t' twice. RETURN VALUE ------------ The _zmq_msg_init()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ No errors are defined. EXAMPLE ------- .Receiving a message from a socket ---- zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_recv (socket, &msg, 0); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_more.txt0000644000175000017500000000271612240736636017757 0ustar ghedoghedozmq_msg_more(3) =============== NAME ---- zmq_msg_more - indicate if there are more message parts to receive SYNOPSIS -------- *int zmq_msg_more (zmq_msg_t '*message');* DESCRIPTION ----------- The _zmq_msg_more()_ function indicates whether this is part of a multi-part message, and there are further parts to receive. This method can safely be called after _zmq_msg_close()_. This method is identical to _zmq_msg_get()_ with an argument of ZMQ_MORE. RETURN VALUE ------------ The _zmq_msg_more()_ function shall return zero if this is the final part of a multi-part message, or the only part of a single-part message. It shall return 1 if there are further parts to receive. EXAMPLE ------- .Receiving a multi-part message ---- zmq_msg_t part; while (true) { // Create an empty 0MQ message to hold the message part int rc = zmq_msg_init (&part); assert (rc == 0); // Block until a message is available to be received from socket rc = zmq_msg_recv (socket, &part, 0); assert (rc != -1); if (zmq_msg_more (&part)) fprintf (stderr, "more\n"); else { fprintf (stderr, "end\n"); break; } zmq_msg_close (&part); } ---- SEE ALSO -------- linkzmq:zmq_msg_get[3] linkzmq:zmq_msg_set[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/doc/zmq_msg_init_size.html0000644000175000017500000004562412307431351021132 0ustar ghedoghedo zmq_msg_init_size(3)

SYNOPSIS

int zmq_msg_init_size (zmq_msg_t *msg, size_t size);

DESCRIPTION

The zmq_msg_init_size() function shall allocate any resources required to store a message size bytes long and initialise the message object referenced by msg to represent the newly allocated message.

The implementation shall choose whether to store message content on the stack (small messages) or on the heap (large messages). For performance reasons zmq_msg_init_size() shall not clear the message data.

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.
Caution
The functions zmq_msg_init(), zmq_msg_init_data() and zmq_msg_init_size() are mutually exclusive. Never initialize the same zmq_msg_t twice.

RETURN VALUE

The zmq_msg_init_size() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

ENOMEM

Insufficient storage space is available.

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_socket.html0000644000175000017500000013346112307431363017557 0ustar ghedoghedo zmq_socket(3)

SYNOPSIS

void *zmq_socket (void *context, int type);

DESCRIPTION

The zmq_socket() function shall create a ØMQ socket within the specified context and return an opaque handle to the newly created socket. The type argument specifies the socket type, which determines the semantics of communication over the socket.

The newly created socket is initially unbound, and not associated with any endpoints. In order to establish a message flow a socket must first be connected to at least one endpoint with zmq_connect(3), or at least one endpoint must be created for accepting incoming connections with zmq_bind(3).

Key differences to conventional sockets

Generally speaking, conventional sockets present a synchronous interface to either connection-oriented reliable byte streams (SOCK_STREAM), or connection-less unreliable datagrams (SOCK_DGRAM). In comparison, ØMQ sockets present an abstraction of an asynchronous message queue, with the exact queueing semantics depending on the socket type in use. Where conventional sockets transfer streams of bytes or discrete datagrams, ØMQ sockets transfer discrete messages.

ØMQ sockets being asynchronous means that the timings of the physical connection setup and tear down, reconnect and effective delivery are transparent to the user and organized by ØMQ itself. Further, messages may be queued in the event that a peer is unavailable to receive them.

Conventional sockets allow only strict one-to-one (two peers), many-to-one (many clients, one server), or in some cases one-to-many (multicast) relationships. With the exception of ZMQ_PAIR, ØMQ sockets may be connected to multiple endpoints using zmq_connect(), while simultaneously accepting incoming connections from multiple endpoints bound to the socket using zmq_bind(), thus allowing many-to-many relationships.

Thread safety

ØMQ sockets are not thread safe. Applications MUST NOT use a socket from multiple threads except after migrating a socket from one thread to another with a "full fence" memory barrier.

Socket types

The following sections present the socket types defined by ØMQ, grouped by the general messaging pattern which is built from related socket types.

Request-reply pattern

The request-reply pattern is used for sending requests from a ZMQ_REQ client to one or more ZMQ_REP services, and receiving subsequent replies to each request sent.

The request-reply pattern is formally defined by http://rfc.zeromq.org/spec:28.

ZMQ_REQ

A socket of type ZMQ_REQ is used by a client to send requests to and receive replies from a service. This socket type allows only an alternating sequence of zmq_send(request) and subsequent zmq_recv(reply) calls. Each request sent is round-robined among all services, and each reply received is matched with the last issued request.

If no services are available, then any send operation on the socket shall block until at least one service becomes available. The REQ socket shall not discard messages.

Summary of ZMQ_REQ characteristics
Compatible peer sockets

ZMQ_REP, ZMQ_ROUTER

Direction

Bidirectional

Send/receive pattern

Send, Receive, Send, Receive, …

Outgoing routing strategy

Round-robin

Incoming routing strategy

Last peer

Action in mute state

Block

ZMQ_REP

A socket of type ZMQ_REP is used by a service to receive requests from and send replies to a client. This socket type allows only an alternating sequence of zmq_recv(request) and subsequent zmq_send(reply) calls. Each request received is fair-queued from among all clients, and each reply sent is routed to the client that issued the last request. If the original requester does not exist any more the reply is silently discarded.

Summary of ZMQ_REP characteristics
Compatible peer sockets

ZMQ_REQ, ZMQ_DEALER

Direction

Bidirectional

Send/receive pattern

Receive, Send, Receive, Send, …

Incoming routing strategy

Fair-queued

Outgoing routing strategy

Last peer

ZMQ_DEALER

A socket of type ZMQ_DEALER is an advanced pattern used for extending request/reply sockets. Each message sent is round-robined among all connected peers, and each message received is fair-queued from all connected peers.

When a ZMQ_DEALER socket enters the mute state due to having reached the high water mark for all peers, or if there are no peers at all, then any zmq_send(3) operations on the socket shall block until the mute state ends or at least one peer becomes available for sending; messages are not discarded.

When a ZMQ_DEALER socket is connected to a ZMQ_REP socket each message sent must consist of an empty message part, the delimiter, followed by one or more body parts.

Summary of ZMQ_DEALER characteristics
Compatible peer sockets

ZMQ_ROUTER, ZMQ_REP, ZMQ_DEALER

Direction

Bidirectional

Send/receive pattern

Unrestricted

Outgoing routing strategy

Round-robin

Incoming routing strategy

Fair-queued

Action in mute state

Block

ZMQ_ROUTER

A socket of type ZMQ_ROUTER is an advanced socket type used for extending request/reply sockets. When receiving messages a ZMQ_ROUTER socket shall prepend a message part containing the identity of the originating peer to the message before passing it to the application. Messages received are fair-queued from among all connected peers. When sending messages a ZMQ_ROUTER socket shall remove the first part of the message and use it to determine the identity of the peer the message shall be routed to. If the peer does not exist anymore the message shall be silently discarded by default, unless ZMQ_ROUTER_MANDATORY socket option is set to 1.

When a ZMQ_ROUTER socket enters the mute state due to having reached the high water mark for all peers, then any messages sent to the socket shall be dropped until the mute state ends. Likewise, any messages routed to a peer for which the individual high water mark has been reached shall also be dropped.

When a ZMQ_REQ socket is connected to a ZMQ_ROUTER socket, in addition to the identity of the originating peer each message received shall contain an empty delimiter message part. Hence, the entire structure of each received message as seen by the application becomes: one or more identity parts, delimiter part, one or more body parts. When sending replies to a ZMQ_REQ socket the application must include the delimiter part.

Summary of ZMQ_ROUTER characteristics
Compatible peer sockets

ZMQ_DEALER, ZMQ_REQ, ZMQ_ROUTER

Direction

Bidirectional

Send/receive pattern

Unrestricted

Outgoing routing strategy

See text

Incoming routing strategy

Fair-queued

Action in mute state

Drop

Publish-subscribe pattern

The publish-subscribe pattern is used for one-to-many distribution of data from a single publisher to multiple subscribers in a fan out fashion.

The publish-subscribe pattern is formally defined by http://rfc.zeromq.org/spec:29.

ZMQ_PUB

A socket of type ZMQ_PUB is used by a publisher to distribute data. Messages sent are distributed in a fan out fashion to all connected peers. The zmq_recv(3) function is not implemented for this socket type.

When a ZMQ_PUB socket enters the mute state due to having reached the high water mark for a subscriber, then any messages that would be sent to the subscriber in question shall instead be dropped until the mute state ends. The zmq_send() function shall never block for this socket type.

Summary of ZMQ_PUB characteristics
Compatible peer sockets

ZMQ_SUB, ZMQ_XSUB

Direction

Unidirectional

Send/receive pattern

Send only

Incoming routing strategy

N/A

Outgoing routing strategy

Fan out

Action in mute state

Drop

ZMQ_SUB

A socket of type ZMQ_SUB is used by a subscriber to subscribe to data distributed by a publisher. Initially a ZMQ_SUB socket is not subscribed to any messages, use the ZMQ_SUBSCRIBE option of zmq_setsockopt(3) to specify which messages to subscribe to. The zmq_send() function is not implemented for this socket type.

Summary of ZMQ_SUB characteristics
Compatible peer sockets

ZMQ_PUB, ZMQ_XPUB

Direction

Unidirectional

Send/receive pattern

Receive only

Incoming routing strategy

Fair-queued

Outgoing routing strategy

N/A

ZMQ_XPUB

Same as ZMQ_PUB except that you can receive subscriptions from the peers in form of incoming messages. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. Messages without a sub/unsub prefix are also received, but have no effect on subscription status.

Summary of ZMQ_XPUB characteristics
Compatible peer sockets

ZMQ_SUB, ZMQ_XSUB

Direction

Unidirectional

Send/receive pattern

Send messages, receive subscriptions

Incoming routing strategy

N/A

Outgoing routing strategy

Fan out

Action in mute state

Drop

ZMQ_XSUB

Same as ZMQ_SUB except that you subscribe by sending subscription messages to the socket. Subscription message is a byte 1 (for subscriptions) or byte 0 (for unsubscriptions) followed by the subscription body. Messages without a sub/unsub prefix may also be sent, but have no effect on subscription status.

Summary of ZMQ_XSUB characteristics
Compatible peer sockets

ZMQ_PUB, ZMQ_XPUB

Direction

Unidirectional

Send/receive pattern

Receive messages, send subscriptions

Incoming routing strategy

Fair-queued

Outgoing routing strategy

N/A

Action in mute state

Drop

Pipeline pattern

The pipeline pattern is used for distributing data to nodes arranged in a pipeline. Data always flows down the pipeline, and each stage of the pipeline is connected to at least one node. When a pipeline stage is connected to multiple nodes data is round-robined among all connected nodes.

The pipeline pattern is formally defined by http://rfc.zeromq.org/spec:30.

ZMQ_PUSH

A socket of type ZMQ_PUSH is used by a pipeline node to send messages to downstream pipeline nodes. Messages are round-robined to all connected downstream nodes. The zmq_recv() function is not implemented for this socket type.

When a ZMQ_PUSH socket enters the mute state due to having reached the high water mark for all downstream nodes, or if there are no downstream nodes at all, then any zmq_send(3) operations on the socket shall block until the mute state ends or at least one downstream node becomes available for sending; messages are not discarded.

Summary of ZMQ_PUSH characteristics
Compatible peer sockets

ZMQ_PULL

Direction

Unidirectional

Send/receive pattern

Send only

Incoming routing strategy

N/A

Outgoing routing strategy

Round-robin

Action in mute state

Block

ZMQ_PULL

A socket of type ZMQ_PULL is used by a pipeline node to receive messages from upstream pipeline nodes. Messages are fair-queued from among all connected upstream nodes. The zmq_send() function is not implemented for this socket type.

Summary of ZMQ_PULL characteristics
Compatible peer sockets

ZMQ_PUSH

Direction

Unidirectional

Send/receive pattern

Receive only

Incoming routing strategy

Fair-queued

Outgoing routing strategy

N/A

Action in mute state

Block

Exclusive pair pattern

The exclusive pair pattern is used to connect a peer to precisely one other peer. This pattern is used for inter-thread communication across the inproc transport.

The exclusive pair pattern is formally defined by http://rfc.zeromq.org/spec:31.

ZMQ_PAIR

A socket of type ZMQ_PAIR can only be connected to a single peer at any one time. No message routing or filtering is performed on messages sent over a ZMQ_PAIR socket.

When a ZMQ_PAIR socket enters the mute state due to having reached the high water mark for the connected peer, or if no peer is connected, then any zmq_send(3) operations on the socket shall block until the peer becomes available for sending; messages are not discarded.

Note
ZMQ_PAIR sockets are designed for inter-thread communication across the zmq_inproc(7) transport and do not implement functionality such as auto-reconnection. ZMQ_PAIR sockets are considered experimental and may have other missing or broken aspects.
Summary of ZMQ_PAIR characteristics
Compatible peer sockets

ZMQ_PAIR

Direction

Bidirectional

Send/receive pattern

Unrestricted

Incoming routing strategy

N/A

Outgoing routing strategy

N/A

Action in mute state

Block

Native Pattern

The native pattern is used for communicating with TCP peers and allows asynchronous requests and replies in either direction.

ZMQ_STREAM

A socket of type ZMQ_STREAM is used to send and receive TCP data from a non-ØMQ peer, when using the tcp:// transport. A ZMQ_STREAM socket can act as client and/or server, sending and/or receiving TCP data asynchronously.

When receiving TCP data, a ZMQ_STREAM socket shall prepend a message part containing the identity of the originating peer to the message before passing it to the application. Messages received are fair-queued from among all connected peers.

When sending TCP data, a ZMQ_STREAM socket shall remove the first part of the message and use it to determine the identity of the peer the message shall be routed to, and unroutable messages shall cause an EHOSTUNREACH or EAGAIN error.

To open a connection to a server, use the zmq_connect call, and then fetch the socket identity using the ZMQ_IDENTITY zmq_getsockopt call.

To close a specific client connection, as a server, send the identity frame followed by a zero-length message (see EXAMPLE section).

The ZMQ_MSGMORE flag is ignored on data frames. You must send one identity frame followed by one data frame.

Also, please note that omitting the ZMQ_MSGMORE flag will prevent sending further data (from any client) on the same socket.

Summary of ZMQ_STREAM characteristics
Compatible peer sockets

none.

Direction

Bidirectional

Send/receive pattern

Unrestricted

Outgoing routing strategy

See text

Incoming routing strategy

Fair-queued

Action in mute state

EAGAIN

RETURN VALUE

The zmq_socket() function shall return an opaque handle to the newly created socket if successful. Otherwise, it shall return NULL and set errno to one of the values defined below.

ERRORS

EINVAL

The requested socket type is invalid.

EFAULT

The provided context is invalid.

EMFILE

The limit on the total number of open ØMQ sockets has been reached.

ETERM

The context specified was terminated.

EXAMPLE

Creating a simple HTTP server using ZMQ_STREAM
void *ctx = zmq_ctx_new ();
assert (ctx);
/* Create ZMQ_STREAM socket */
void *socket = zmq_socket (ctx, ZMQ_STREAM);
assert (socket);
int rc = zmq_bind (socket, "tcp://*:8080");
assert (rc == 0);
/* Data structure to hold the ZMQ_STREAM ID */
uint8_t id [256];
size_t id_size = 256;
while (1) {
        /*  Get HTTP request; ID frame and then request */
        id_size = zmq_recv (server, id, 256, 0);
        assert (id_size > 0);
        /* Prepares the response */
        char http_response [] =
                "HTTP/1.0 200 OK\r\n"
                "Content-Type: text/plain\r\n"
                "\r\n"
                "Hello, World!";
        /* Sends the ID frame followed by the response */
        zmq_send (socket, id, id_size, ZMQ_SNDMORE);
        zmq_send (socket, http_response, strlen (http_response), ZMQ_SNDMORE);
        /* Closes the connection by sending the ID frame followed by a zero response */
        zmq_send (socket, id, id_size, ZMQ_SNDMORE);
        zmq_send (socket, 0, 0, ZMQ_SNDMORE);
        /* NOTE: If we don't use ZMQ_SNDMORE, then we won't be able to send more */
        /* message to any client */
}
zmq_close (socket);
zmq_ctx_destroy (ctx);

AUTHORS

This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.


zeromq3-4.0.4+dfsg.orig/doc/zmq_pgm.txt0000644000175000017500000001257512240736636016736 0ustar ghedoghedozmq_pgm(7) ========== NAME ---- zmq_pgm - 0MQ reliable multicast transport using PGM SYNOPSIS -------- PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks. DESCRIPTION ----------- 0MQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the 'pgm' transport) and "Encapsulated PGM" or EPGM where PGM datagrams are encapsulated inside UDP datagrams (the 'epgm' transport). The 'pgm' and 'epgm' transports can only be used with the 'ZMQ_PUB' and 'ZMQ_SUB' socket types. Further, PGM sockets are rate limited by default. For details, refer to the 'ZMQ_RATE', and 'ZMQ_RECOVERY_IVL' options documented in linkzmq:zmq_setsockopt[3]. CAUTION: The 'pgm' transport implementation requires access to raw IP sockets. Additional privileges may be required on some operating systems for this operation. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the 'epgm' transport instead which does not require any special privileges. ADDRESSING ---------- A 0MQ endpoint is a string consisting of a 'transport'`://` followed by an 'address'. The 'transport' specifies the underlying protocol to use. The 'address' specifies the transport-specific address to connect to. For the PGM transport, the transport is `pgm`, and for the EPGM protocol the transport is `epgm`. The meaning of the 'address' part is defined below. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a socket to a peer address using _zmq_connect()_ with the 'pgm' or 'epgm' transport, the 'endpoint' shall be interpreted as an 'interface' followed by a semicolon, followed by a 'multicast address', followed by a colon and a port number. An 'interface' may be specified by either of the following: * The interface name as defined by the operating system. * The primary IPv4 address assigned to the interface, in its numeric representation. NOTE: Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an 'interface'. The 'interface' part can be omitted, in that case the default one will be selected. A 'multicast address' is specified by an IPv4 multicast address in its numeric representation. WIRE FORMAT ----------- Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams. This stream of data consists of 0MQ messages encapsulated in 'frames' as described in linkzmq:zmq_tcp[7]. PGM datagram payload ~~~~~~~~~~~~~~~~~~~~ The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ: .... datagram = (offset data) offset = 2OCTET data = *OCTET .... In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message 'frame' in the datagram or containing the value `0xFFFF` if the datagram contains solely an intermediate part of a larger message. Note that offset specifies where the first message begins rather than the first message part. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet. The following diagram illustrates the layout of a single PGM datagram payload: .... +------------------+----------------------+ | offset (16 bits) | data | +------------------+----------------------+ .... The following diagram further illustrates how three example 0MQ frames are laid out in consecutive PGM datagram payloads: .... First datagram payload +--------------+-------------+---------------------+ | Frame offset | Frame 1 | Frame 2, part 1 | | 0x0000 | (Message 1) | (Message 2, part 1) | +--------------+-------------+---------------------+ Second datagram payload +--------------+---------------------+ | Frame offset | Frame 2, part 2 | | 0xFFFF | (Message 2, part 2) | +--------------+---------------------+ Third datagram payload +--------------+----------------------------+-------------+ | Frame offset | Frame 2, final 8 bytes | Frame 3 | | 0x0008 | (Message 2, final 8 bytes) | (Message 3) | +--------------+----------------------------+-------------+ .... EXAMPLE ------- .Connecting a socket ---- // Connecting to the multicast address 239.192.1.1, port 5555, // using the first Ethernet network interface on Linux // and the Encapsulated PGM protocol rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555"); assert (rc == 0); // Connecting to the multicast address 239.192.1.1, port 5555, // using the network interface with the address 192.168.1.1 // and the standard PGM protocol rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_connect[3] linkzmq:zmq_setsockopt[3] linkzmq:zmq_tcp[7] linkzmq:zmq_ipc[7] linkzmq:zmq_inproc[7] linkzmq:zmq[7] AUTHORS ------- This page was written by the 0MQ community. To make a change please read the 0MQ Contribution Policy at . zeromq3-4.0.4+dfsg.orig/foreign/0000755000175000017500000000000012307431206015362 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/foreign/openpgm/0000755000175000017500000000000012311315334017025 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/foreign/openpgm/Makefile.in0000644000175000017500000004302412307430721021100 0ustar ghedoghedo# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = foreign/openpgm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = $(pgm_subdir) DIST_SUBDIRS = all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign foreign/openpgm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign foreign/openpgm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Override Automake's installation targets with the command ":" that does nothing. install:; @: install-exec:; @: install-data:; @: uninstall:; @: dist:; @; # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq3-4.0.4+dfsg.orig/foreign/openpgm/Makefile.am0000644000175000017500000000030412240736636021073 0ustar ghedoghedoSUBDIRS = $(pgm_subdir) DIST_SUBDIRS = # Override Automake's installation targets with the command ":" that does nothing. install:; @: install-exec:; @: install-data:; @: uninstall:; @: dist:; @; zeromq3-4.0.4+dfsg.orig/AUTHORS0000644000175000017500000001036512240736636015021 0ustar ghedoghedoCorporate Contributors ====================== Copyright (c) 2007-2013 iMatix Corporation Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2010-2011 Miru Limited Copyright (c) 2011 VMware, Inc. Copyright (c) 2012 Spotify AB Individual Contributors ======================= AJ Lewis Alexej Lotz Andrew Thompson Asko Kauppi Attila Mark Barak Amar Ben Gray Bernd Prager Bernd Melchers Bob Beaty Brandon Carpenter Brian Buchanan Brett Cameron Burak Arslan Carl Clemens Chia-liang Kao Chris Rempel Chris Wong Christian Gudrian Christian Kamm Chuck Remes Conrad D. Steenberg Dhammika Pathirana Dhruva Krishnamurthy Dirk O. Kaar Douglas Creager Erich Heine Erik Rigtorp Fabien Ninoles Frank Denis George Neill Gerard Toonstra Ghislain Putois Gonzalo Diethelm Guido Goldstein Ian Barber Ilja Golshtein Ivo Danihelka Jacob Rideout Joe Thornber Jon Dyte Kamil Shakirov Ken Steele Marc Rossi Martin Hurton Martin Lucina Martin Pales Martin Sustrik Matus Hamorsky Max Wolf McClain Looney Michael Compton Mika Fischer Mikael Helbo Kjaer Mikko Koppanen Min Ragan-Kelley Neale Ferguson Nir Soffer Paul Betts Paul Colomiets Pavel Gushcha Pavol Malosek Perry Kundert Peter Bourgon Philip Kovacs Pieter Hintjens Piotr Trojanek Richard Newton Robert G. Jakabosky Sebastian Otaegui Stefan Radomski Steven McCoy Stuart Webster Tamara Kustarova Taras Shpot Tero Marttila Terry Wilson Thijs Terlouw Toralf Wittner Tore Halvorsen Vitaly Mayatskikh Lourens Naudé Hardeep Singh Credits ======= Aamir Mohammad Adrian von Bidder Aleksey Yeschenko Alessio Spadaro Alexander Majorov Anh Vu Bernd Schumacher Brian Granger Carsten Dinkelmann David Bahi Dirk Eddelbuettel Evgueny Khartchenko Frank Vanden Berghen Ian Barber John Apps Markus Fischer Matt Muggeridge Michael Santy Oleg Sevostyanov Paulo Henrique Silva Peter Busser Peter Lemenkov Robert Zhang Toralf Wittner Zed Shaw zeromq3-4.0.4+dfsg.orig/aclocal.m40000644000175000017500000012672412307430715015611 0ustar ghedoghedo# generated automatically by aclocal 1.11.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2009, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # (`yes' being less verbose, `no' or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [ --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0')]) case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few `make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using `$V' instead of `$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/libtool.m4]) m4_include([config/ltoptions.m4]) m4_include([config/ltsugar.m4]) m4_include([config/ltversion.m4]) m4_include([config/lt~obsolete.m4]) m4_include([acinclude.m4]) zeromq3-4.0.4+dfsg.orig/configure0000755000175000017500000252554612307430716015670 0ustar ghedoghedo#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for zeromq 4.0.4. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: zeromq-dev@lists.zeromq.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='zeromq' PACKAGE_TARNAME='zeromq' PACKAGE_VERSION='4.0.4' PACKAGE_STRING='zeromq 4.0.4' PACKAGE_BUGREPORT='zeromq-dev@lists.zeromq.org' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS LIBZMQ_EXTRA_LDFLAGS LIBZMQ_EXTRA_CXXFLAGS LIBZMQ_EXTRA_CFLAGS ON_LINUX_FALSE ON_LINUX_TRUE ON_ANDROID_FALSE ON_ANDROID_TRUE ON_MINGW_FALSE ON_MINGW_TRUE BUILD_PGM_FALSE BUILD_PGM_TRUE pgm_basename OpenPGM_LIBS OpenPGM_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG subdirs pgm_srcdir pgm_subdir INSTALL_MAN_FALSE INSTALL_MAN_TRUE BUILD_DOC_FALSE BUILD_DOC_TRUE libzmq_have_xmlto libzmq_have_asciidoc CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP LIBTOOL OBJDUMP DLLTOOL AS host_os host_vendor host_cpu host build_os build_vendor build_cpu build ASCIIDOC XMLTO SED am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LTVER AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_static enable_shared with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_debug with_gcov with_libsodium with_libsodium_include_dir with_libsodium_lib_dir with_documentation with_poller enable_eventfd with_pgm with_system_pgm ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC XMLTO ASCIIDOC CPP CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR OpenPGM_CFLAGS OpenPGM_LIBS' ac_subdirs_all='foreign/openpgm/build-staging/openpgm/pgm/' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures zeromq 4.0.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/zeromq] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of zeromq 4.0.4:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Enable debugging information [default=no] --disable-eventfd disable eventfd [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gcov=yes/no With GCC Code Coverage reporting. --with-libsodium Specify libsodium prefix --with-libsodium-include-dir Specify libsodium include prefix --with-libsodium-lib-dir Specify libsodium library prefix --without-documentation disable documentation build even if asciidoc and xmlto are present [default=no] --with-poller choose polling system manually. valid values are kqueue, epoll, devpoll, poll or select [default=autodetect] --with-pgm build libzmq with PGM extension [default=no] --with-system-pgm build libzmq with PGM extension. Requires pkg-config [default=no] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags XMLTO Path to xmlto command ASCIIDOC Path to asciidoc command CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path OpenPGM_CFLAGS C compiler flags for OpenPGM, overriding pkg-config OpenPGM_LIBS linker flags for OpenPGM, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF zeromq configure 4.0.4 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------ ## ## Report this to zeromq-dev@lists.zeromq.org ## ## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_cxx_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_type # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------ ## ## Report this to zeromq-dev@lists.zeromq.org ## ## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by zeromq $as_me 4.0.4, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers src/platform.hpp" am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='zeromq' VERSION='4.0.4' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 $as_echo_n "checking how to create a ustar tar archive... " >&6; } # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' _am_tools=${am_cv_prog_tar_ustar-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' am__tar_='find "$tardir" -print | cpio -o -H ustar -L' am__untar='cpio -i -H ustar -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_ustar}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_ustar+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' # This lets us use PACKAGE_VERSION in Makefiles # Libtool -version-info (ABI version) # # Don't change this unless you know exactly what you're doing and have read and # understand: # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # # Changes: # # ZeroMQ versions prior to 2.1.0 use 0:0:0 (undefined) # ZeroMQ versions 2.1.x: 1:0:0 (ABI version 1) # ZeroMQ version 3.0: 2:0:0 (ABI version 2) # ZeroMQ version 3.1: 3:0:0 (ABI version 3) # ZeroMQ version 4.0: 4:0:1 (ABI version 4) # # libzmq -version-info current:revision:age LTVER="4:0:1" # Take a copy of original flags ZMQ_ORIG_CFLAGS="${CFLAGS:-none}" ZMQ_ORIG_CPPFLAGS="${CPPFLAGS:-none}" ZMQ_ORIG_CXXFLAGS="${CXXFLAGS:-none}" # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done # Libtool configuration for different targets. See acinclude.m4 # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XMLTO+:} false; then : $as_echo_n "(cached) " >&6 else case $XMLTO in [\\/]* | ?:[\\/]*) ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi XMLTO=$ac_cv_path_XMLTO if test -n "$XMLTO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 $as_echo "$XMLTO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "asciidoc", so it can be a program name with args. set dummy asciidoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ASCIIDOC+:} false; then : $as_echo_n "(cached) " >&6 else case $ASCIIDOC in [\\/]* | ?:[\\/]*) ac_cv_path_ASCIIDOC="$ASCIIDOC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ASCIIDOC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ASCIIDOC=$ac_cv_path_ASCIIDOC if test -n "$ASCIIDOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOC" >&5 $as_echo "$ASCIIDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { # Libtool configuration for different targets case "${host_os}" in *mingw32*|*cygwin*) # Disable static build by default # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi ;; *) # Everything else with static enabled # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi ;; esac } enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Check whether to build a with debug symbols { # For that the compiler works and try to come up with the type ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { # Test that compiler for the current language actually works { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } if ${libzmq_cv_c_compiler_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_c_compiler_works="yes" ; else libzmq_cv_c_compiler_works="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_compiler_works" >&5 $as_echo "$libzmq_cv_c_compiler_works" >&6; } if test "x$libzmq_cv_c_compiler_works" != "xyes"; then as_fn_error $? "Unable to find a working C compiler" "$LINENO" 5 fi } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C compiler" >&5 $as_echo_n "checking whether we are using Intel C compiler... " >&6; } if ${libzmq_cv_c_intel_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __INTEL_COMPILER error if not ICC #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libzmq_cv_c_intel_compiler="yes" ; else libzmq_cv_c_intel_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_intel_compiler" >&5 $as_echo "$libzmq_cv_c_intel_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Sun Studio C compiler" >&5 $as_echo_n "checking whether we are using Sun Studio C compiler... " >&6; } if ${libzmq_cv_c_sun_studio_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C) error if not sun studio #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libzmq_cv_c_sun_studio_compiler="yes" ; else libzmq_cv_c_sun_studio_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_sun_studio_compiler" >&5 $as_echo "$libzmq_cv_c_sun_studio_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using clang C compiler" >&5 $as_echo_n "checking whether we are using clang C compiler... " >&6; } if ${libzmq_cv_c_clang_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __clang__ error if not clang #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libzmq_cv_c_clang_compiler="yes" ; else libzmq_cv_c_clang_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_clang_compiler" >&5 $as_echo "$libzmq_cv_c_clang_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gcc >= 4 C compiler" >&5 $as_echo_n "checking whether we are using gcc >= 4 C compiler... " >&6; } if ${libzmq_cv_c_gcc4_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if (!defined __GNUC__ || __GNUC__ < 4) error if not gcc4 or higher #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libzmq_cv_c_gcc4_compiler="yes" ; else libzmq_cv_c_gcc4_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_gcc4_compiler" >&5 $as_echo "$libzmq_cv_c_gcc4_compiler" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { # Test that compiler for the current language actually works { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } if ${libzmq_cv_cxx_compiler_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : libzmq_cv_cxx_compiler_works="yes" ; else libzmq_cv_cxx_compiler_works="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_compiler_works" >&5 $as_echo "$libzmq_cv_cxx_compiler_works" >&6; } if test "x$libzmq_cv_cxx_compiler_works" != "xyes"; then as_fn_error $? "Unable to find a working C++ compiler" "$LINENO" 5 fi } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C++ compiler" >&5 $as_echo_n "checking whether we are using Intel C++ compiler... " >&6; } if ${libzmq_cv_cxx_intel_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __INTEL_COMPILER error if not ICC #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : libzmq_cv_cxx_intel_compiler="yes" ; else libzmq_cv_cxx_intel_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_intel_compiler" >&5 $as_echo "$libzmq_cv_cxx_intel_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Sun Studio C++ compiler" >&5 $as_echo_n "checking whether we are using Sun Studio C++ compiler... " >&6; } if ${libzmq_cv_cxx_sun_studio_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C) error if not sun studio #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : libzmq_cv_cxx_sun_studio_compiler="yes" ; else libzmq_cv_cxx_sun_studio_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_sun_studio_compiler" >&5 $as_echo "$libzmq_cv_cxx_sun_studio_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using clang C++ compiler" >&5 $as_echo_n "checking whether we are using clang C++ compiler... " >&6; } if ${libzmq_cv_cxx_clang_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __clang__ error if not clang #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : libzmq_cv_cxx_clang_compiler="yes" ; else libzmq_cv_cxx_clang_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_clang_compiler" >&5 $as_echo "$libzmq_cv_cxx_clang_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gcc >= 4 C++ compiler" >&5 $as_echo_n "checking whether we are using gcc >= 4 C++ compiler... " >&6; } if ${libzmq_cv_cxx_gcc4_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if (!defined __GNUC__ || __GNUC__ < 4) error if not gcc4 or higher #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : libzmq_cv_cxx_gcc4_compiler="yes" ; else libzmq_cv_cxx_gcc4_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_gcc4_compiler" >&5 $as_echo "$libzmq_cv_cxx_gcc4_compiler" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Set GCC and GXX variables correctly if test "x$GCC" = "xyes"; then if test "xyes" = "x$libzmq_cv_c_intel_compiler"; then GCC="no" fi fi if test "x$GXX" = "xyes"; then if test "xyes" = "x$libzmq_cv_cxx_intel_compiler"; then GXX="no" fi fi } { # Require compiler specifics # This flag is checked also in # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging information" >&5 $as_echo_n "checking whether to enable debugging information... " >&6; } if test "x$enable_debug" = "xyes"; then # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ "x$libzmq_cv_c_clang_compiler" = "xyes"; then CFLAGS="-g -O0 " elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then CFLAGS="-g0 " fi # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then CPPFLAGS="-g -O0 " CXXFLAGS="-g -O0 " # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then CPPFLAGS="-g0 " CXXFLAGS="-g0 " fi if test "x$ZMQ_ORIG_CFLAGS" != "xnone"; then CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" fi if test "x$ZMQ_ORIG_CPPFLAGS" != "xnone"; then CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" fi if test "x$ZMQ_ORIG_CXXFLAGS" != "xnone"; then CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi } # Check wheter to enable code coverage { # Require compiler specifics # Check whether --with-gcov was given. if test "${with_gcov+set}" = set; then : withval=$with_gcov; ZMQ_GCOV="$withval" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable code coverage" >&5 $as_echo_n "checking whether to enable code coverage... " >&6; } if test "x$ZMQ_GCOV" = "xyes"; then if test "x$GXX" != "xyes"; then as_fn_error $? "--with-gcov=yes works only with GCC" "$LINENO" 5 fi CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" fi CPPFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" fi CXXFLAGS="-fprofile-arcs" if test "x${ZMQ_ORIG_CXXFLAGS}" != "xnone"; then CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" fi LIBS="-lgcov ${LIBS}" fi if test "x$ZMQ_GCOV" = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } # Allow libsodium to be installed in a custom path: # Check whether --with-libsodium was given. if test "${with_libsodium+set}" = set; then : withval=$with_libsodium; zmq_search_libsodium="yes" fi if test "x$zmq_search_libsodium" = "xyes"; then if test -r "${with_libsodium}/include/sodium.h"; then CPPFLAGS="-I${with_libsodium}/include ${CPPFLAGS}" LDFLAGS="-L${with_libsodium}/lib ${LDFLAGS}" fi fi # Check whether --with-libsodium-include-dir was given. if test "${with_libsodium_include_dir+set}" = set; then : withval=$with_libsodium_include_dir; zmq_search_libsodium_include="yes" fi if test "x$zmq_search_libsodium_include" = "xyes"; then if test -r "${with_libsodium_include_dir}/sodium.h"; then CPPFLAGS="-I${with_libsodium_include_dir}/include ${CPPFLAGS}" fi fi # Check whether --with-libsodium_lib_dir was given. if test "${with_libsodium_lib_dir+set}" = set; then : withval=$with_libsodium_lib_dir; zmq_search_libsodium_lib="yes" fi if test "x$zmq_search_libsodium_lib" = "xyes"; then if test -r "${with_libsodium_lib_dir}/libsodium.{a|so|dylib}"; then LDFLAGS="-L${with_libsodium}/lib ${LDFLAGS}" fi fi # Set pedantic libzmq_pedantic="yes" # By default compiling with -Werror except OSX. libzmq_werror="yes" # By default use DSO visibility libzmq_dso_visibility="yes" # Platform specific checks libzmq_on_mingw32="no" libzmq_on_android="no" libzmq_on_linux="no" # Set some default features required by 0MQ code. CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS" # For host type checks # OS-specific tests case "${host_os}" in *linux*) # Define on Linux to enable all library features. Define if using a gnu compiler if test "x$GXX" = "xyes"; then CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" fi $as_echo "#define ZMQ_HAVE_LINUX 1" >>confdefs.h libzmq_on_linux="yes" case "${host_os}" in *android*) $as_echo "#define ZMQ_HAVE_ANDROID 1" >>confdefs.h libzmq_on_android="yes" ;; esac ;; *solaris*) # Define on Solaris to enable all library features CPPFLAGS="-D_PTHREADS $CPPFLAGS" $as_echo "#define ZMQ_HAVE_SOLARIS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether atomic operations can be used" >&5 $as_echo_n "checking whether atomic operations can be used... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { uint32_t value; atomic_cas_32 (&value, 0, 0); return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : solaris_has_atomic=yes else solaris_has_atomic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $solaris_has_atomic" >&5 $as_echo "$solaris_has_atomic" >&6; } # Solaris 8 does not have atomic operations exported to user space. if test "x$solaris_has_atomic" = "xno"; then $as_echo "#define ZMQ_FORCE_MUTEXES 1" >>confdefs.h fi # ssp library is required for libsodium on Solaris-like systems LDFLAGS="-lssp $LDFLAGS" CPPFLAGS="$CPPFLAGS -Wno-long-long" ;; *freebsd*) # Define on FreeBSD to enable all library features CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS" $as_echo "#define ZMQ_HAVE_FREEBSD 1" >>confdefs.h ;; *darwin*) # Define on Darwin to enable all library features CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS" libzmq_pedantic="no" libzmq_werror="no" $as_echo "#define ZMQ_HAVE_OSX 1" >>confdefs.h ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -Wno-uninitialized" >&5 $as_echo_n "checking whether C++ compiler supports -Wno-uninitialized... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-uninitialized" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -Wno-uninitialized" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval libzmq_cv_cxx_supports_flag__Wno_uninitialized="no" else eval libzmq_cv_cxx_supports_flag__Wno_uninitialized="yes" fi else eval libzmq_cv_cxx_supports_flag__Wno_uninitialized="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$libzmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } case "xcxx" in xc) if eval test x$libzmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : CFLAGS="-Wno-uninitialized $CFLAGS"; fi ;; xcxx) if eval test x$libzmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : CPPFLAGS="-Wno-uninitialized $CPPFLAGS"; fi ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; *netbsd*) # Define on NetBSD to enable all library features CPPFLAGS="-D_NETBSD_SOURCE $CPPFLAGS" $as_echo "#define ZMQ_HAVE_NETBSD 1" >>confdefs.h # NetBSD 5.0 and newer provides atomic operations but we can # only use these on systems where PR #42842 has been fixed so # we must try and link a test program using C++. libzmq_netbsd_has_atomic=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether atomic operations can be used" >&5 $as_echo_n "checking whether atomic operations can be used... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { uint32_t value; atomic_cas_32 (&value, 0, 0); return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : libzmq_netbsd_has_atomic=yes else libzmq_netbsd_has_atomic=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_netbsd_has_atomic" >&5 $as_echo "$libzmq_netbsd_has_atomic" >&6; } if test "x$libzmq_netbsd_has_atomic" = "xno"; then $as_echo "#define ZMQ_FORCE_MUTEXES 1" >>confdefs.h fi ;; *openbsd*) # Define on OpenBSD to enable all library features CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS" $as_echo "#define ZMQ_HAVE_OPENBSD 1" >>confdefs.h ;; *nto-qnx*) libzmq_pedantic="no" $as_echo "#define ZMQ_HAVE_QNXNTO 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi ;; *aix*) $as_echo "#define ZMQ_HAVE_AIX 1" >>confdefs.h ;; *hpux*) # Define on HP-UX to enable all library features CPPFLAGS="-D_POSIX_C_SOURCE=200112L $CPPFLAGS" $as_echo "#define ZMQ_HAVE_HPUX 1" >>confdefs.h { { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -Ae" >&5 $as_echo_n "checking whether C compiler supports -Ae... " >&6; } libzmq_cv_c_werror_flag_save=$ac_c_werror_flag ac_c_werror_flag="yes" case "xc" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Ae" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -Ae" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval libzmq_cv_c_supports_flag__Ae="no" else eval libzmq_cv_c_supports_flag__Ae="yes" fi else eval libzmq_cv_c_supports_flag__Ae="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xc" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_c_werror_flag=$libzmq_cv_c_werror_flag_save # Call the action as the flags are restored if eval test x$libzmq_cv_c_supports_flag__Ae = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } case "xc" in xc) if eval test x$libzmq_cv_c_supports_flag__Ae = "xyes"; then : CFLAGS="-Ae $CFLAGS"; fi ;; xcxx) if eval test x$libzmq_cv_c_supports_flag__Ae = "xyes"; then : CPPFLAGS="-Ae $CPPFLAGS"; fi ;; esac } for ac_func in gethrtime do : ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETHRTIME 1 _ACEOF fi done ;; *mingw32*) $as_echo "#define ZMQ_HAVE_WINDOWS 1" >>confdefs.h $as_echo "#define ZMQ_HAVE_MINGW32 1" >>confdefs.h for ac_header in windows.h do : ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 $as_echo_n "checking for main in -lws2_32... " >&6; } if ${ac_cv_lib_ws2_32_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lws2_32 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ws2_32_main=yes else ac_cv_lib_ws2_32_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 $as_echo "$ac_cv_lib_ws2_32_main" >&6; } if test "x$ac_cv_lib_ws2_32_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBWS2_32 1 _ACEOF LIBS="-lws2_32 $LIBS" else as_fn_error $? "cannot link with ws2_32.dll." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpcrt4" >&5 $as_echo_n "checking for main in -lrpcrt4... " >&6; } if ${ac_cv_lib_rpcrt4_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrpcrt4 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rpcrt4_main=yes else ac_cv_lib_rpcrt4_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpcrt4_main" >&5 $as_echo "$ac_cv_lib_rpcrt4_main" >&6; } if test "x$ac_cv_lib_rpcrt4_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRPCRT4 1 _ACEOF LIBS="-lrpcrt4 $LIBS" else as_fn_error $? "cannot link with rpcrt4.dll." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -liphlpapi" >&5 $as_echo_n "checking for main in -liphlpapi... " >&6; } if ${ac_cv_lib_iphlpapi_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-liphlpapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_iphlpapi_main=yes else ac_cv_lib_iphlpapi_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iphlpapi_main" >&5 $as_echo "$ac_cv_lib_iphlpapi_main" >&6; } if test "x$ac_cv_lib_iphlpapi_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBIPHLPAPI 1 _ACEOF LIBS="-liphlpapi $LIBS" else as_fn_error $? "cannot link with iphlpapi.dll." "$LINENO" 5 fi # mingw32 defines __int64_t as long long ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -Wno-long-long" >&5 $as_echo_n "checking whether C++ compiler supports -Wno-long-long... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-long-long" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -Wno-long-long" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval libzmq_cv_cxx_supports_flag__Wno_long_long="no" else eval libzmq_cv_cxx_supports_flag__Wno_long_long="yes" fi else eval libzmq_cv_cxx_supports_flag__Wno_long_long="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$libzmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } case "xcxx" in xc) if eval test x$libzmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : CFLAGS="-Wno-long-long $CFLAGS"; fi ;; xcxx) if eval test x$libzmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : CPPFLAGS="-Wno-long-long $CPPFLAGS"; fi ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu libzmq_on_mingw32="yes" libzmq_dso_visibility="no" if test "x$enable_static" = "xyes"; then as_fn_error $? "Building static libraries is not supported under MinGW32" "$LINENO" 5 fi ;; *cygwin*) # Define on Cygwin to enable all library features CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" $as_echo "#define ZMQ_HAVE_CYGWIN 1" >>confdefs.h if test "x$enable_static" = "xyes"; then as_fn_error $? "Building static libraries is not supported under Cygwin" "$LINENO" 5 fi ;; *) as_fn_error $? "unsupported system: ${host_os}." "$LINENO" 5 ;; esac # Checks for libraries { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sodium_init in -lsodium" >&5 $as_echo_n "checking for sodium_init in -lsodium... " >&6; } if ${ac_cv_lib_sodium_sodium_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsodium $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sodium_init (); int main () { return sodium_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sodium_sodium_init=yes else ac_cv_lib_sodium_sodium_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sodium_sodium_init" >&5 $as_echo "$ac_cv_lib_sodium_sodium_init" >&6; } if test "x$ac_cv_lib_sodium_sodium_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSODIUM 1 _ACEOF LIBS="-lsodium $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libsodium is needed for CURVE security" >&5 $as_echo "$as_me: WARNING: libsodium is needed for CURVE security" >&2;} fi # # Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec # if test "x$libzmq_dso_visibility" = "xyes"; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { libzmq_cv_cxx_visibility_flag="" if test "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_gcc4_compiler" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -fvisibility=hidden" >&5 $as_echo_n "checking whether C++ compiler supports -fvisibility=hidden... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -fvisibility=hidden" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_cxx_visibility_flag="-fvisibility=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -xldscope=hidden" >&5 $as_echo_n "checking whether C++ compiler supports -xldscope=hidden... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -xldscope=hidden" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -xldscope=hidden" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_cxx_visibility_flag="-xldscope=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports dso visibility" >&5 $as_echo_n "checking whether C++ compiler supports dso visibility... " >&6; } if test "x$libzmq_cv_cxx_visibility_flag" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; LIBZMQ_EXTRA_CXXFLAGS="$libzmq_cv_cxx_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # CPU-specific optimizations case "${host_cpu}" in *sparc*) ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -mcpu=v9" >&5 $as_echo_n "checking whether C++ compiler supports -mcpu=v9... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mcpu=v9" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -mcpu=v9" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } case "xcxx" in xc) if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : CFLAGS="-mcpu=v9 $CFLAGS"; fi ;; xcxx) if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : CPPFLAGS="-mcpu=v9 $CPPFLAGS"; fi ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; *) ;; esac # Check whether to build docs / install man pages { # Allow user to disable doc build # Check whether --with-documentation was given. if test "${with_documentation+set}" = set; then : withval=$with_documentation; fi if test "x$with_documentation" = "xno"; then libzmq_build_doc="no" libzmq_install_man="no" else # Determine whether or not documentation should be built and installed. libzmq_build_doc="yes" libzmq_install_man="yes" # Check for asciidoc and xmlto and don't build the docs if these are not installed. # Extract the first word of "asciidoc", so it can be a program name with args. set dummy asciidoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_libzmq_have_asciidoc+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$libzmq_have_asciidoc"; then ac_cv_prog_libzmq_have_asciidoc="$libzmq_have_asciidoc" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_libzmq_have_asciidoc="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_libzmq_have_asciidoc" && ac_cv_prog_libzmq_have_asciidoc="no" fi fi libzmq_have_asciidoc=$ac_cv_prog_libzmq_have_asciidoc if test -n "$libzmq_have_asciidoc"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_have_asciidoc" >&5 $as_echo "$libzmq_have_asciidoc" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_libzmq_have_xmlto+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$libzmq_have_xmlto"; then ac_cv_prog_libzmq_have_xmlto="$libzmq_have_xmlto" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_libzmq_have_xmlto="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_libzmq_have_xmlto" && ac_cv_prog_libzmq_have_xmlto="no" fi fi libzmq_have_xmlto=$ac_cv_prog_libzmq_have_xmlto if test -n "$libzmq_have_xmlto"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_have_xmlto" >&5 $as_echo "$libzmq_have_xmlto" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$libzmq_have_asciidoc" = "xno" -o "x$libzmq_have_xmlto" = "xno"; then libzmq_build_doc="no" # Tarballs built with 'make dist' ship with prebuilt documentation. if ! test -f doc/zmq.7; then libzmq_install_man="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed." >&5 $as_echo "$as_me: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Documentation will not be built and manual pages will not be installed." >&5 $as_echo "$as_me: WARNING: Documentation will not be built and manual pages will not be installed." >&2;} fi fi # Do not install man pages if on mingw if test "x$libzmq_on_mingw32" = "xyes"; then libzmq_install_man="no" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5 $as_echo_n "checking whether to build documentation... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_build_doc" >&5 $as_echo "$libzmq_build_doc" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install manpages" >&5 $as_echo_n "checking whether to install manpages... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_install_man" >&5 $as_echo "$libzmq_install_man" >&6; } if test "x$libzmq_build_doc" = "xyes"; then BUILD_DOC_TRUE= BUILD_DOC_FALSE='#' else BUILD_DOC_TRUE='#' BUILD_DOC_FALSE= fi if test "x$libzmq_install_man" = "xyes"; then INSTALL_MAN_TRUE= INSTALL_MAN_FALSE='#' else INSTALL_MAN_TRUE='#' INSTALL_MAN_FALSE= fi } # Check polling system { # Allow user to disable doc build # Check whether --with-poller was given. if test "${with_poller+set}" = set; then : withval=$with_poller; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable polling system" >&5 $as_echo_n "checking for suitable polling system... " >&6; } case "${with_poller}" in kqueue|epoll|devpoll|poll|select) # User has chosen polling system libzmq_cv_poller="${with_poller}" ;; *) # try to find suitable polling system. the order of testing is: # kqueue -> epoll -> devpoll -> poll -> select for subsystem in kqueue epoll devpoll poll select; do case "${subsystem}" in kqueue) { cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { struct kevent t_kev; kqueue(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_kqueue="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_kqueue="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext } ;; epoll) { if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct epoll_event t_ev; epoll_create(10); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_epoll="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_epoll="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct epoll_event t_ev; int r; r = epoll_create(10); return(r < 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : libzmq_cv_have_poller_epoll="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_epoll="no" ; fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi } ;; devpoll) { cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct pollfd t_devpoll; int fd = open("/dev/poll", O_RDWR); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_devpoll="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_devpoll="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext } ;; poll) { cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct pollfd t_poll; poll(&t_poll, 1, 1); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_poll="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_poll="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext } ;; select) { cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef ZMQ_HAVE_WINDOWS #include "winsock2.h" #elif defined ZMQ_HAVE_OPENVMS #include #include #else #include #endif int main () { fd_set t_rfds; struct timeval tv; FD_ZERO(&t_rfds); FD_SET(0, &t_rfds); tv.tv_sec = 5; tv.tv_usec = 0; select(1, &t_rfds, NULL, NULL, &tv); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_select="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_select="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext } ;; esac if test "x${libzmq_cv_poller}" != "x"; then break fi done ;; esac libzmq_cv_poller_flag=`echo "ZMQ_FORCE_${libzmq_cv_poller}" | tr a-z A-Z` if test "x${libzmq_cv_poller}" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $libzmq_cv_poller" >&5 $as_echo "using $libzmq_cv_poller" >&6; } ; CPPFLAGS="${CPPFLAGS} -D${libzmq_cv_poller_flag}" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no suitable polling system found" >&5 $as_echo "no suitable polling system found" >&6; } ; as_fn_error $? "Unable to continue without polling system" "$LINENO" 5 fi } # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in errno.h arpa/inet.h netinet/tcp.h netinet/in.h stddef.h \ stdlib.h string.h sys/socket.h sys/time.h time.h unistd.h limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check if we have ifaddrs.h header file. for ac_header in ifaddrs.h do : ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" if test "x$ac_cv_header_ifaddrs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IFADDRS_H 1 _ACEOF $as_echo "#define ZMQ_HAVE_IFADDRS 1" >>confdefs.h fi done # Check if we have sys/uio.h header file. for ac_header in sys/uio.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default" if test "x$ac_cv_header_sys_uio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_UIO_H 1 _ACEOF $as_echo "#define ZMQ_HAVE_UIO 1" >>confdefs.h fi done # Force not to use eventfd # Check whether --enable-eventfd was given. if test "${enable_eventfd+set}" = set; then : enableval=$enable_eventfd; zmq_disable_eventfd=yes else zmq_disable_eventfd=no fi if test "x$zmq_disable_eventfd" != "xyes"; then # Check if we have eventfd.h header file. for ac_header in sys/eventfd.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/eventfd.h" "ac_cv_header_sys_eventfd_h" "$ac_includes_default" if test "x$ac_cv_header_sys_eventfd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_EVENTFD_H 1 _ACEOF $as_echo "#define ZMQ_HAVE_EVENTFD 1" >>confdefs.h fi done fi # Use c++ in subsequent tests ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_cxx_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # Checks for typedefs, structures, and compiler characteristics. if test "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then { libzmq_check_with_flag_save_CFLAGS="$CFLAGS" libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS -wd279" CPPFLAGS="$CPPFLAGS -wd279" # Execute the macro ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi CFLAGS="$libzmq_check_with_flag_save_CFLAGS" CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" } { libzmq_check_with_flag_save_CFLAGS="$CFLAGS" libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS -wd279" CPPFLAGS="$CPPFLAGS -wd279" # Execute the macro ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi CFLAGS="$libzmq_check_with_flag_save_CFLAGS" CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" } else ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { volatile int x; int * volatile y = (int *) 0; return !x && !y; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_volatile=yes else ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 $as_echo "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then $as_echo "#define volatile /**/" >>confdefs.h fi # PGM extension libzmq_pgm_ext="no" pgm_basename="libpgm-5.2.122~dfsg" # Check whether --with-pgm was given. if test "${with_pgm+set}" = set; then : withval=$with_pgm; with_pgm_ext=$withval else with_pgm_ext=no fi # build using system pgm # Check whether --with-system-pgm was given. if test "${with_system_pgm+set}" = set; then : withval=$with_system_pgm; with_system_pgm_ext=yes else with_system_pgm_ext=no fi if test "x$with_pgm_ext" != "xno" -a "x$with_system_pgm_ext" != "xno"; then as_fn_error $? "--with-pgm and --with-system-pgm cannot be specified together" "$LINENO" 5 fi if test "x$with_pgm_ext" != "xno"; then # This allows placing the tar.gz to foreign/openpgm # and using ./configure --with-pgm=libpgm-x.y.z if test "x$with_pgm_ext" != "xyes"; then pgm_basename="$with_pgm_ext" fi # Unpack libpgm { $as_echo "$as_me:${as_lineno-$LINENO}: Unpacking ${pgm_basename}.tar.gz" >&5 $as_echo "$as_me: Unpacking ${pgm_basename}.tar.gz" >&6;} libzmq_pwd=`pwd` cd foreign/openpgm if ! (gzip -dc "${pgm_basename}.tar.gz" || echo "failed") | ${am__untar}; then as_fn_error $? "cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file" "$LINENO" 5 fi cd "${libzmq_pwd}" if test -d foreign/openpgm/build-staging; then rm -rf foreign/openpgm/build-staging fi mv foreign/openpgm/${pgm_basename} foreign/openpgm/build-staging pgm_srcdir=foreign/openpgm/build-staging/openpgm/pgm if ! test -d foreign/openpgm/build-staging/openpgm/pgm/config; then mkdir foreign/openpgm/build-staging/openpgm/pgm/config fi # DSO symbol visibility for openpgm ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { libzmq_cv_c_visibility_flag="" if test "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ "x$libzmq_cv_c_clang_compiler" = "xyes" -o \ "x$libzmq_cv_c_gcc4_compiler" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -fvisibility=hidden" >&5 $as_echo_n "checking whether C compiler supports -fvisibility=hidden... " >&6; } libzmq_cv_c_werror_flag_save=$ac_c_werror_flag ac_c_werror_flag="yes" case "xc" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -fvisibility=hidden" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xc" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_c_werror_flag=$libzmq_cv_c_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_c_visibility_flag="-fvisibility=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -xldscope=hidden" >&5 $as_echo_n "checking whether C compiler supports -xldscope=hidden... " >&6; } libzmq_cv_c_werror_flag_save=$ac_c_werror_flag ac_c_werror_flag="yes" case "xc" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -xldscope=hidden" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -xldscope=hidden" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xc" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_c_werror_flag=$libzmq_cv_c_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_c_visibility_flag="-xldscope=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports dso visibility" >&5 $as_echo_n "checking whether C compiler supports dso visibility... " >&6; } if test "x$libzmq_cv_c_visibility_flag" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; ac_configure_args="CFLAGS='$libzmq_cv_c_visibility_flag' ${ac_configure_args}" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu pgm_subdir=build-staging/openpgm/pgm subdirs="$subdirs foreign/openpgm/build-staging/openpgm/pgm/" # Success! $as_echo "#define ZMQ_HAVE_OPENPGM 1" >>confdefs.h libzmq_pgm_ext="yes" fi # Build with system openpgm if test "x$with_system_pgm_ext" != "xno"; then have_pgm_system_library="no" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenPGM" >&5 $as_echo_n "checking for OpenPGM... " >&6; } if test -n "$OpenPGM_CFLAGS"; then pkg_cv_OpenPGM_CFLAGS="$OpenPGM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.2 >= 5.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "openpgm-5.2 >= 5.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OpenPGM_CFLAGS=`$PKG_CONFIG --cflags "openpgm-5.2 >= 5.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$OpenPGM_LIBS"; then pkg_cv_OpenPGM_LIBS="$OpenPGM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.2 >= 5.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "openpgm-5.2 >= 5.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OpenPGM_LIBS=`$PKG_CONFIG --libs "openpgm-5.2 >= 5.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then OpenPGM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openpgm-5.2 >= 5.2" 2>&1` else OpenPGM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openpgm-5.2 >= 5.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OpenPGM_PKG_ERRORS" >&5 pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenPGM" >&5 $as_echo_n "checking for OpenPGM... " >&6; } if test -n "$OpenPGM_CFLAGS"; then pkg_cv_OpenPGM_CFLAGS="$OpenPGM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.1 >= 5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "openpgm-5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OpenPGM_CFLAGS=`$PKG_CONFIG --cflags "openpgm-5.1 >= 5.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$OpenPGM_LIBS"; then pkg_cv_OpenPGM_LIBS="$OpenPGM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.1 >= 5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "openpgm-5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OpenPGM_LIBS=`$PKG_CONFIG --libs "openpgm-5.1 >= 5.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then OpenPGM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openpgm-5.1 >= 5.1" 2>&1` else OpenPGM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openpgm-5.1 >= 5.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OpenPGM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (openpgm-5.1 >= 5.1) were not met: $OpenPGM_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables OpenPGM_CFLAGS and OpenPGM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables OpenPGM_CFLAGS and OpenPGM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else OpenPGM_CFLAGS=$pkg_cv_OpenPGM_CFLAGS OpenPGM_LIBS=$pkg_cv_OpenPGM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_pgm_system_library="yes" fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenPGM" >&5 $as_echo_n "checking for OpenPGM... " >&6; } if test -n "$OpenPGM_CFLAGS"; then pkg_cv_OpenPGM_CFLAGS="$OpenPGM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.1 >= 5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "openpgm-5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OpenPGM_CFLAGS=`$PKG_CONFIG --cflags "openpgm-5.1 >= 5.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$OpenPGM_LIBS"; then pkg_cv_OpenPGM_LIBS="$OpenPGM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.1 >= 5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "openpgm-5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OpenPGM_LIBS=`$PKG_CONFIG --libs "openpgm-5.1 >= 5.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then OpenPGM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openpgm-5.1 >= 5.1" 2>&1` else OpenPGM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openpgm-5.1 >= 5.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OpenPGM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (openpgm-5.1 >= 5.1) were not met: $OpenPGM_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables OpenPGM_CFLAGS and OpenPGM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables OpenPGM_CFLAGS and OpenPGM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else OpenPGM_CFLAGS=$pkg_cv_OpenPGM_CFLAGS OpenPGM_LIBS=$pkg_cv_OpenPGM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_pgm_system_library="yes" fi else OpenPGM_CFLAGS=$pkg_cv_OpenPGM_CFLAGS OpenPGM_LIBS=$pkg_cv_OpenPGM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_pgm_system_library="yes" fi if test "x$have_pgm_system_library" = "xyes"; then $as_echo "#define ZMQ_HAVE_OPENPGM 1" >>confdefs.h LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS" LIBS="$OpenPGM_LIBS $LIBS" fi fi # Set -Wall, -Werror and -pedantic ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Check how to enable -Wall { { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable additional warnings for C++ compiler" >&5 $as_echo_n "checking how to enable additional warnings for C++ compiler... " >&6; } libzmq_cv_cxx_wall_flag="" # C compilers case "xcxx" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then libzmq_cv_cxx_wall_flag="-Wall" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_wall_flag="-v" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then libzmq_cv_cxx_wall_flag="-Wall" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_wall_flag="+w" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_cxx_wall_flag" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_wall_flag" >&5 $as_echo "$libzmq_cv_cxx_wall_flag" >&6; } CPPFLAGS="$libzmq_cv_cxx_wall_flag $CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi } if test "x$libzmq_werror" = "xyes" -a "x$libzmq_cv_cxx_sun_studio_compiler" != "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to turn warnings to errors in C++ compiler" >&5 $as_echo_n "checking how to turn warnings to errors in C++ compiler... " >&6; } libzmq_cv_cxx_werror_flag="" # C compilers case "xcxx" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then libzmq_cv_cxx_werror_flag="-Werror" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_werror_flag="-errwarn=%all" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then libzmq_cv_cxx_werror_flag="-Werror" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_werror_flag="-errwarn=%all" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_cxx_werror_flag" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_werror_flag" >&5 $as_echo "$libzmq_cv_cxx_werror_flag" >&6; } CPPFLAGS="$libzmq_cv_cxx_werror_flag $CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi } fi if test "x$libzmq_pedantic" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable strict standards compliance in C++ compiler" >&5 $as_echo_n "checking how to enable strict standards compliance in C++ compiler... " >&6; } libzmq_cv_cxx_strict_flag="" # C compilers case "xcxx" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-pedantic" elif test "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-strict-ansi" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-Xc" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-pedantic" elif test "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-strict-ansi" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-compat=5" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_cxx_strict_flag" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_strict_flag" >&5 $as_echo "$libzmq_cv_cxx_strict_flag" >&6; } CPPFLAGS="$libzmq_cv_cxx_strict_flag $CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "x$libzmq_pgm_ext" = "xyes"; then BUILD_PGM_TRUE= BUILD_PGM_FALSE='#' else BUILD_PGM_TRUE='#' BUILD_PGM_FALSE= fi if test "x$libzmq_on_mingw32" = "xyes"; then ON_MINGW_TRUE= ON_MINGW_FALSE='#' else ON_MINGW_TRUE='#' ON_MINGW_FALSE= fi if test "x$libzmq_on_android" = "xyes"; then ON_ANDROID_TRUE= ON_ANDROID_FALSE='#' else ON_ANDROID_TRUE='#' ON_ANDROID_FALSE= fi if test "x$libzmq_on_linux" = "xyes"; then ON_LINUX_TRUE= ON_LINUX_FALSE='#' else ON_LINUX_TRUE='#' ON_LINUX_FALSE= fi # Checks for library functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in perror gettimeofday clock_gettime memset socket getifaddrs freeifaddrs fork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in alloca.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default" if test "x$ac_cv_header_alloca_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi done { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SOCK_CLOEXEC is supported" >&5 $as_echo_n "checking whether SOCK_CLOEXEC is supported... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: not during cross-compile" >&5 $as_echo "not during cross-compile" >&6; } ; libzmq_cv_sock_cloexec="no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* SOCK_CLOEXEC test */ #include #include int main (int argc, char *argv []) { int s = socket (PF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); return (s == -1); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_sock_cloexec="yes" ; $as_echo "#define ZMQ_HAVE_SOCK_CLOEXEC 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; libzmq_cv_sock_cloexec="no" ; fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi } # TCP keep-alives Checks. { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SO_KEEPALIVE is supported" >&5 $as_echo_n "checking whether SO_KEEPALIVE is supported... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: not during cross-compile" >&5 $as_echo "not during cross-compile" >&6; } ; libzmq_cv_so_keepalive="no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* SO_KEEPALIVE test */ #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) ); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_so_keepalive="yes" ; $as_echo "#define ZMQ_HAVE_SO_KEEPALIVE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; libzmq_cv_so_keepalive="no" ; fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi } { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TCP_KEEPCNT is supported" >&5 $as_echo_n "checking whether TCP_KEEPCNT is supported... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: not during cross-compile" >&5 $as_echo "not during cross-compile" >&6; } ; libzmq_cv_tcp_keepcnt="no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* TCP_KEEPCNT test */ #include #include #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) || ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPCNT, (char*) &opt, sizeof (int))) == -1) ); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_tcp_keepcnt="yes" ; $as_echo "#define ZMQ_HAVE_TCP_KEEPCNT 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; libzmq_cv_tcp_keepcnt="no" ; fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi } { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TCP_KEEPIDLE is supported" >&5 $as_echo_n "checking whether TCP_KEEPIDLE is supported... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: not during cross-compile" >&5 $as_echo "not during cross-compile" >&6; } ; libzmq_cv_tcp_keepidle="no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* TCP_KEEPIDLE test */ #include #include #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) || ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPIDLE, (char*) &opt, sizeof (int))) == -1) ); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_tcp_keepidle="yes" ; $as_echo "#define ZMQ_HAVE_TCP_KEEPIDLE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; libzmq_cv_tcp_keepidle="no" ; fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi } { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TCP_KEEPINTVL is supported" >&5 $as_echo_n "checking whether TCP_KEEPINTVL is supported... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: not during cross-compile" >&5 $as_echo "not during cross-compile" >&6; } ; libzmq_cv_tcp_keepintvl="no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* TCP_KEEPINTVL test */ #include #include #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) || ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPINTVL, (char*) &opt, sizeof (int))) == -1) ); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_tcp_keepintvl="yes" ; $as_echo "#define ZMQ_HAVE_TCP_KEEPINTVL 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; libzmq_cv_tcp_keepintvl="no" ; fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi } { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TCP_KEEPALIVE is supported" >&5 $as_echo_n "checking whether TCP_KEEPALIVE is supported... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: not during cross-compile" >&5 $as_echo "not during cross-compile" >&6; } ; libzmq_cv_tcp_keepalive="no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* TCP_KEEPALIVE test */ #include #include #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) || ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) ); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_tcp_keepalive="yes" ; $as_echo "#define ZMQ_HAVE_TCP_KEEPALIVE 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; libzmq_cv_tcp_keepalive="no" ; fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi } # Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS ac_config_files="$ac_config_files Makefile src/Makefile src/libzmq.pc doc/Makefile perf/Makefile tests/Makefile tools/Makefile builds/msvc/Makefile foreign/openpgm/Makefile builds/redhat/zeromq.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then as_fn_error $? "conditional \"BUILD_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_MAN_TRUE}" && test -z "${INSTALL_MAN_FALSE}"; then as_fn_error $? "conditional \"INSTALL_MAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PGM_TRUE}" && test -z "${BUILD_PGM_FALSE}"; then as_fn_error $? "conditional \"BUILD_PGM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ON_MINGW_TRUE}" && test -z "${ON_MINGW_FALSE}"; then as_fn_error $? "conditional \"ON_MINGW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ON_ANDROID_TRUE}" && test -z "${ON_ANDROID_FALSE}"; then as_fn_error $? "conditional \"ON_ANDROID\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ON_LINUX_TRUE}" && test -z "${ON_LINUX_FALSE}"; then as_fn_error $? "conditional \"ON_LINUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by zeromq $as_me 4.0.4, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ zeromq config.status 4.0.4 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/platform.hpp") CONFIG_HEADERS="$CONFIG_HEADERS src/platform.hpp" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/libzmq.pc") CONFIG_FILES="$CONFIG_FILES src/libzmq.pc" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "perf/Makefile") CONFIG_FILES="$CONFIG_FILES perf/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "builds/msvc/Makefile") CONFIG_FILES="$CONFIG_FILES builds/msvc/Makefile" ;; "foreign/openpgm/Makefile") CONFIG_FILES="$CONFIG_FILES foreign/openpgm/Makefile" ;; "builds/redhat/zeromq.spec") CONFIG_FILES="$CONFIG_FILES builds/redhat/zeromq.spec" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 $as_echo "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 fi cd "$ac_popdir" done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi zeromq3-4.0.4+dfsg.orig/perf/0000755000175000017500000000000012307431377014676 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/perf/inproc_thr.cpp0000644000175000017500000001373712240736636017566 0ustar ghedoghedo/* Copyright (c) 2007-2012 iMatix Corporation Copyright (c) 2009-2011 250bpm s.r.o. Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include #include #else #include #endif static int message_count; static size_t message_size; #if defined ZMQ_HAVE_WINDOWS static unsigned int __stdcall worker (void *ctx_) #else static void *worker (void *ctx_) #endif { void *s; int rc; int i; zmq_msg_t msg; s = zmq_socket (ctx_, ZMQ_PUSH); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_connect (s, "inproc://thr_test"); if (rc != 0) { printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); exit (1); } for (i = 0; i != message_count; i++) { rc = zmq_msg_init_size (&msg, message_size); if (rc != 0) { printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); exit (1); } #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (zmq_msg_data (&msg), 0, message_size); #endif rc = zmq_sendmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); exit (1); } } rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); exit (1); } #if defined ZMQ_HAVE_WINDOWS return 0; #else return NULL; #endif } int main (int argc, char *argv []) { #if defined ZMQ_HAVE_WINDOWS HANDLE local_thread; #else pthread_t local_thread; #endif void *ctx; void *s; int rc; int i; zmq_msg_t msg; void *watch; unsigned long elapsed; unsigned long throughput; double megabits; if (argc != 3) { printf ("usage: thread_thr \n"); return 1; } message_size = atoi (argv [1]); message_count = atoi (argv [2]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_PULL); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_bind (s, "inproc://thr_test"); if (rc != 0) { printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); return -1; } #if defined ZMQ_HAVE_WINDOWS local_thread = (HANDLE) _beginthreadex (NULL, 0, worker, ctx, 0 , NULL); if (local_thread == 0) { printf ("error in _beginthreadex\n"); return -1; } #else rc = pthread_create (&local_thread, NULL, worker, ctx); if (rc != 0) { printf ("error in pthread_create: %s\n", zmq_strerror (rc)); return -1; } #endif rc = zmq_msg_init (&msg); if (rc != 0) { printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); return -1; } printf ("message size: %d [B]\n", (int) message_size); printf ("message count: %d\n", (int) message_count); rc = zmq_recvmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } watch = zmq_stopwatch_start (); for (i = 0; i != message_count - 1; i++) { rc = zmq_recvmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } } elapsed = zmq_stopwatch_stop (watch); if (elapsed == 0) elapsed = 1; rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } #if defined ZMQ_HAVE_WINDOWS DWORD rc2 = WaitForSingleObject (local_thread, INFINITE); if (rc2 == WAIT_FAILED) { printf ("error in WaitForSingleObject\n"); return -1; } BOOL rc3 = CloseHandle (local_thread); if (rc3 == 0) { printf ("error in CloseHandle\n"); return -1; } #else rc = pthread_join (local_thread, NULL); if (rc != 0) { printf ("error in pthread_join: %s\n", zmq_strerror (rc)); return -1; } #endif rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } throughput = (unsigned long) ((double) message_count / (double) elapsed * 1000000); megabits = (double) (throughput * message_size * 8) / 1000000; printf ("mean throughput: %d [msg/s]\n", (int) throughput); printf ("mean throughput: %.3f [Mb/s]\n", (double) megabits); return 0; } zeromq3-4.0.4+dfsg.orig/perf/inproc_lat.cpp0000644000175000017500000001316112240736636017540 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include #include #else #include #endif static size_t message_size; static int roundtrip_count; #if defined ZMQ_HAVE_WINDOWS static unsigned int __stdcall worker (void *ctx_) #else static void *worker (void *ctx_) #endif { void *s; int rc; int i; zmq_msg_t msg; s = zmq_socket (ctx_, ZMQ_REP); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_connect (s, "inproc://lat_test"); if (rc != 0) { printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_msg_init (&msg); if (rc != 0) { printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); exit (1); } for (i = 0; i != roundtrip_count; i++) { rc = zmq_recvmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_sendmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); exit (1); } } rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); exit (1); } #if defined ZMQ_HAVE_WINDOWS return 0; #else return NULL; #endif } int main (int argc, char *argv []) { #if defined ZMQ_HAVE_WINDOWS HANDLE local_thread; #else pthread_t local_thread; #endif void *ctx; void *s; int rc; int i; zmq_msg_t msg; void *watch; unsigned long elapsed; double latency; if (argc != 3) { printf ("usage: inproc_lat \n"); return 1; } message_size = atoi (argv [1]); roundtrip_count = atoi (argv [2]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_REQ); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_bind (s, "inproc://lat_test"); if (rc != 0) { printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); return -1; } #if defined ZMQ_HAVE_WINDOWS local_thread = (HANDLE) _beginthreadex (NULL, 0, worker, ctx, 0 , NULL); if (local_thread == 0) { printf ("error in _beginthreadex\n"); return -1; } #else rc = pthread_create (&local_thread, NULL, worker, ctx); if (rc != 0) { printf ("error in pthread_create: %s\n", zmq_strerror (rc)); return -1; } #endif rc = zmq_msg_init_size (&msg, message_size); if (rc != 0) { printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); return -1; } memset (zmq_msg_data (&msg), 0, message_size); printf ("message size: %d [B]\n", (int) message_size); printf ("roundtrip count: %d\n", (int) roundtrip_count); watch = zmq_stopwatch_start (); for (i = 0; i != roundtrip_count; i++) { rc = zmq_sendmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_recvmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } } elapsed = zmq_stopwatch_stop (watch); rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } latency = (double) elapsed / (roundtrip_count * 2); #if defined ZMQ_HAVE_WINDOWS DWORD rc2 = WaitForSingleObject (local_thread, INFINITE); if (rc2 == WAIT_FAILED) { printf ("error in WaitForSingleObject\n"); return -1; } BOOL rc3 = CloseHandle (local_thread); if (rc3 == 0) { printf ("error in CloseHandle\n"); return -1; } #else rc = pthread_join (local_thread, NULL); if (rc != 0) { printf ("error in pthread_join: %s\n", zmq_strerror (rc)); return -1; } #endif printf ("average latency: %.3f [us]\n", (double) latency); rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq3-4.0.4+dfsg.orig/perf/remote_lat.cpp0000644000175000017500000000636712240736636017553 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include int main (int argc, char *argv []) { const char *connect_to; int roundtrip_count; size_t message_size; void *ctx; void *s; int rc; int i; zmq_msg_t msg; void *watch; unsigned long elapsed; double latency; if (argc != 4) { printf ("usage: remote_lat " "\n"); return 1; } connect_to = argv [1]; message_size = atoi (argv [2]); roundtrip_count = atoi (argv [3]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_REQ); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_connect (s, connect_to); if (rc != 0) { printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_msg_init_size (&msg, message_size); if (rc != 0) { printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); return -1; } memset (zmq_msg_data (&msg), 0, message_size); watch = zmq_stopwatch_start (); for (i = 0; i != roundtrip_count; i++) { rc = zmq_sendmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_recvmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } } elapsed = zmq_stopwatch_stop (watch); rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } latency = (double) elapsed / (roundtrip_count * 2); printf ("message size: %d [B]\n", (int) message_size); printf ("roundtrip count: %d\n", (int) roundtrip_count); printf ("average latency: %.3f [us]\n", (double) latency); rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq3-4.0.4+dfsg.orig/perf/remote_thr.cpp0000644000175000017500000000523112240736636017555 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include int main (int argc, char *argv []) { const char *connect_to; int message_count; int message_size; void *ctx; void *s; int rc; int i; zmq_msg_t msg; if (argc != 4) { printf ("usage: remote_thr " "\n"); return 1; } connect_to = argv [1]; message_size = atoi (argv [2]); message_count = atoi (argv [3]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_PUSH); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } // Add your socket options here. // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM. rc = zmq_connect (s, connect_to); if (rc != 0) { printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); return -1; } for (i = 0; i != message_count; i++) { rc = zmq_msg_init_size (&msg, message_size); if (rc != 0) { printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_sendmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } } rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq3-4.0.4+dfsg.orig/perf/local_thr.cpp0000644000175000017500000000710712240736636017360 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include int main (int argc, char *argv []) { const char *bind_to; int message_count; size_t message_size; void *ctx; void *s; int rc; int i; zmq_msg_t msg; void *watch; unsigned long elapsed; unsigned long throughput; double megabits; if (argc != 4) { printf ("usage: local_thr \n"); return 1; } bind_to = argv [1]; message_size = atoi (argv [2]); message_count = atoi (argv [3]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_PULL); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } // Add your socket options here. // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM. rc = zmq_bind (s, bind_to); if (rc != 0) { printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_msg_init (&msg); if (rc != 0) { printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_recvmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } watch = zmq_stopwatch_start (); for (i = 0; i != message_count - 1; i++) { rc = zmq_recvmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } } elapsed = zmq_stopwatch_stop (watch); if (elapsed == 0) elapsed = 1; rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } throughput = (unsigned long) ((double) message_count / (double) elapsed * 1000000); megabits = (double) (throughput * message_size * 8) / 1000000; printf ("message size: %d [B]\n", (int) message_size); printf ("message count: %d\n", (int) message_count); printf ("mean throughput: %d [msg/s]\n", (int) throughput); printf ("mean throughput: %.3f [Mb/s]\n", (double) megabits); rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq3-4.0.4+dfsg.orig/perf/local_lat.cpp0000644000175000017500000000543012240736636017340 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include int main (int argc, char *argv []) { const char *bind_to; int roundtrip_count; size_t message_size; void *ctx; void *s; int rc; int i; zmq_msg_t msg; if (argc != 4) { printf ("usage: local_lat " "\n"); return 1; } bind_to = argv [1]; message_size = atoi (argv [2]); roundtrip_count = atoi (argv [3]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_REP); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_bind (s, bind_to); if (rc != 0) { printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_msg_init (&msg); if (rc != 0) { printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); return -1; } for (i = 0; i != roundtrip_count; i++) { rc = zmq_recvmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recvmsg: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } rc = zmq_sendmsg (s, &msg, 0); if (rc < 0) { printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); return -1; } } rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } zmq_sleep (1); rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq3-4.0.4+dfsg.orig/perf/Makefile.in0000644000175000017500000004467412307430721016752 0ustar ghedoghedo# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = local_lat$(EXEEXT) remote_lat$(EXEEXT) \ local_thr$(EXEEXT) remote_thr$(EXEEXT) inproc_lat$(EXEEXT) \ inproc_thr$(EXEEXT) subdir = perf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_inproc_lat_OBJECTS = inproc_lat.$(OBJEXT) inproc_lat_OBJECTS = $(am_inproc_lat_OBJECTS) inproc_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am_inproc_thr_OBJECTS = inproc_thr.$(OBJEXT) inproc_thr_OBJECTS = $(am_inproc_thr_OBJECTS) inproc_thr_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_local_lat_OBJECTS = local_lat.$(OBJEXT) local_lat_OBJECTS = $(am_local_lat_OBJECTS) local_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_local_thr_OBJECTS = local_thr.$(OBJEXT) local_thr_OBJECTS = $(am_local_thr_OBJECTS) local_thr_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_remote_lat_OBJECTS = remote_lat.$(OBJEXT) remote_lat_OBJECTS = $(am_remote_lat_OBJECTS) remote_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_remote_thr_OBJECTS = remote_thr.$(OBJEXT) remote_thr_OBJECTS = $(am_remote_thr_OBJECTS) remote_thr_DEPENDENCIES = $(top_builddir)/src/libzmq.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(inproc_lat_SOURCES) $(inproc_thr_SOURCES) \ $(local_lat_SOURCES) $(local_thr_SOURCES) \ $(remote_lat_SOURCES) $(remote_thr_SOURCES) DIST_SOURCES = $(inproc_lat_SOURCES) $(inproc_thr_SOURCES) \ $(local_lat_SOURCES) $(local_thr_SOURCES) \ $(remote_lat_SOURCES) $(remote_thr_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_builddir)/include \ -I$(top_srcdir)/include local_lat_LDADD = $(top_builddir)/src/libzmq.la local_lat_SOURCES = local_lat.cpp remote_lat_LDADD = $(top_builddir)/src/libzmq.la remote_lat_SOURCES = remote_lat.cpp local_thr_LDADD = $(top_builddir)/src/libzmq.la local_thr_SOURCES = local_thr.cpp remote_thr_LDADD = $(top_builddir)/src/libzmq.la remote_thr_SOURCES = remote_thr.cpp inproc_lat_LDADD = $(top_builddir)/src/libzmq.la inproc_lat_SOURCES = inproc_lat.cpp inproc_thr_LDADD = $(top_builddir)/src/libzmq.la inproc_thr_SOURCES = inproc_thr.cpp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign perf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign perf/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list inproc_lat$(EXEEXT): $(inproc_lat_OBJECTS) $(inproc_lat_DEPENDENCIES) $(EXTRA_inproc_lat_DEPENDENCIES) @rm -f inproc_lat$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(inproc_lat_OBJECTS) $(inproc_lat_LDADD) $(LIBS) inproc_thr$(EXEEXT): $(inproc_thr_OBJECTS) $(inproc_thr_DEPENDENCIES) $(EXTRA_inproc_thr_DEPENDENCIES) @rm -f inproc_thr$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(inproc_thr_OBJECTS) $(inproc_thr_LDADD) $(LIBS) local_lat$(EXEEXT): $(local_lat_OBJECTS) $(local_lat_DEPENDENCIES) $(EXTRA_local_lat_DEPENDENCIES) @rm -f local_lat$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(local_lat_OBJECTS) $(local_lat_LDADD) $(LIBS) local_thr$(EXEEXT): $(local_thr_OBJECTS) $(local_thr_DEPENDENCIES) $(EXTRA_local_thr_DEPENDENCIES) @rm -f local_thr$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(local_thr_OBJECTS) $(local_thr_LDADD) $(LIBS) remote_lat$(EXEEXT): $(remote_lat_OBJECTS) $(remote_lat_DEPENDENCIES) $(EXTRA_remote_lat_DEPENDENCIES) @rm -f remote_lat$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(remote_lat_OBJECTS) $(remote_lat_LDADD) $(LIBS) remote_thr$(EXEEXT): $(remote_thr_OBJECTS) $(remote_thr_DEPENDENCIES) $(EXTRA_remote_thr_DEPENDENCIES) @rm -f remote_thr$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(remote_thr_OBJECTS) $(remote_thr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inproc_lat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inproc_thr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local_lat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local_thr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_lat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_thr.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq3-4.0.4+dfsg.orig/perf/Makefile.am0000644000175000017500000000123312240736636016733 0ustar ghedoghedoINCLUDES = -I$(top_builddir)/include \ -I$(top_srcdir)/include noinst_PROGRAMS = local_lat remote_lat local_thr remote_thr inproc_lat inproc_thr local_lat_LDADD = $(top_builddir)/src/libzmq.la local_lat_SOURCES = local_lat.cpp remote_lat_LDADD = $(top_builddir)/src/libzmq.la remote_lat_SOURCES = remote_lat.cpp local_thr_LDADD = $(top_builddir)/src/libzmq.la local_thr_SOURCES = local_thr.cpp remote_thr_LDADD = $(top_builddir)/src/libzmq.la remote_thr_SOURCES = remote_thr.cpp inproc_lat_LDADD = $(top_builddir)/src/libzmq.la inproc_lat_SOURCES = inproc_lat.cpp inproc_thr_LDADD = $(top_builddir)/src/libzmq.la inproc_thr_SOURCES = inproc_thr.cpp zeromq3-4.0.4+dfsg.orig/INSTALL0000644000175000017500000002317212240736636015002 0ustar ghedoghedoInstallation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. From GitHub =========== If you clone the Git repository then you should start by running the command `./autogen.sh`. This is not necessary if you get the source packages. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. If you are building a development version from the Github source, for example, use `./autogen.sh' to generate `configure' and other necessary installation scripts. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 6. Often, you can also type `make uninstall' to remove the installed files again. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. zeromq3-4.0.4+dfsg.orig/tests/0000755000175000017500000000000012307431377015104 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/tests/test_spec_router.cpp0000644000175000017500000001276412240736636021215 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" const char *bind_address = 0; const char *connect_address = 0; void test_fair_queue_in (void *ctx) { void *receiver = zmq_socket (ctx, ZMQ_ROUTER); assert (receiver); int timeout = 100; int rc = zmq_setsockopt (receiver, ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_bind (receiver, bind_address); assert (rc == 0); const size_t services = 5; void *senders [services]; for (size_t peer = 0; peer < services; ++peer) { senders [peer] = zmq_socket (ctx, ZMQ_DEALER); assert (senders [peer]); rc = zmq_setsockopt (senders [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); char *str = strdup("A"); str [0] += peer; rc = zmq_setsockopt (senders [peer], ZMQ_IDENTITY, str, 2); assert (rc == 0); free (str); rc = zmq_connect (senders [peer], connect_address); assert (rc == 0); } zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); s_send_seq (senders [0], "M", SEQ_END); s_recv_seq (receiver, "A", "M", SEQ_END); s_send_seq (senders [0], "M", SEQ_END); s_recv_seq (receiver, "A", "M", SEQ_END); int sum = 0; // send N requests for (size_t peer = 0; peer < services; ++peer) { s_send_seq (senders [peer], "M", SEQ_END); sum += 'A' + peer; } assert (sum == services * 'A' + services * (services - 1) / 2); // handle N requests for (size_t peer = 0; peer < services; ++peer) { rc = zmq_msg_recv (&msg, receiver, 0); assert (rc == 2); const char *id = (const char *)zmq_msg_data (&msg); sum -= id [0]; s_recv_seq (receiver, "M", SEQ_END); } assert (sum == 0); rc = zmq_msg_close (&msg); assert (rc == 0); close_zero_linger (receiver); for (size_t peer = 0; peer < services; ++peer) close_zero_linger (senders [peer]); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_destroy_queue_on_disconnect (void *ctx) { void *A = zmq_socket (ctx, ZMQ_ROUTER); assert (A); int enabled = 1; int rc = zmq_setsockopt (A, ZMQ_ROUTER_MANDATORY, &enabled, sizeof (enabled)); assert (rc == 0); rc = zmq_bind (A, bind_address); assert (rc == 0); void *B = zmq_socket (ctx, ZMQ_DEALER); assert (B); rc = zmq_setsockopt (B, ZMQ_IDENTITY, "B", 2); assert (rc == 0); rc = zmq_connect (B, connect_address); assert (rc == 0); // Wait for connection. rc = zmq_poll (0, 0, 100); assert (rc == 0); // Send a message in both directions s_send_seq (A, "B", "ABC", SEQ_END); s_send_seq (B, "DEF", SEQ_END); rc = zmq_disconnect (B, connect_address); assert (rc == 0); // Disconnect may take time and need command processing. zmq_pollitem_t poller [2] = { { A, 0, 0, 0 }, { B, 0, 0, 0 } }; rc = zmq_poll (poller, 2, 100); assert (rc == 0); rc = zmq_poll (poller, 2, 100); assert (rc == 0); // No messages should be available, sending should fail. zmq_msg_t msg; zmq_msg_init (&msg); rc = zmq_send (A, "B", 2, ZMQ_SNDMORE | ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EHOSTUNREACH); rc = zmq_msg_recv (&msg, A, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); // After a reconnect of B, the messages should still be gone rc = zmq_connect (B, connect_address); assert (rc == 0); rc = zmq_msg_recv (&msg, A, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_msg_recv (&msg, B, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_msg_close (&msg); assert (rc == 0); close_zero_linger (A); close_zero_linger (B); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transport = 0; transport < 2; ++transport) { bind_address = binds [transport]; connect_address = connects [transport]; // SHALL receive incoming messages from its peers using a fair-queuing // strategy. test_fair_queue_in (ctx); // SHALL create a double queue when a peer connects to it. If this peer // disconnects, the ROUTER socket SHALL destroy its double queue and SHALL // discard any messages it contains. // *** Test disabled until libzmq does this properly *** // test_destroy_queue_on_disconnect (ctx); } int rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_last_endpoint.cpp0000644000175000017500000000312112240736636021511 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" static void do_bind_and_verify (void *s, const char *endpoint) { int rc = zmq_bind (s, endpoint); assert (rc == 0); char reported [255]; size_t size = 255; rc = zmq_getsockopt (s, ZMQ_LAST_ENDPOINT, reported, &size); assert (rc == 0 && strcmp (reported, endpoint) == 0); } int main (void) { setup_test_environment(); // Create the infrastructure void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_ROUTER); assert (sb); int val = 0; int rc = zmq_setsockopt (sb, ZMQ_LINGER, &val, sizeof (val)); assert (rc == 0); do_bind_and_verify (sb, "tcp://127.0.0.1:5560"); do_bind_and_verify (sb, "tcp://127.0.0.1:5561"); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_security_null.cpp0000644000175000017500000001233412240736636021555 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" static void zap_handler (void *handler) { // Process ZAP requests forever while (true) { char *version = s_recv (handler); if (!version) break; // Terminating char *sequence = s_recv (handler); char *domain = s_recv (handler); char *address = s_recv (handler); char *identity = s_recv (handler); char *mechanism = s_recv (handler); assert (streq (version, "1.0")); assert (streq (mechanism, "NULL")); s_sendmore (handler, version); s_sendmore (handler, sequence); if (streq (domain, "TEST")) { s_sendmore (handler, "200"); s_sendmore (handler, "OK"); s_sendmore (handler, "anonymous"); s_send (handler, ""); } else { s_sendmore (handler, "400"); s_sendmore (handler, "BAD DOMAIN"); s_sendmore (handler, ""); s_send (handler, ""); } free (version); free (sequence); free (domain); free (address); free (identity); free (mechanism); } zmq_close (handler); } int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); // Spawn ZAP handler // We create and bind ZAP socket in main thread to avoid case // where child thread does not start up fast enough. void *handler = zmq_socket (ctx, ZMQ_REP); assert (handler); int rc = zmq_bind (handler, "inproc://zeromq.zap.01"); assert (rc == 0); void *zap_thread = zmq_threadstart (&zap_handler, handler); // We bounce between a binding server and a connecting client void *server = zmq_socket (ctx, ZMQ_DEALER); assert (server); void *client = zmq_socket (ctx, ZMQ_DEALER); assert (client); // We first test client/server with no ZAP domain // Libzmq does not call our ZAP handler, the connect must succeed rc = zmq_bind (server, "tcp://127.0.0.1:9000"); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9000"); assert (rc == 0); bounce (server, client); zmq_unbind (server, "tcp://127.0.0.1:9000"); zmq_disconnect (client, "tcp://localhost:9000"); // Now define a ZAP domain for the server; this enables // authentication. We're using the wrong domain so this test // must fail. // ************************************************************** // PH: the following causes libzmq to get confused, so that the // next step fails. To reproduce, uncomment this block. Note that // even creating a new client/server socket pair, the behaviour // does not change. // ************************************************************** // Destroying the old sockets and creating new ones isn't needed, // but it shows that the problem isn't related to specific sockets. //close_zero_linger (client); //close_zero_linger (server); //server = zmq_socket (ctx, ZMQ_DEALER); //assert (server); //client = zmq_socket (ctx, ZMQ_DEALER); //assert (client); //// The above code should not be required //rc = zmq_setsockopt (server, ZMQ_ZAP_DOMAIN, "WRONG", 5); //assert (rc == 0); //rc = zmq_bind (server, "tcp://127.0.0.1:9001"); //assert (rc == 0); //rc = zmq_connect (client, "tcp://localhost:9001"); //assert (rc == 0); //expect_bounce_fail (server, client); //zmq_unbind (server, "tcp://127.0.0.1:9001"); //zmq_disconnect (client, "tcp://localhost:9001"); // Now use the right domain, the test must pass rc = zmq_setsockopt (server, ZMQ_ZAP_DOMAIN, "TEST", 4); assert (rc == 0); rc = zmq_bind (server, "tcp://127.0.0.1:9002"); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9002"); assert (rc == 0); // ************************************************************** // PH: it fails here; though the ZAP reply is 200 OK, and // null_mechanism.cpp correctly parses that, the connection // never succeeds and the test hangs. // ************************************************************** bounce (server, client); zmq_unbind (server, "tcp://127.0.0.1:9002"); zmq_disconnect (client, "tcp://localhost:9002"); // Shutdown close_zero_linger (client); close_zero_linger (server); rc = zmq_ctx_term (ctx); assert (rc == 0); // Wait until ZAP handler terminates. zmq_threadclose (zap_thread); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_stream.cpp0000644000175000017500000001614712240736636020155 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" // ZMTP protocol greeting structure typedef unsigned char byte; typedef struct { byte signature [10]; // 0xFF 8*0x00 0x7F byte version [2]; // 0x03 0x00 for ZMTP/3.0 byte mechanism [20]; // "NULL" byte as_server; byte filler [31]; } zmtp_greeting_t; #define ZMTP_DEALER 5 // Socket type constants // This is a greeting matching what 0MQ will send us; note the // 8-byte size is set to 1 for backwards compatibility static zmtp_greeting_t greeting = { { 0xFF, 0, 0, 0, 0, 0, 0, 0, 1, 0x7F }, { 3, 0 }, { 'N', 'U', 'L', 'L'} }; static void test_stream_to_dealer (void) { int rc; // Set up our context and sockets void *ctx = zmq_ctx_new (); assert (ctx); // We'll be using this socket in raw mode void *stream = zmq_socket (ctx, ZMQ_STREAM); assert (stream); int zero = 0; rc = zmq_setsockopt (stream, ZMQ_LINGER, &zero, sizeof (zero)); assert (rc == 0); rc = zmq_bind (stream, "tcp://127.0.0.1:5556"); assert (rc == 0); // We'll be using this socket as the other peer void *dealer = zmq_socket (ctx, ZMQ_DEALER); assert (dealer); rc = zmq_setsockopt (dealer, ZMQ_LINGER, &zero, sizeof (zero)); assert (rc == 0); rc = zmq_connect (dealer, "tcp://localhost:5556"); // Send a message on the dealer socket rc = zmq_send (dealer, "Hello", 5, 0); assert (rc == 5); // First frame is identity zmq_msg_t identity; rc = zmq_msg_init (&identity); assert (rc == 0); rc = zmq_msg_recv (&identity, stream, 0); assert (rc > 0); assert (zmq_msg_more (&identity)); // Second frame is greeting signature byte buffer [255]; rc = zmq_recv (stream, buffer, 255, 0); assert (rc == 10); assert (memcmp (buffer, greeting.signature, 10) == 0); // Send our own protocol greeting rc = zmq_msg_send (&identity, stream, ZMQ_SNDMORE); assert (rc > 0); rc = zmq_send (stream, &greeting, sizeof (greeting), 0); assert (rc == sizeof (greeting)); // Now we expect the data from the DEALER socket // We want the rest of greeting along with the Ready command int bytes_read = 0; while (bytes_read < 97) { // First frame is the identity of the connection (each time) rc = zmq_msg_recv (&identity, stream, 0); assert (rc > 0); assert (zmq_msg_more (&identity)); // Second frame contains the next chunk of data rc = zmq_recv (stream, buffer + bytes_read, 255 - bytes_read, 0); assert (rc >= 0); bytes_read += rc; } // First two bytes are major and minor version numbers. assert (buffer [0] == 3); // ZMTP/3.0 assert (buffer [1] == 0); // Mechanism is "NULL" assert (memcmp (buffer + 2, "NULL\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 20) == 0); assert (memcmp (buffer + 54, "\4\51\5READY", 8) == 0); assert (memcmp (buffer + 62, "\13Socket-Type\0\0\0\6DEALER", 22) == 0); assert (memcmp (buffer + 84, "\10Identity\0\0\0\0", 13) == 0); // Announce we are ready memcpy (buffer, "\4\51\5READY", 8); memcpy (buffer + 8, "\13Socket-Type\0\0\0\6ROUTER", 22); memcpy (buffer + 30, "\10Identity\0\0\0\0", 13); // Send Ready command rc = zmq_msg_send (&identity, stream, ZMQ_SNDMORE); assert (rc > 0); rc = zmq_send (stream, buffer, 43, 0); assert (rc == 43); // Now we expect the data from the DEALER socket // First frame is, again, the identity of the connection rc = zmq_msg_recv (&identity, stream, 0); assert (rc > 0); assert (zmq_msg_more (&identity)); // Third frame contains Hello message from DEALER rc = zmq_recv (stream, buffer, sizeof buffer, 0); assert (rc == 7); // Then we have a 5-byte message "Hello" assert (buffer [0] == 0); // Flags = 0 assert (buffer [1] == 5); // Size = 5 assert (memcmp (buffer + 2, "Hello", 5) == 0); // Send "World" back to DEALER rc = zmq_msg_send (&identity, stream, ZMQ_SNDMORE); assert (rc > 0); byte world [] = { 0, 5, 'W', 'o', 'r', 'l', 'd' }; rc = zmq_send (stream, world, sizeof (world), 0); assert (rc == sizeof (world)); // Expect response on DEALER socket rc = zmq_recv (dealer, buffer, 255, 0); assert (rc == 5); assert (memcmp (buffer, "World", 5) == 0); rc = zmq_close (dealer); assert (rc == 0); rc = zmq_close (stream); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); } static void test_stream_to_stream (void) { int rc; // Set-up our context and sockets void *ctx = zmq_ctx_new (); assert (ctx); void *server = zmq_socket (ctx, ZMQ_STREAM); assert (server); rc = zmq_bind (server, "tcp://127.0.0.1:9080"); assert (rc == 0); void *client = zmq_socket (ctx, ZMQ_STREAM); assert (client); rc = zmq_connect (client, "tcp://localhost:9080"); assert (rc == 0); // It would be less surprising to get an empty message instead // of having to fetch the identity like this [PH 2013/06/27] uint8_t id [256]; size_t id_size = 256; rc = zmq_getsockopt (client, ZMQ_IDENTITY, id, &id_size); assert (rc == 0); // Sent HTTP request on client socket // First frame is server identity rc = zmq_send (client, id, id_size, ZMQ_SNDMORE); assert (rc == (int) id_size); // Second frame is HTTP GET request rc = zmq_send (client, "GET /\n\n", 7, 0); assert (rc == 7); // Get HTTP request; ID frame and then request id_size = zmq_recv (server, id, 256, 0); assert (id_size > 0); uint8_t buffer [256]; rc = zmq_recv (server, buffer, 256, 0); assert (rc > 0); assert (memcmp (buffer, "GET /\n\n", 7) == 0); // Send reply back to client char http_response [] = "HTTP/1.0 200 OK\r\n" "Content-Type: text/plain\r\n" "\r\n" "Hello, World!"; zmq_send (server, id, id_size, ZMQ_SNDMORE); zmq_send (server, http_response, sizeof (http_response), 0); // Get reply at client and check that it's complete id_size = zmq_recv (client, id, 256, 0); assert (id_size > 0); rc = zmq_recv (client, buffer, 256, 0); assert (rc == sizeof (http_response)); assert (memcmp (buffer, http_response, sizeof (http_response)) == 0); } int main (void) { setup_test_environment(); test_stream_to_dealer (); test_stream_to_stream (); } zeromq3-4.0.4+dfsg.orig/tests/test_pair_inproc.cpp0000644000175000017500000000357312240736636021166 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_PAIR); assert (sb); int rc = zmq_bind (sb, "inproc://a"); assert (rc == 0); void *sc = zmq_socket (ctx, ZMQ_PAIR); assert (sc); rc = zmq_connect (sc, "inproc://a"); assert (rc == 0); bounce (sb, sc); // Test zmq_send_const rc = zmq_send_const (sb, "foo", 3, ZMQ_SNDMORE); assert (rc == 3); rc = zmq_send_const (sb, "foobar", 6, 0); assert (rc == 6); zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, sc, 0); assert (rc == 3); assert (zmq_msg_size (&msg) == 3); void* data = zmq_msg_data (&msg); assert (memcmp ("foo", data, 3) == 0); rc = zmq_msg_recv (&msg, sc, 0); assert (rc == 6); data = zmq_msg_data (&msg); assert (memcmp ("foobar", data, 6) == 0); // Cleanup rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/testutil.hpp0000644000175000017500000001754312307426216017500 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __TESTUTIL_HPP_INCLUDED__ #define __TESTUTIL_HPP_INCLUDED__ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include "platform.hpp" // This defines the settle time used in tests; raise this if we // get test failures on slower systems due to binds/connects not // settled. Tested to work reliably at 1 msec on a fast PC. #define SETTLE_TIME 10 // In msec #undef NDEBUG #include #include #include #include #if defined _WIN32 # if defined _MSC_VER # include # pragma warning(disable:4996) # endif #else # include # include # include # include #endif // Bounce a message from client to server and back // For REQ/REP or DEALER/DEALER pairs only void bounce (void *server, void *client) { const char *content = "12345678ABCDEFGH12345678abcdefgh"; // Send message from client to server int rc = zmq_send (client, content, 32, ZMQ_SNDMORE); assert (rc == 32); rc = zmq_send (client, content, 32, 0); assert (rc == 32); // Receive message at server side char buffer [32]; rc = zmq_recv (server, buffer, 32, 0); assert (rc == 32); // Check that message is still the same assert (memcmp (buffer, content, 32) == 0); int rcvmore; size_t sz = sizeof (rcvmore); rc = zmq_getsockopt (server, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (rcvmore); rc = zmq_recv (server, buffer, 32, 0); assert (rc == 32); // Check that message is still the same assert (memcmp (buffer, content, 32) == 0); rc = zmq_getsockopt (server, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (!rcvmore); // Send two parts back to client rc = zmq_send (server, buffer, 32, ZMQ_SNDMORE); assert (rc == 32); rc = zmq_send (server, buffer, 32, 0); assert (rc == 32); // Receive the two parts at the client side rc = zmq_recv (client, buffer, 32, 0); assert (rc == 32); // Check that message is still the same assert (memcmp (buffer, content, 32) == 0); rc = zmq_getsockopt (client, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (rcvmore); rc = zmq_recv (client, buffer, 32, 0); assert (rc == 32); // Check that message is still the same assert (memcmp (buffer, content, 32) == 0); rc = zmq_getsockopt (client, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (!rcvmore); } // Same as bounce, but expect messages to never arrive // for security or subscriber reasons. void expect_bounce_fail (void *server, void *client) { const char *content = "12345678ABCDEFGH12345678abcdefgh"; char buffer [32]; // Send message from client to server int rc = zmq_send (client, content, 32, ZMQ_SNDMORE); assert (rc == 32); rc = zmq_send (client, content, 32, 0); assert (rc == 32); // Receive message at server side (should not succeed) int timeout = 150; rc = zmq_setsockopt (server, ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_recv (server, buffer, 32, 0); assert (rc == -1); assert (zmq_errno () == EAGAIN); // Send message from server to client to test other direction rc = zmq_send (server, content, 32, ZMQ_SNDMORE); assert (rc == 32); rc = zmq_send (server, content, 32, 0); assert (rc == 32); // Receive message at client side (should not succeed) rc = zmq_setsockopt (client, ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_recv (client, buffer, 32, 0); assert (rc == -1); assert (zmq_errno () == EAGAIN); } // Receive 0MQ string from socket and convert into C string // Caller must free returned string. Returns NULL if the context // is being terminated. char * s_recv (void *socket) { char buffer [256]; int size = zmq_recv (socket, buffer, 255, 0); if (size == -1) return NULL; if (size > 255) size = 255; buffer [size] = 0; return strdup (buffer); } // Convert C string to 0MQ string and send to socket int s_send (void *socket, const char *string) { int size = zmq_send (socket, string, strlen (string), 0); return size; } // Sends string as 0MQ string, as multipart non-terminal int s_sendmore (void *socket, const char *string) { int size = zmq_send (socket, string, strlen (string), ZMQ_SNDMORE); return size; } #define streq(s1,s2) (!strcmp ((s1), (s2))) #define strneq(s1,s2) (strcmp ((s1), (s2))) const char *SEQ_END = (const char *) 1; // Sends a message composed of frames that are C strings or null frames. // The list must be terminated by SEQ_END. // Example: s_send_seq (req, "ABC", 0, "DEF", SEQ_END); void s_send_seq (void *socket, ...) { va_list ap; va_start (ap, socket); const char * data = va_arg (ap, const char *); while (true) { const char * prev = data; data = va_arg (ap, const char *); bool end = data == SEQ_END; if (!prev) { int rc = zmq_send (socket, 0, 0, end ? 0 : ZMQ_SNDMORE); assert (rc != -1); } else { int rc = zmq_send (socket, prev, strlen (prev)+1, end ? 0 : ZMQ_SNDMORE); assert (rc != -1); } if (end) break; } va_end (ap); } // Receives message a number of frames long and checks that the frames have // the given data which can be either C strings or 0 for a null frame. // The list must be terminated by SEQ_END. // Example: s_recv_seq (rep, "ABC", 0, "DEF", SEQ_END); void s_recv_seq (void *socket, ...) { zmq_msg_t msg; zmq_msg_init (&msg); int more; size_t more_size = sizeof(more); va_list ap; va_start (ap, socket); const char * data = va_arg (ap, const char *); while (true) { int rc = zmq_msg_recv (&msg, socket, 0); assert (rc != -1); if (!data) assert (zmq_msg_size (&msg) == 0); else assert (strcmp (data, (const char *)zmq_msg_data (&msg)) == 0); data = va_arg (ap, const char *); bool end = data == SEQ_END; rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); assert (!more == end); if (end) break; } va_end (ap); zmq_msg_close (&msg); } // Sets a zero linger period on a socket and closes it. void close_zero_linger (void *socket) { int linger = 0; int rc = zmq_setsockopt (socket, ZMQ_LINGER, &linger, sizeof(linger)); assert (rc == 0 || errno == ETERM); rc = zmq_close (socket); assert (rc == 0); } void setup_test_environment() { #if defined _WIN32 # if defined _MSC_VER _set_abort_behavior( 0, _WRITE_ABORT_MSG); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); # endif #endif } // Provide portable millisecond sleep // http://www.cplusplus.com/forum/unices/60161/ http://en.cppreference.com/w/cpp/thread/sleep_for void msleep (int milliseconds) { #ifdef ZMQ_HAVE_WINDOWS Sleep (milliseconds); #else usleep (static_cast (milliseconds) * 1000); #endif } #endif zeromq3-4.0.4+dfsg.orig/tests/test_spec_dealer.cpp0000644000175000017500000001534712240736636021131 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" const char *bind_address = 0; const char *connect_address = 0; void test_round_robin_out (void *ctx) { void *dealer = zmq_socket (ctx, ZMQ_DEALER); assert (dealer); int rc = zmq_bind (dealer, bind_address); assert (rc == 0); const size_t services = 5; void *rep [services]; for (size_t peer = 0; peer < services; ++peer) { rep [peer] = zmq_socket (ctx, ZMQ_REP); assert (rep [peer]); int timeout = 100; rc = zmq_setsockopt (rep [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_connect (rep [peer], connect_address); assert (rc == 0); } // Wait for connections. rc = zmq_poll (0, 0, 100); assert (rc == 0); // Send all requests for (size_t i = 0; i < services; ++i) s_send_seq (dealer, 0, "ABC", SEQ_END); // Expect every REP got one message zmq_msg_t msg; zmq_msg_init (&msg); for (size_t peer = 0; peer < services; ++peer) s_recv_seq (rep [peer], "ABC", SEQ_END); rc = zmq_msg_close (&msg); assert (rc == 0); close_zero_linger (dealer); for (size_t peer = 0; peer < services; ++peer) close_zero_linger (rep [peer]); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_fair_queue_in (void *ctx) { void *receiver = zmq_socket (ctx, ZMQ_DEALER); assert (receiver); int timeout = 100; int rc = zmq_setsockopt (receiver, ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_bind (receiver, bind_address); assert (rc == 0); const size_t services = 5; void *senders [services]; for (size_t peer = 0; peer < services; ++peer) { senders [peer] = zmq_socket (ctx, ZMQ_DEALER); assert (senders [peer]); rc = zmq_setsockopt (senders [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_connect (senders [peer], connect_address); assert (rc == 0); } zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); s_send_seq (senders [0], "A", SEQ_END); s_recv_seq (receiver, "A", SEQ_END); s_send_seq (senders [0], "A", SEQ_END); s_recv_seq (receiver, "A", SEQ_END); // send our requests for (size_t peer = 0; peer < services; ++peer) s_send_seq (senders [peer], "B", SEQ_END); // Wait for data. rc = zmq_poll (0, 0, 50); assert (rc == 0); // handle the requests for (size_t peer = 0; peer < services; ++peer) s_recv_seq (receiver, "B", SEQ_END); rc = zmq_msg_close (&msg); assert (rc == 0); close_zero_linger (receiver); for (size_t peer = 0; peer < services; ++peer) close_zero_linger (senders [peer]); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_destroy_queue_on_disconnect (void *ctx) { void *A = zmq_socket (ctx, ZMQ_DEALER); assert (A); int rc = zmq_bind (A, bind_address); assert (rc == 0); void *B = zmq_socket (ctx, ZMQ_DEALER); assert (B); rc = zmq_connect (B, connect_address); assert (rc == 0); // Send a message in both directions s_send_seq (A, "ABC", SEQ_END); s_send_seq (B, "DEF", SEQ_END); rc = zmq_disconnect (B, connect_address); assert (rc == 0); // Disconnect may take time and need command processing. zmq_pollitem_t poller [2] = { { A, 0, 0, 0 }, { B, 0, 0, 0 } }; rc = zmq_poll (poller, 2, 100); assert (rc == 0); rc = zmq_poll (poller, 2, 100); assert (rc == 0); // No messages should be available, sending should fail. zmq_msg_t msg; zmq_msg_init (&msg); rc = zmq_send (A, 0, 0, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_msg_recv (&msg, A, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); // After a reconnect of B, the messages should still be gone rc = zmq_connect (B, connect_address); assert (rc == 0); rc = zmq_msg_recv (&msg, A, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_msg_recv (&msg, B, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_msg_close (&msg); assert (rc == 0); close_zero_linger (A); close_zero_linger (B); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_block_on_send_no_peers (void *ctx) { void *sc = zmq_socket (ctx, ZMQ_DEALER); assert (sc); int timeout = 100; int rc = zmq_setsockopt (sc, ZMQ_SNDTIMEO, &timeout, sizeof (timeout)); assert (rc == 0); rc = zmq_send (sc, 0, 0, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_send (sc, 0, 0, 0); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_close (sc); assert (rc == 0); } int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transports = 0; transports < 2; ++transports) { bind_address = binds [transports]; connect_address = connects [transports]; // SHALL route outgoing messages to available peers using a round-robin // strategy. test_round_robin_out (ctx); // SHALL receive incoming messages from its peers using a fair-queuing // strategy. test_fair_queue_in (ctx); // SHALL block on sending, or return a suitable error, when it has no connected peers. test_block_on_send_no_peers (ctx); // SHALL create a double queue when a peer connects to it. If this peer // disconnects, the DEALER socket SHALL destroy its double queue and SHALL // discard any messages it contains. // *** Test disabled until libzmq does this properly *** // test_destroy_queue_on_disconnect (ctx); } int rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_req_relaxed.cpp0000644000175000017500000000675212240736636021156 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *req = zmq_socket (ctx, ZMQ_REQ); assert (req); int enabled = 1; int rc = zmq_setsockopt (req, ZMQ_REQ_RELAXED, &enabled, sizeof (int)); assert (rc == 0); rc = zmq_setsockopt (req, ZMQ_REQ_CORRELATE, &enabled, sizeof (int)); assert (rc == 0); rc = zmq_bind (req, "tcp://127.0.0.1:5555"); assert (rc == 0); const size_t services = 5; void *rep [services]; for (size_t peer = 0; peer < services; peer++) { rep [peer] = zmq_socket (ctx, ZMQ_REP); assert (rep [peer]); int timeout = 100; rc = zmq_setsockopt (rep [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_connect (rep [peer], "tcp://localhost:5555"); assert (rc == 0); } // We have to give the connects time to finish otherwise the requests // will not properly round-robin. We could alternatively connect the // REQ sockets to the REP sockets. msleep (SETTLE_TIME); // Case 1: Second send() before a reply arrives in a pipe. // Send a request, ensure it arrives, don't send a reply s_send_seq (req, "A", "B", SEQ_END); s_recv_seq (rep [0], "A", "B", SEQ_END); // Send another request on the REQ socket s_send_seq (req, "C", "D", SEQ_END); s_recv_seq (rep [1], "C", "D", SEQ_END); // Send a reply to the first request - that should be discarded by the REQ s_send_seq (rep [0], "WRONG", SEQ_END); // Send the expected reply s_send_seq (rep [1], "OK", SEQ_END); s_recv_seq (req, "OK", SEQ_END); // Another standard req-rep cycle, just to check s_send_seq (req, "E", SEQ_END); s_recv_seq (rep [2], "E", SEQ_END); s_send_seq (rep [2], "F", "G", SEQ_END); s_recv_seq (req, "F", "G", SEQ_END); // Case 2: Second send() after a reply is already in a pipe on the REQ. // Send a request, ensure it arrives, send a reply s_send_seq (req, "H", SEQ_END); s_recv_seq (rep [3], "H", SEQ_END); s_send_seq (rep [3], "BAD", SEQ_END); // Wait for message to be there. rc = zmq_poll (0, 0, 100); assert (rc == 0); // Without receiving that reply, send another request on the REQ socket s_send_seq (req, "I", SEQ_END); s_recv_seq (rep [4], "I", SEQ_END); // Send the expected reply s_send_seq (rep [4], "GOOD", SEQ_END); s_recv_seq (req, "GOOD", SEQ_END); close_zero_linger (req); for (size_t peer = 0; peer < services; peer++) close_zero_linger (rep [peer]); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_ctx_destroy.cpp0000644000175000017500000000424612240736636021226 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" static void receiver (void *socket) { char buffer[16]; int rc = zmq_recv (socket, &buffer, sizeof (buffer), 0); assert(rc == -1); } void test_ctx_destroy() { int rc; // Set up our context and sockets void *ctx = zmq_ctx_new (); assert (ctx); void *socket = zmq_socket (ctx, ZMQ_PULL); assert (socket); // Close the socket rc = zmq_close (socket); assert (rc == 0); // Destroy the context rc = zmq_ctx_destroy (ctx); assert (rc == 0); } void test_ctx_shutdown() { int rc; // Set up our context and sockets void *ctx = zmq_ctx_new (); assert (ctx); void *socket = zmq_socket (ctx, ZMQ_PULL); assert (socket); // Spawn a thread to receive on socket void *receiver_thread = zmq_threadstart (&receiver, socket); // Wait for thread to start up and block msleep (SETTLE_TIME); // Shutdown context, if we used destroy here we would deadlock. rc = zmq_ctx_shutdown (ctx); assert (rc == 0); // Wait for thread to finish zmq_threadclose (receiver_thread); // Close the socket. rc = zmq_close (socket); assert (rc == 0); // Destory the context, will now not hang as we have closed the socket. rc = zmq_ctx_destroy (ctx); assert (rc == 0); } int main (void) { setup_test_environment(); test_ctx_destroy(); test_ctx_shutdown(); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_monitor.cpp0000644000175000017500000001707112240736636020346 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" // REQ socket events handled static int req_socket_events; // 2nd REQ socket events handled static int req2_socket_events; // REP socket events handled static int rep_socket_events; std::string addr ; static bool read_msg(void* s, zmq_event_t& event, std::string& ep) { int rc ; zmq_msg_t msg1; // binary part zmq_msg_init (&msg1); zmq_msg_t msg2; // address part zmq_msg_init (&msg2); rc = zmq_msg_recv (&msg1, s, 0); if (rc == -1 && zmq_errno() == ETERM) return true ; assert (rc != -1); assert (zmq_msg_more(&msg1) != 0); rc = zmq_msg_recv (&msg2, s, 0); if (rc == -1 && zmq_errno() == ETERM) return true; assert (rc != -1); assert (zmq_msg_more(&msg2) == 0); // copy binary data to event struct const char* data = (char*)zmq_msg_data(&msg1); memcpy(&event.event, data, sizeof(event.event)); memcpy(&event.value, data+sizeof(event.event), sizeof(event.value)); // copy address part ep = std::string((char*)zmq_msg_data(&msg2), zmq_msg_size(&msg2)); if (event.event == ZMQ_EVENT_MONITOR_STOPPED) return true; return false; } // REQ socket monitor thread static void req_socket_monitor (void *ctx) { zmq_event_t event; std::string ep ; int rc; void *s = zmq_socket (ctx, ZMQ_PAIR); assert (s); rc = zmq_connect (s, "inproc://monitor.req"); assert (rc == 0); while (!read_msg(s, event, ep)) { assert (ep == addr); switch (event.event) { case ZMQ_EVENT_CONNECTED: assert (event.value > 0); req_socket_events |= ZMQ_EVENT_CONNECTED; req2_socket_events |= ZMQ_EVENT_CONNECTED; break; case ZMQ_EVENT_CONNECT_DELAYED: assert (event.value != 0); req_socket_events |= ZMQ_EVENT_CONNECT_DELAYED; break; case ZMQ_EVENT_CLOSE_FAILED: assert (event.value != 0); req_socket_events |= ZMQ_EVENT_CLOSE_FAILED; break; case ZMQ_EVENT_CLOSED: assert (event.value != 0); req_socket_events |= ZMQ_EVENT_CLOSED; break; case ZMQ_EVENT_DISCONNECTED: assert (event.value != 0); req_socket_events |= ZMQ_EVENT_DISCONNECTED; break; } } zmq_close (s); } // 2nd REQ socket monitor thread static void req2_socket_monitor (void *ctx) { zmq_event_t event; std::string ep ; int rc; void *s = zmq_socket (ctx, ZMQ_PAIR); assert (s); rc = zmq_connect (s, "inproc://monitor.req2"); assert (rc == 0); while (!read_msg(s, event, ep)) { assert (ep == addr); switch (event.event) { case ZMQ_EVENT_CONNECTED: assert (event.value > 0); req2_socket_events |= ZMQ_EVENT_CONNECTED; break; case ZMQ_EVENT_CLOSED: assert (event.value != 0); req2_socket_events |= ZMQ_EVENT_CLOSED; break; } } zmq_close (s); } // REP socket monitor thread static void rep_socket_monitor (void *ctx) { zmq_event_t event; std::string ep ; int rc; void *s = zmq_socket (ctx, ZMQ_PAIR); assert (s); rc = zmq_connect (s, "inproc://monitor.rep"); assert (rc == 0); while (!read_msg(s, event, ep)) { assert (ep == addr); switch (event.event) { case ZMQ_EVENT_LISTENING: assert (event.value > 0); rep_socket_events |= ZMQ_EVENT_LISTENING; break; case ZMQ_EVENT_ACCEPTED: assert (event.value > 0); rep_socket_events |= ZMQ_EVENT_ACCEPTED; break; case ZMQ_EVENT_CLOSE_FAILED: assert (event.value != 0); rep_socket_events |= ZMQ_EVENT_CLOSE_FAILED; break; case ZMQ_EVENT_CLOSED: assert (event.value != 0); rep_socket_events |= ZMQ_EVENT_CLOSED; break; case ZMQ_EVENT_DISCONNECTED: assert (event.value != 0); rep_socket_events |= ZMQ_EVENT_DISCONNECTED; break; } } zmq_close (s); } int main (void) { setup_test_environment(); int rc; void *req; void *req2; void *rep; void* threads [3]; addr = "tcp://127.0.0.1:5560"; // Create the infrastructure void *ctx = zmq_ctx_new (); assert (ctx); // REP socket rep = zmq_socket (ctx, ZMQ_REP); assert (rep); // Assert supported protocols rc = zmq_socket_monitor (rep, addr.c_str(), 0); assert (rc == -1); assert (zmq_errno() == EPROTONOSUPPORT); // Deregister monitor rc = zmq_socket_monitor (rep, NULL, 0); assert (rc == 0); // REP socket monitor, all events rc = zmq_socket_monitor (rep, "inproc://monitor.rep", ZMQ_EVENT_ALL); assert (rc == 0); threads [0] = zmq_threadstart(&rep_socket_monitor, ctx); // REQ socket req = zmq_socket (ctx, ZMQ_REQ); assert (req); // REQ socket monitor, all events rc = zmq_socket_monitor (req, "inproc://monitor.req", ZMQ_EVENT_ALL); assert (rc == 0); threads [1] = zmq_threadstart(&req_socket_monitor, ctx); msleep (SETTLE_TIME); // Bind REQ and REP rc = zmq_bind (rep, addr.c_str()); assert (rc == 0); rc = zmq_connect (req, addr.c_str()); assert (rc == 0); bounce (rep, req); // 2nd REQ socket req2 = zmq_socket (ctx, ZMQ_REQ); assert (req2); // 2nd REQ socket monitor, connected event only rc = zmq_socket_monitor (req2, "inproc://monitor.req2", ZMQ_EVENT_CONNECTED); assert (rc == 0); threads [2] = zmq_threadstart(&req2_socket_monitor, ctx); rc = zmq_connect (req2, addr.c_str()); assert (rc == 0); // Close the REP socket rc = zmq_close (rep); assert (rc == 0); // Allow enough time for detecting error states msleep (250); // Close the REQ socket rc = zmq_close (req); assert (rc == 0); // Close the 2nd REQ socket rc = zmq_close (req2); assert (rc == 0); zmq_ctx_term (ctx); // Expected REP socket events assert (rep_socket_events & ZMQ_EVENT_LISTENING); assert (rep_socket_events & ZMQ_EVENT_ACCEPTED); assert (rep_socket_events & ZMQ_EVENT_CLOSED); // Expected REQ socket events assert (req_socket_events & ZMQ_EVENT_CONNECTED); assert (req_socket_events & ZMQ_EVENT_DISCONNECTED); assert (req_socket_events & ZMQ_EVENT_CLOSED); // Expected 2nd REQ socket events assert (req2_socket_events & ZMQ_EVENT_CONNECTED); assert (!(req2_socket_events & ZMQ_EVENT_CLOSED)); for (unsigned int i = 0; i < 3; ++i) zmq_threadclose(threads [i]); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_invalid_rep.cpp0000644000175000017500000000516112240736636021150 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); // Create REQ/ROUTER wiring. void *ctx = zmq_ctx_new (); assert (ctx); void *router_socket = zmq_socket (ctx, ZMQ_ROUTER); assert (router_socket); void *req_socket = zmq_socket (ctx, ZMQ_REQ); assert (req_socket); int linger = 0; int rc = zmq_setsockopt (router_socket, ZMQ_LINGER, &linger, sizeof (int)); assert (rc == 0); rc = zmq_setsockopt (req_socket, ZMQ_LINGER, &linger, sizeof (int)); assert (rc == 0); rc = zmq_bind (router_socket, "inproc://hi"); assert (rc == 0); rc = zmq_connect (req_socket, "inproc://hi"); assert (rc == 0); // Initial request. rc = zmq_send (req_socket, "r", 1, 0); assert (rc == 1); // Receive the request. char addr [32]; int addr_size; char bottom [1]; char body [1]; addr_size = zmq_recv (router_socket, addr, sizeof (addr), 0); assert (addr_size >= 0); rc = zmq_recv (router_socket, bottom, sizeof (bottom), 0); assert (rc == 0); rc = zmq_recv (router_socket, body, sizeof (body), 0); assert (rc == 1); // Send invalid reply. rc = zmq_send (router_socket, addr, addr_size, 0); assert (rc == addr_size); // Send valid reply. rc = zmq_send (router_socket, addr, addr_size, ZMQ_SNDMORE); assert (rc == addr_size); rc = zmq_send (router_socket, bottom, 0, ZMQ_SNDMORE); assert (rc == 0); rc = zmq_send (router_socket, "b", 1, 0); assert (rc == 1); // Check whether we've got the valid reply. rc = zmq_recv (req_socket, body, sizeof (body), 0); assert (rc == 1); assert (body [0] == 'b'); // Tear down the wiring. rc = zmq_close (router_socket); assert (rc == 0); rc = zmq_close (req_socket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_hwm.cpp0000644000175000017500000002043712240736636017452 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" const int MAX_SENDS = 10000; enum TestType { BIND_FIRST, CONNECT_FIRST }; int test_defaults () { void *ctx = zmq_ctx_new (); assert (ctx); int rc; // Set up bind socket void *bind_socket = zmq_socket (ctx, ZMQ_PULL); assert (bind_socket); rc = zmq_bind (bind_socket, "inproc://a"); assert (rc == 0); // Set up connect socket void *connect_socket = zmq_socket (ctx, ZMQ_PUSH); assert (connect_socket); rc = zmq_connect (connect_socket, "inproc://a"); assert (rc == 0); // Send until we block int send_count = 0; while (send_count < MAX_SENDS && zmq_send (connect_socket, NULL, 0, ZMQ_DONTWAIT) == 0) ++send_count; // Now receive all sent messages int recv_count = 0; while (zmq_recv (bind_socket, NULL, 0, ZMQ_DONTWAIT) == 0) ++recv_count; assert (send_count == recv_count); // Clean up rc = zmq_close (connect_socket); assert (rc == 0); rc = zmq_close (bind_socket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return send_count; } int count_msg (int send_hwm, int recv_hwm, TestType testType) { void *ctx = zmq_ctx_new (); assert (ctx); int rc; void *bind_socket; void *connect_socket; if (testType == BIND_FIRST) { // Set up bind socket bind_socket = zmq_socket (ctx, ZMQ_PULL); assert (bind_socket); rc = zmq_setsockopt (bind_socket, ZMQ_RCVHWM, &recv_hwm, sizeof (recv_hwm)); assert (rc == 0); rc = zmq_bind (bind_socket, "inproc://a"); assert (rc == 0); // Set up connect socket connect_socket = zmq_socket (ctx, ZMQ_PUSH); assert (connect_socket); rc = zmq_setsockopt (connect_socket, ZMQ_SNDHWM, &send_hwm, sizeof (send_hwm)); assert (rc == 0); rc = zmq_connect (connect_socket, "inproc://a"); assert (rc == 0); } else { // Set up connect socket connect_socket = zmq_socket (ctx, ZMQ_PUSH); assert (connect_socket); rc = zmq_setsockopt (connect_socket, ZMQ_SNDHWM, &send_hwm, sizeof (send_hwm)); assert (rc == 0); rc = zmq_connect (connect_socket, "inproc://a"); assert (rc == 0); // Set up bind socket bind_socket = zmq_socket (ctx, ZMQ_PULL); assert (bind_socket); rc = zmq_setsockopt (bind_socket, ZMQ_RCVHWM, &recv_hwm, sizeof (recv_hwm)); assert (rc == 0); rc = zmq_bind (bind_socket, "inproc://a"); assert (rc == 0); } // Send until we block int send_count = 0; while (send_count < MAX_SENDS && zmq_send (connect_socket, NULL, 0, ZMQ_DONTWAIT) == 0) ++send_count; // Now receive all sent messages int recv_count = 0; while (zmq_recv (bind_socket, NULL, 0, ZMQ_DONTWAIT) == 0) ++recv_count; assert (send_count == recv_count); // Now it should be possible to send one more. rc = zmq_send (connect_socket, NULL, 0, 0); assert (rc == 0); // Consume the remaining message. rc = zmq_recv (bind_socket, NULL, 0, 0); assert (rc == 0); // Clean up rc = zmq_close (connect_socket); assert (rc == 0); rc = zmq_close (bind_socket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return send_count; } int test_inproc_bind_first (int send_hwm, int recv_hwm) { return count_msg(send_hwm, recv_hwm, BIND_FIRST); } int test_inproc_connect_first (int send_hwm, int recv_hwm) { return count_msg(send_hwm, recv_hwm, CONNECT_FIRST); } int test_inproc_connect_and_close_first (int send_hwm, int recv_hwm) { void *ctx = zmq_ctx_new (); assert (ctx); int rc; // Set up connect socket void *connect_socket = zmq_socket (ctx, ZMQ_PUSH); assert (connect_socket); rc = zmq_setsockopt (connect_socket, ZMQ_SNDHWM, &send_hwm, sizeof (send_hwm)); assert (rc == 0); rc = zmq_connect (connect_socket, "inproc://a"); assert (rc == 0); // Send until we block int send_count = 0; while (send_count < MAX_SENDS && zmq_send (connect_socket, NULL, 0, ZMQ_DONTWAIT) == 0) ++send_count; // Close connect rc = zmq_close (connect_socket); assert (rc == 0); // Set up bind socket void *bind_socket = zmq_socket (ctx, ZMQ_PULL); assert (bind_socket); rc = zmq_setsockopt (bind_socket, ZMQ_RCVHWM, &recv_hwm, sizeof (recv_hwm)); assert (rc == 0); rc = zmq_bind (bind_socket, "inproc://a"); assert (rc == 0); // Now receive all sent messages int recv_count = 0; while (zmq_recv (bind_socket, NULL, 0, ZMQ_DONTWAIT) == 0) ++recv_count; assert (send_count == recv_count); // Clean up rc = zmq_close (bind_socket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return send_count; } int test_inproc_bind_and_close_first (int send_hwm, int recv_hwm) { void *ctx = zmq_ctx_new (); assert (ctx); int rc; // Set up bind socket void *bind_socket = zmq_socket (ctx, ZMQ_PUSH); assert (bind_socket); rc = zmq_setsockopt (bind_socket, ZMQ_SNDHWM, &send_hwm, sizeof (send_hwm)); assert (rc == 0); rc = zmq_bind (bind_socket, "inproc://a"); assert (rc == 0); // Send until we block int send_count = 0; while (send_count < MAX_SENDS && zmq_send (bind_socket, NULL, 0, ZMQ_DONTWAIT) == 0) ++send_count; // Close bind rc = zmq_close (bind_socket); assert (rc == 0); /* Can't currently do connect without then wiring up a bind as things hang, this needs top be fixed. // Set up connect socket void *connect_socket = zmq_socket (ctx, ZMQ_PULL); assert (connect_socket); rc = zmq_setsockopt (connect_socket, ZMQ_RCVHWM, &recv_hwm, sizeof (recv_hwm)); assert (rc == 0); rc = zmq_connect (connect_socket, "inproc://a"); assert (rc == 0); // Now receive all sent messages int recv_count = 0; while (zmq_recv (connect_socket, NULL, 0, ZMQ_DONTWAIT) == 0) ++recv_count; assert (send_count == recv_count); */ // Clean up //rc = zmq_close (connect_socket); //assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return send_count; } int main (void) { setup_test_environment(); int count; // Default values are 1000 on send and 1000 one receive, so 2000 total count = test_defaults (); assert (count == 2000); // Infinite send and receive buffer count = test_inproc_bind_first (0, 0); assert (count == MAX_SENDS); count = test_inproc_connect_first (0, 0); assert (count == MAX_SENDS); // Infinite send buffer count = test_inproc_bind_first (1, 0); assert (count == MAX_SENDS); count = test_inproc_connect_first (1, 0); assert (count == MAX_SENDS); // Infinite receive buffer count = test_inproc_bind_first (0, 1); assert (count == MAX_SENDS); count = test_inproc_connect_first (0, 1); assert (count == MAX_SENDS); // Send and recv buffers hwm 1, so total that can be queued is 2 count = test_inproc_bind_first (1, 1); assert (count == 2); count = test_inproc_connect_first (1, 1); assert (count == 2); // Send hwm of 1, send before bind so total that can be queued is 1 count = test_inproc_connect_and_close_first (1, 0); assert (count == 1); // Send hwm of 1, send from bind side before connect so total that can be queued should be 1, // however currently all messages get thrown away before the connect. BUG? count = test_inproc_bind_and_close_first (1, 0); //assert (count == 1); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_abstract_ipc.cpp0000644000175000017500000000304312240736636021307 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_PAIR); assert (sb); int rc = zmq_bind (sb, "ipc://@/tmp/tester"); assert (rc == 0); char endpoint[200]; size_t size = sizeof(endpoint); rc = zmq_getsockopt (sb, ZMQ_LAST_ENDPOINT, endpoint, &size); assert (rc == 0); rc = strncmp(endpoint, "ipc://@/tmp/tester", size); assert (rc == 0); void *sc = zmq_socket (ctx, ZMQ_PAIR); assert (sc); rc = zmq_connect (sc, "ipc://@/tmp/tester"); assert (rc == 0); bounce (sb, sc); rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_term_endpoint.cpp0000644000175000017500000000560112240736636021522 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); int rc; char buf[32]; const char *ep = "tcp://127.0.0.1:5560"; // Create infrastructure. void *ctx = zmq_ctx_new (); assert (ctx); void *push = zmq_socket (ctx, ZMQ_PUSH); assert (push); rc = zmq_bind (push, ep); assert (rc == 0); void *pull = zmq_socket (ctx, ZMQ_PULL); assert (pull); rc = zmq_connect (pull, ep); assert (rc == 0); // Pass one message through to ensure the connection is established rc = zmq_send (push, "ABC", 3, 0); assert (rc == 3); rc = zmq_recv (pull, buf, sizeof (buf), 0); assert (rc == 3); // Unbind the listening endpoint rc = zmq_unbind (push, ep); assert (rc == 0); // Allow unbind to settle msleep (SETTLE_TIME); // Check that sending would block (there's no outbound connection) rc = zmq_send (push, "ABC", 3, ZMQ_DONTWAIT); assert (rc == -1 && zmq_errno () == EAGAIN); // Clean up rc = zmq_close (pull); assert (rc == 0); rc = zmq_close (push); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); // Create infrastructure ctx = zmq_ctx_new (); assert (ctx); push = zmq_socket (ctx, ZMQ_PUSH); assert (push); rc = zmq_connect (push, ep); assert (rc == 0); pull = zmq_socket (ctx, ZMQ_PULL); assert (pull); rc = zmq_bind (pull, ep); assert (rc == 0); // Pass one message through to ensure the connection is established. rc = zmq_send (push, "ABC", 3, 0); assert (rc == 3); rc = zmq_recv (pull, buf, sizeof (buf), 0); assert (rc == 3); // Disconnect the bound endpoint rc = zmq_disconnect (push, ep); assert (rc == 0); // Allow disconnect to settle msleep (SETTLE_TIME); // Check that sending would block (there's no inbound connections). rc = zmq_send (push, "ABC", 3, ZMQ_DONTWAIT); assert (rc == -1 && zmq_errno () == EAGAIN); // Clean up. rc = zmq_close (pull); assert (rc == 0); rc = zmq_close (push); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_msg_flags.cpp0000644000175000017500000000411212240736636020611 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); // Create the infrastructure void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_ROUTER); assert (sb); int rc = zmq_bind (sb, "inproc://a"); assert (rc == 0); void *sc = zmq_socket (ctx, ZMQ_DEALER); assert (sc); rc = zmq_connect (sc, "inproc://a"); assert (rc == 0); // Send 2-part message. rc = zmq_send (sc, "A", 1, ZMQ_SNDMORE); assert (rc == 1); rc = zmq_send (sc, "B", 1, 0); assert (rc == 1); // Identity comes first. zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, sb, 0); assert (rc >= 0); int more = zmq_msg_more (&msg); assert (more == 1); // Then the first part of the message body. rc = zmq_msg_recv (&msg, sb, 0); assert (rc == 1); more = zmq_msg_more (&msg); assert (more == 1); // And finally, the second part of the message body. rc = zmq_msg_recv (&msg, sb, 0); assert (rc == 1); more = zmq_msg_more (&msg); assert (more == 0); // Deallocate the infrastructure. rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_spec_pushpull.cpp0000644000175000017500000001743012240736636021544 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" const char *bind_address = 0; const char *connect_address = 0; void test_push_round_robin_out (void *ctx) { void *push = zmq_socket (ctx, ZMQ_PUSH); assert (push); int rc = zmq_bind (push, bind_address); assert (rc == 0); const size_t services = 5; void *pulls [services]; for (size_t peer = 0; peer < services; ++peer) { pulls [peer] = zmq_socket (ctx, ZMQ_PULL); assert (pulls [peer]); int timeout = 100; rc = zmq_setsockopt (pulls [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_connect (pulls [peer], connect_address); assert (rc == 0); } // Wait for connections. rc = zmq_poll (0, 0, 100); assert (rc == 0); // Send 2N messages for (size_t peer = 0; peer < services; ++peer) s_send_seq (push, "ABC", SEQ_END); for (size_t peer = 0; peer < services; ++peer) s_send_seq (push, "DEF", SEQ_END); // Expect every PULL got one of each for (size_t peer = 0; peer < services; ++peer) { s_recv_seq (pulls [peer], "ABC", SEQ_END); s_recv_seq (pulls [peer], "DEF", SEQ_END); } close_zero_linger (push); for (size_t peer = 0; peer < services; ++peer) close_zero_linger (pulls [peer]); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_pull_fair_queue_in (void *ctx) { void *pull = zmq_socket (ctx, ZMQ_PULL); assert (pull); int rc = zmq_bind (pull, bind_address); assert (rc == 0); const size_t services = 5; void *pushs [services]; for (size_t peer = 0; peer < services; ++peer) { pushs [peer] = zmq_socket (ctx, ZMQ_PUSH); assert (pushs [peer]); rc = zmq_connect (pushs [peer], connect_address); assert (rc == 0); } // Wait for connections. rc = zmq_poll (0, 0, 100); assert (rc == 0); int first_half = 0; int second_half = 0; // Send 2N messages for (size_t peer = 0; peer < services; ++peer) { char *str = strdup("A"); str [0] += peer; s_send_seq (pushs [peer], str, SEQ_END); first_half += str [0]; str [0] += services; s_send_seq (pushs [peer], str, SEQ_END); second_half += str [0]; free (str); } // Wait for data. rc = zmq_poll (0, 0, 100); assert (rc == 0); zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); // Expect to pull one from each first for (size_t peer = 0; peer < services; ++peer) { rc = zmq_msg_recv (&msg, pull, 0); assert (rc == 2); const char *str = (const char *)zmq_msg_data (&msg); first_half -= str [0]; } assert (first_half == 0); // And then get the second batch for (size_t peer = 0; peer < services; ++peer) { rc = zmq_msg_recv (&msg, pull, 0); assert (rc == 2); const char *str = (const char *)zmq_msg_data (&msg); second_half -= str [0]; } assert (second_half == 0); rc = zmq_msg_close (&msg); assert (rc == 0); close_zero_linger (pull); for (size_t peer = 0; peer < services; ++peer) close_zero_linger (pushs [peer]); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_push_block_on_send_no_peers (void *ctx) { void *sc = zmq_socket (ctx, ZMQ_PUSH); assert (sc); int timeout = 100; int rc = zmq_setsockopt (sc, ZMQ_SNDTIMEO, &timeout, sizeof (timeout)); assert (rc == 0); rc = zmq_send (sc, 0, 0, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_send (sc, 0, 0, 0); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_close (sc); assert (rc == 0); } void test_destroy_queue_on_disconnect (void *ctx) { void *A = zmq_socket (ctx, ZMQ_PUSH); assert (A); int hwm = 1; int rc = zmq_setsockopt (A, ZMQ_SNDHWM, &hwm, sizeof (hwm)); assert (rc == 0); rc = zmq_bind (A, bind_address); assert (rc == 0); void *B = zmq_socket (ctx, ZMQ_PULL); assert (B); rc = zmq_setsockopt (B, ZMQ_RCVHWM, &hwm, sizeof (hwm)); assert (rc == 0); rc = zmq_connect (B, connect_address); assert (rc == 0); // Send two messages, one should be stuck in A's outgoing queue, the other // arrives at B. s_send_seq (A, "ABC", SEQ_END); s_send_seq (A, "DEF", SEQ_END); // Both queues should now be full, indicated by A blocking on send. rc = zmq_send (A, 0, 0, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_disconnect (B, connect_address); assert (rc == 0); // Disconnect may take time and need command processing. zmq_pollitem_t poller [2] = { { A, 0, 0, 0 }, { B, 0, 0, 0 } }; rc = zmq_poll (poller, 2, 100); assert (rc == 0); rc = zmq_poll (poller, 2, 100); assert (rc == 0); zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); // Can't receive old data on B. rc = zmq_msg_recv (&msg, B, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); // Sending fails. rc = zmq_send (A, 0, 0, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); // Reconnect B rc = zmq_connect (B, connect_address); assert (rc == 0); // Still can't receive old data on B. rc = zmq_msg_recv (&msg, B, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); // two messages should be sendable before the queues are filled up. s_send_seq (A, "ABC", SEQ_END); s_send_seq (A, "DEF", SEQ_END); rc = zmq_send (A, 0, 0, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_msg_close (&msg); assert (rc == 0); close_zero_linger (A); close_zero_linger (B); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transport = 0; transport < 2; ++transport) { bind_address = binds [transport]; connect_address = connects [transport]; // PUSH: SHALL route outgoing messages to connected peers using a // round-robin strategy. test_push_round_robin_out (ctx); // PULL: SHALL receive incoming messages from its peers using a fair-queuing // strategy. test_pull_fair_queue_in (ctx); // PUSH: SHALL block on sending, or return a suitable error, when it has no // available peers. test_push_block_on_send_no_peers (ctx); // PUSH and PULL: SHALL create this queue when a peer connects to it. If // this peer disconnects, the socket SHALL destroy its queue and SHALL // discard any messages it contains. // *** Test disabled until libzmq does this properly *** // test_destroy_queue_on_disconnect (ctx); } int rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_probe_router.cpp0000644000175000017500000000416612240736636021367 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); // Create server and bind to endpoint void *server = zmq_socket (ctx, ZMQ_ROUTER); assert (server); int rc = zmq_bind (server, "tcp://127.0.0.1:5560"); assert (rc == 0); // Create client and connect to server, doing a probe void *client = zmq_socket (ctx, ZMQ_ROUTER); assert (client); rc = zmq_setsockopt (client, ZMQ_IDENTITY, "X", 1); assert (rc == 0); int probe = 1; rc = zmq_setsockopt (client, ZMQ_PROBE_ROUTER, &probe, sizeof (probe)); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:5560"); assert (rc == 0); // We expect an identity=X + empty message from client unsigned char buffer [255]; rc = zmq_recv (server, buffer, 255, 0); assert (rc == 1); assert (buffer [0] == 'X'); rc = zmq_recv (server, buffer, 255, 0); assert (rc == 0); // Send a message to client now rc = zmq_send (server, "X", 1, ZMQ_SNDMORE); assert (rc == 1); rc = zmq_send (server, "Hello", 5, 0); assert (rc == 5); rc = zmq_recv (client, buffer, 255, 0); assert (rc == 5); rc = zmq_close (server); assert (rc == 0); rc = zmq_close (client); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_req_correlate.cpp0000644000175000017500000001256612240736636021512 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *req = zmq_socket (ctx, ZMQ_REQ); assert (req); void *router = zmq_socket (ctx, ZMQ_ROUTER); assert (router); int enabled = 1; int rc = zmq_setsockopt (req, ZMQ_REQ_CORRELATE, &enabled, sizeof (int)); assert (rc == 0); int rcvtimeo = 100; rc = zmq_setsockopt (req, ZMQ_RCVTIMEO, &rcvtimeo, sizeof (int)); assert (rc == 0); rc = zmq_connect (req, "tcp://localhost:5555"); assert (rc == 0); rc = zmq_bind (router, "tcp://127.0.0.1:5555"); assert (rc == 0); // Send a multi-part request. s_send_seq (req, "ABC", "DEF", SEQ_END); zmq_msg_t msg; zmq_msg_init (&msg); // Receive peer identity rc = zmq_msg_recv (&msg, router, 0); assert (rc != -1); assert (zmq_msg_size (&msg) > 0); zmq_msg_t peer_id_msg; zmq_msg_init (&peer_id_msg); zmq_msg_copy (&peer_id_msg, &msg); int more = 0; size_t more_size = sizeof (more); rc = zmq_getsockopt (router, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); assert (more); // Receive request id 1 rc = zmq_msg_recv (&msg, router, 0); assert (rc != -1); assert (zmq_msg_size (&msg) == sizeof(uint32_t)); uint32_t req_id = *static_cast (zmq_msg_data (&msg)); zmq_msg_t req_id_msg; zmq_msg_init (&req_id_msg); zmq_msg_copy (&req_id_msg, &msg); more = 0; more_size = sizeof (more); rc = zmq_getsockopt (router, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); assert (more); // Receive the rest. s_recv_seq (router, 0, "ABC", "DEF", SEQ_END); // Send back a bad reply: correct req id zmq_msg_copy (&msg, &peer_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); zmq_msg_copy (&msg, &req_id_msg); rc = zmq_msg_send (&msg, router, 0); assert (rc != -1); // Send back a bad reply: wrong req id zmq_msg_copy (&msg, &peer_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); uint32_t bad_req_id = req_id + 1; zmq_msg_init_data (&msg, &bad_req_id, sizeof (uint32_t), NULL, NULL); rc = zmq_msg_send (&msg, router, 0); assert (rc != -1); // Send back a bad reply: correct req id, 0 zmq_msg_copy (&msg, &peer_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); zmq_msg_copy (&msg, &req_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); s_send_seq (router, 0, SEQ_END); // Send back a bad reply: correct req id, garbage zmq_msg_copy (&msg, &peer_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); zmq_msg_copy (&msg, &req_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); s_send_seq (router, "FOO", SEQ_END); // Send back a bad reply: wrong req id, 0 zmq_msg_copy (&msg, &peer_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); zmq_msg_init_data (&msg, &bad_req_id, sizeof (uint32_t), NULL, NULL); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); s_send_seq (router, 0, SEQ_END); // Send back a bad reply: correct req id, garbage, data zmq_msg_copy (&msg, &peer_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); zmq_msg_copy (&msg, &req_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); s_send_seq (router, "FOO", "DATA", SEQ_END); // Send back a bad reply: wrong req id, 0, data zmq_msg_copy (&msg, &peer_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); zmq_msg_init_data (&msg, &bad_req_id, sizeof (uint32_t), NULL, NULL); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); s_send_seq (router, 0, "DATA", SEQ_END); // Send back a good reply. zmq_msg_copy (&msg, &peer_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); zmq_msg_copy (&msg, &req_id_msg); rc = zmq_msg_send (&msg, router, ZMQ_SNDMORE); assert (rc != -1); s_send_seq (router, 0, "GHI", SEQ_END); // Receive reply. If any of the other messages got through, we wouldn't see // this particular data. s_recv_seq (req, "GHI", SEQ_END); rc = zmq_msg_close (&msg); assert (rc == 0); rc = zmq_msg_close (&peer_id_msg); assert (rc == 0); rc = zmq_msg_close (&req_id_msg); assert (rc == 0); close_zero_linger (req); close_zero_linger (router); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_connect_resolve.cpp0000644000175000017500000000271712240736636022050 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *sock = zmq_socket (ctx, ZMQ_PUB); assert (sock); int rc = zmq_connect (sock, "tcp://localhost:1234"); assert (rc == 0); rc = zmq_connect (sock, "tcp://localhost:invalid"); assert (rc == -1); assert (errno == EINVAL); rc = zmq_connect (sock, "tcp://in val id:1234"); assert (rc == -1); assert (errno == EINVAL); rc = zmq_connect (sock, "invalid://localhost:1234"); assert (rc == -1); assert (errno == EPROTONOSUPPORT); rc = zmq_close (sock); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_reqrep_ipc.cpp0000644000175000017500000000247412240736636021011 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_REP); assert (sb); int rc = zmq_bind (sb, "ipc:///tmp/tester"); assert (rc == 0); void *sc = zmq_socket (ctx, ZMQ_REQ); assert (sc); rc = zmq_connect (sc, "ipc:///tmp/tester"); assert (rc == 0); bounce (sb, sc); rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_spec_req.cpp0000644000175000017500000001627312240736636020463 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" const char *bind_address = 0; const char *connect_address = 0; void test_round_robin_out (void *ctx) { void *req = zmq_socket (ctx, ZMQ_REQ); assert (req); int rc = zmq_bind (req, bind_address); assert (rc == 0); const size_t services = 5; void *rep [services]; for (size_t peer = 0; peer < services; peer++) { rep [peer] = zmq_socket (ctx, ZMQ_REP); assert (rep [peer]); int timeout = 100; rc = zmq_setsockopt (rep [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_connect (rep [peer], connect_address); assert (rc == 0); } // We have to give the connects time to finish otherwise the requests // will not properly round-robin. We could alternatively connect the // REQ sockets to the REP sockets. msleep (SETTLE_TIME); // Send our peer-replies, and expect every REP it used once in order for (size_t peer = 0; peer < services; peer++) { s_send_seq (req, "ABC", SEQ_END); s_recv_seq (rep [peer], "ABC", SEQ_END); s_send_seq (rep [peer], "DEF", SEQ_END); s_recv_seq (req, "DEF", SEQ_END); } close_zero_linger (req); for (size_t peer = 0; peer < services; peer++) close_zero_linger (rep [peer]); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_req_only_listens_to_current_peer (void *ctx) { void *req = zmq_socket (ctx, ZMQ_REQ); assert (req); int rc = zmq_setsockopt(req, ZMQ_IDENTITY, "A", 2); assert (rc == 0); rc = zmq_bind (req, bind_address); assert (rc == 0); const size_t services = 3; void *router [services]; for (size_t i = 0; i < services; ++i) { router [i] = zmq_socket (ctx, ZMQ_ROUTER); assert (router [i]); int timeout = 100; rc = zmq_setsockopt (router [i], ZMQ_RCVTIMEO, &timeout, sizeof (timeout)); assert (rc == 0); int enabled = 1; rc = zmq_setsockopt (router [i], ZMQ_ROUTER_MANDATORY, &enabled, sizeof (enabled)); assert (rc == 0); rc = zmq_connect (router [i], connect_address); assert (rc == 0); } // Wait for connects to finish. rc = zmq_poll (0, 0, 100); assert (rc == 0); for (size_t i = 0; i < services; ++i) { // There still is a race condition when a stale peer's message // arrives at the REQ just after a request was sent to that peer. // To avoid that happening in the test, sleep for a bit. rc = zmq_poll (0, 0, 10); assert (rc == 0); s_send_seq (req, "ABC", SEQ_END); // Receive on router i s_recv_seq (router [i], "A", 0, "ABC", SEQ_END); // Send back replies on all routers for (size_t j = 0; j < services; ++j) { const char *replies [] = { "WRONG", "GOOD" }; const char *reply = replies [i == j ? 1 : 0]; s_send_seq (router [j], "A", 0, reply, SEQ_END); } // Receive only the good reply s_recv_seq (req, "GOOD", SEQ_END); } close_zero_linger (req); for (size_t i = 0; i < services; ++i) close_zero_linger (router [i]); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_req_message_format (void *ctx) { void *req = zmq_socket (ctx, ZMQ_REQ); assert (req); void *router = zmq_socket (ctx, ZMQ_ROUTER); assert (router); int rc = zmq_bind (req, bind_address); assert (rc == 0); rc = zmq_connect (router, connect_address); assert (rc == 0); // Send a multi-part request. s_send_seq (req, "ABC", "DEF", SEQ_END); zmq_msg_t msg; zmq_msg_init (&msg); // Receive peer identity rc = zmq_msg_recv (&msg, router, 0); assert (rc != -1); assert (zmq_msg_size (&msg) > 0); zmq_msg_t peer_id_msg; zmq_msg_init (&peer_id_msg); zmq_msg_copy (&peer_id_msg, &msg); int more = 0; size_t more_size = sizeof (more); rc = zmq_getsockopt (router, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); assert (more); // Receive the rest. s_recv_seq (router, 0, "ABC", "DEF", SEQ_END); // Send back a single-part reply. rc = zmq_msg_send (&peer_id_msg, router, ZMQ_SNDMORE); assert (rc != -1); s_send_seq (router, 0, "GHI", SEQ_END); // Receive reply. s_recv_seq (req, "GHI", SEQ_END); rc = zmq_msg_close (&msg); assert (rc == 0); rc = zmq_msg_close (&peer_id_msg); assert (rc == 0); close_zero_linger (req); close_zero_linger (router); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_block_on_send_no_peers (void *ctx) { void *sc = zmq_socket (ctx, ZMQ_REQ); assert (sc); int timeout = 100; int rc = zmq_setsockopt (sc, ZMQ_SNDTIMEO, &timeout, sizeof (timeout)); assert (rc == 0); rc = zmq_send (sc, 0, 0, ZMQ_DONTWAIT); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_send (sc, 0, 0, 0); assert (rc == -1); assert (errno == EAGAIN); rc = zmq_close (sc); assert (rc == 0); } int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transport = 0; transport < 2; transport++) { bind_address = binds [transport]; connect_address = connects [transport]; // SHALL route outgoing messages to connected peers using a round-robin // strategy. test_round_robin_out (ctx); // The request and reply messages SHALL have this format on the wire: // * A delimiter, consisting of an empty frame, added by the REQ socket. // * One or more data frames, comprising the message visible to the // application. test_req_message_format (ctx); // SHALL block on sending, or return a suitable error, when it has no // connected peers. test_block_on_send_no_peers (ctx); // SHALL accept an incoming message only from the last peer that it sent a // request to. // SHALL discard silently any messages received from other peers. // PH: this test is still failing; disabled for now to allow build to // complete. // test_req_only_listens_to_current_peer (ctx); } int rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_security_curve.cpp0000644000175000017500000001641512240736636021733 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" // We'll generate random test keys at startup static char client_public [41]; static char client_secret [41]; static char server_public [41]; static char server_secret [41]; // -------------------------------------------------------------------------- // Encode a binary frame as a string; destination string MUST be at least // size * 5 / 4 bytes long plus 1 byte for the null terminator. Returns // dest. Size must be a multiple of 4. static void zap_handler (void *handler) { // Process ZAP requests forever while (true) { char *version = s_recv (handler); if (!version) break; // Terminating char *sequence = s_recv (handler); char *domain = s_recv (handler); char *address = s_recv (handler); char *identity = s_recv (handler); char *mechanism = s_recv (handler); uint8_t client_key [32]; int size = zmq_recv (handler, client_key, 32, 0); assert (size == 32); char client_key_text [41]; zmq_z85_encode (client_key_text, client_key, 32); assert (streq (version, "1.0")); assert (streq (mechanism, "CURVE")); assert (streq (identity, "IDENT")); s_sendmore (handler, version); s_sendmore (handler, sequence); if (streq (client_key_text, client_public)) { s_sendmore (handler, "200"); s_sendmore (handler, "OK"); s_sendmore (handler, "anonymous"); s_send (handler, ""); } else { s_sendmore (handler, "400"); s_sendmore (handler, "Invalid client public key"); s_sendmore (handler, ""); s_send (handler, ""); } free (version); free (sequence); free (domain); free (address); free (identity); free (mechanism); } zmq_close (handler); } int main (void) { #ifndef HAVE_LIBSODIUM printf ("libsodium not installed, skipping CURVE test\n"); return 0; #endif // Generate new keypairs for this test int rc = zmq_curve_keypair (client_public, client_secret); assert (rc == 0); rc = zmq_curve_keypair (server_public, server_secret); assert (rc == 0); setup_test_environment (); void *ctx = zmq_ctx_new (); assert (ctx); // Spawn ZAP handler // We create and bind ZAP socket in main thread to avoid case // where child thread does not start up fast enough. void *handler = zmq_socket (ctx, ZMQ_REP); assert (handler); rc = zmq_bind (handler, "inproc://zeromq.zap.01"); assert (rc == 0); void *zap_thread = zmq_threadstart (&zap_handler, handler); // Server socket will accept connections void *server = zmq_socket (ctx, ZMQ_DEALER); assert (server); int as_server = 1; rc = zmq_setsockopt (server, ZMQ_CURVE_SERVER, &as_server, sizeof (int)); assert (rc == 0); rc = zmq_setsockopt (server, ZMQ_CURVE_SECRETKEY, server_secret, 40); assert (rc == 0); rc = zmq_setsockopt (server, ZMQ_IDENTITY, "IDENT", 6); assert (rc == 0); rc = zmq_bind (server, "tcp://127.0.0.1:9998"); assert (rc == 0); // Check CURVE security with valid credentials void *client = zmq_socket (ctx, ZMQ_DEALER); assert (client); rc = zmq_setsockopt (client, ZMQ_CURVE_SERVERKEY, server_public, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_PUBLICKEY, client_public, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_SECRETKEY, client_secret, 40); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9998"); assert (rc == 0); bounce (server, client); rc = zmq_close (client); assert (rc == 0); // Check CURVE security with a garbage server key // This will be caught by the curve_server class, not passed to ZAP char garbage_key [] = "0000111122223333444455556666777788889999"; client = zmq_socket (ctx, ZMQ_DEALER); assert (client); rc = zmq_setsockopt (client, ZMQ_CURVE_SERVERKEY, garbage_key, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_PUBLICKEY, client_public, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_SECRETKEY, client_secret, 40); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9998"); assert (rc == 0); expect_bounce_fail (server, client); close_zero_linger (client); // Check CURVE security with a garbage client public key // This will be caught by the curve_server class, not passed to ZAP client = zmq_socket (ctx, ZMQ_DEALER); assert (client); rc = zmq_setsockopt (client, ZMQ_CURVE_SERVERKEY, server_public, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_PUBLICKEY, garbage_key, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_SECRETKEY, client_secret, 40); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9998"); assert (rc == 0); expect_bounce_fail (server, client); close_zero_linger (client); // Check CURVE security with a garbage client secret key // This will be caught by the curve_server class, not passed to ZAP client = zmq_socket (ctx, ZMQ_DEALER); assert (client); rc = zmq_setsockopt (client, ZMQ_CURVE_SERVERKEY, server_public, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_PUBLICKEY, client_public, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_SECRETKEY, garbage_key, 40); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9998"); assert (rc == 0); expect_bounce_fail (server, client); close_zero_linger (client); // Check CURVE security with bogus client credentials // This must be caught by the ZAP handler char bogus_public [41]; char bogus_secret [41]; zmq_curve_keypair (bogus_public, bogus_secret); client = zmq_socket (ctx, ZMQ_DEALER); assert (client); rc = zmq_setsockopt (client, ZMQ_CURVE_SERVERKEY, server_public, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_PUBLICKEY, bogus_public, 40); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_CURVE_SECRETKEY, bogus_secret, 40); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9998"); assert (rc == 0); expect_bounce_fail (server, client); close_zero_linger (client); // Shutdown rc = zmq_close (server); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); // Wait until ZAP handler terminates zmq_threadclose (zap_thread); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_fork.cpp0000644000175000017500000000463112240736636017616 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" const char *address = "tcp://127.0.0.1:6571"; #define NUM_MESSAGES 5 int main (void) { setup_test_environment (); void *ctx = zmq_ctx_new (); assert (ctx); // Create and bind pull socket to receive messages void *pull = zmq_socket (ctx, ZMQ_PULL); assert (pull); int rc = zmq_bind (pull, address); assert (rc == 0); int pid = fork (); if (pid == 0) { // Child process // Immediately close parent sockets and context zmq_close (pull); zmq_term (ctx); // Create new context, socket, connect and send some messages void *child_ctx = zmq_ctx_new (); assert (child_ctx); void *push = zmq_socket (child_ctx, ZMQ_PUSH); assert (push); rc = zmq_connect (push, address); assert (rc == 0); int count; for (count = 0; count < NUM_MESSAGES; count++) zmq_send (push, "Hello", 5, 0); zmq_close (push); zmq_ctx_destroy (child_ctx); exit (0); } else { // Parent process int count; for (count = 0; count < NUM_MESSAGES; count++) { char buffer [5]; int num_bytes = zmq_recv (pull, buffer, 5, 0); assert (num_bytes == 5); } int child_status; while (true) { rc = waitpid (pid, &child_status, 0); if (rc == -1 && errno == EINTR) continue; assert (rc > 0); // Verify the status code of the child was zero assert (WEXITSTATUS (child_status) == 0); break; } exit (0); } return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_security_plain.cpp0000644000175000017500000001122612240736636021705 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" static void zap_handler (void *ctx) { // Create and bind ZAP socket void *zap = zmq_socket (ctx, ZMQ_REP); assert (zap); int rc = zmq_bind (zap, "inproc://zeromq.zap.01"); assert (rc == 0); // Process ZAP requests forever while (true) { char *version = s_recv (zap); if (!version) break; // Terminating char *sequence = s_recv (zap); char *domain = s_recv (zap); char *address = s_recv (zap); char *identity = s_recv (zap); char *mechanism = s_recv (zap); char *username = s_recv (zap); char *password = s_recv (zap); assert (streq (version, "1.0")); assert (streq (mechanism, "PLAIN")); assert (streq (identity, "IDENT")); s_sendmore (zap, version); s_sendmore (zap, sequence); if (streq (username, "admin") && streq (password, "password")) { s_sendmore (zap, "200"); s_sendmore (zap, "OK"); s_sendmore (zap, "anonymous"); s_send (zap, ""); } else { s_sendmore (zap, "400"); s_sendmore (zap, "Invalid username or password"); s_sendmore (zap, ""); s_send (zap, ""); } free (version); free (sequence); free (domain); free (address); free (identity); free (mechanism); free (username); free (password); } rc = zmq_close (zap); assert (rc == 0); } int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); // Spawn ZAP handler void *zap_thread = zmq_threadstart (&zap_handler, ctx); // Server socket will accept connections void *server = zmq_socket (ctx, ZMQ_DEALER); assert (server); int rc = zmq_setsockopt (server, ZMQ_IDENTITY, "IDENT", 6); assert (rc == 0); int as_server = 1; rc = zmq_setsockopt (server, ZMQ_PLAIN_SERVER, &as_server, sizeof (int)); assert (rc == 0); rc = zmq_bind (server, "tcp://127.0.0.1:9998"); assert (rc == 0); char username [256]; char password [256]; // Check PLAIN security with correct username/password void *client = zmq_socket (ctx, ZMQ_DEALER); assert (client); strcpy (username, "admin"); rc = zmq_setsockopt (client, ZMQ_PLAIN_USERNAME, username, strlen (username)); assert (rc == 0); strcpy (password, "password"); rc = zmq_setsockopt (client, ZMQ_PLAIN_PASSWORD, password, strlen (password)); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9998"); assert (rc == 0); bounce (server, client); rc = zmq_close (client); assert (rc == 0); // Check PLAIN security with badly configured client (as_server) // This will be caught by the plain_server class, not passed to ZAP client = zmq_socket (ctx, ZMQ_DEALER); assert (client); as_server = 1; rc = zmq_setsockopt (client, ZMQ_PLAIN_SERVER, &as_server, sizeof (int)); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9998"); assert (rc == 0); expect_bounce_fail (server, client); close_zero_linger (client); // Check PLAIN security -- failed authentication client = zmq_socket (ctx, ZMQ_DEALER); assert (client); strcpy (username, "wronguser"); strcpy (password, "wrongpass"); rc = zmq_setsockopt (client, ZMQ_PLAIN_USERNAME, username, strlen (username)); assert (rc == 0); rc = zmq_setsockopt (client, ZMQ_PLAIN_PASSWORD, password, strlen (password)); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9998"); assert (rc == 0); expect_bounce_fail (server, client); close_zero_linger (client); // Shutdown rc = zmq_close (server); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); // Wait until ZAP handler terminates zmq_threadclose (zap_thread); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_reqrep_tcp.cpp0000644000175000017500000000250212240736636021014 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_REP); assert (sb); int rc = zmq_bind (sb, "tcp://127.0.0.1:5560"); assert (rc == 0); void *sc = zmq_socket (ctx, ZMQ_REQ); assert (sc); rc = zmq_connect (sc, "tcp://127.0.0.1:5560"); assert (rc == 0); bounce (sb, sc); rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_many_sockets.cpp0000644000175000017500000000477212251014562021347 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" #include #include #include #include void test_system_max () { // Keep allocating sockets until we run out of system resources const int no_of_sockets = 2 * 65536; void *ctx = zmq_ctx_new (); zmq_ctx_set (ctx, ZMQ_MAX_SOCKETS, no_of_sockets); std::vector sockets; while (true) { void *socket = zmq_socket (ctx, ZMQ_PAIR); if (!socket) break; sockets.push_back (socket); } assert ((int) sockets.size () < no_of_sockets); // System is out of resources, further calls to zmq_socket should return NULL for (unsigned int i = 0; i < 10; ++i) { void *socket = zmq_socket (ctx, ZMQ_PAIR); assert (socket == NULL); } // Clean up. for (unsigned int i = 0; i < sockets.size (); ++i) zmq_close (sockets [i]); zmq_ctx_destroy (ctx); } void test_zmq_default_max () { // Keep allocating sockets until we hit the default limit void *ctx = zmq_ctx_new (); std::vector sockets; while (true) { void *socket = zmq_socket (ctx, ZMQ_PAIR); if (!socket) break; sockets.push_back (socket); } // We may stop sooner if system has fewer available sockets assert (sockets.size () <= ZMQ_MAX_SOCKETS_DFLT); // Further calls to zmq_socket should return NULL for (unsigned int i = 0; i < 10; ++i) { void *socket = zmq_socket (ctx, ZMQ_PAIR); assert (socket == NULL); } // Clean up for (unsigned int i = 0; i < sockets.size (); ++i) zmq_close (sockets [i]); zmq_ctx_destroy (ctx); } int main (void) { setup_test_environment (); test_system_max (); test_zmq_default_max (); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_issue_566.cpp0000644000175000017500000000605312240736636020405 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" // Issue 566 describes a problem in libzmq v4.0.0 where a dealer to router // connection would fail randomly. The test works when the two sockets are // on the same context, and failed when they were on separate contexts. // Fixed by https://github.com/zeromq/libzmq/commit/be25cf. int main (void) { setup_test_environment(); void *ctx1 = zmq_ctx_new (); assert (ctx1); void *ctx2 = zmq_ctx_new (); assert (ctx2); void *router = zmq_socket (ctx1, ZMQ_ROUTER); int on = 1; int rc = zmq_setsockopt (router, ZMQ_ROUTER_MANDATORY, &on, sizeof (on)); assert (rc == 0); rc = zmq_bind (router, "tcp://127.0.0.1:5555"); assert (rc != -1); // Repeat often enough to be sure this works as it should for (int cycle = 0; cycle < 100; cycle++) { // Create dealer with unique explicit identity // We assume the router learns this out-of-band void *dealer = zmq_socket (ctx2, ZMQ_DEALER); char identity [10]; sprintf (identity, "%09d", cycle); rc = zmq_setsockopt (dealer, ZMQ_IDENTITY, identity, 10); assert (rc == 0); int rcvtimeo = 1000; rc = zmq_setsockopt (dealer, ZMQ_RCVTIMEO, &rcvtimeo, sizeof (int)); assert (rc == 0); rc = zmq_connect (dealer, "tcp://127.0.0.1:5555"); assert (rc == 0); // Router will try to send to dealer, at short intervals. // It typically takes 2-5 msec for the connection to establish // on a loopback interface, but we'll allow up to one second // before failing the test (e.g. for running on a debugger or // a very slow system). for (int attempt = 0; attempt < 500; attempt++) { zmq_poll (0, 0, 2); rc = zmq_send (router, identity, 10, ZMQ_SNDMORE); if (rc == -1 && errno == EHOSTUNREACH) continue; assert (rc == 10); rc = zmq_send (router, "HELLO", 5, 0); assert (rc == 5); break; } uint8_t buffer [5]; rc = zmq_recv (dealer, buffer, 5, 0); assert (rc == 5); assert (memcmp (buffer, "HELLO", 5) == 0); close_zero_linger (dealer); } zmq_close (router); zmq_ctx_destroy (ctx1); zmq_ctx_destroy (ctx2); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_disconnect_inproc.cpp0000644000175000017500000001144012240736636022354 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" /// Initialize a zeromq message with a given null-terminated string #define ZMQ_PREPARE_STRING(msg, data, size) \ zmq_msg_init(&msg) && printf("zmq_msg_init: %s\n", zmq_strerror(errno)); \ zmq_msg_init_size (&msg, size + 1) && printf("zmq_msg_init_size: %s\n",zmq_strerror(errno)); \ memcpy(zmq_msg_data(&msg), data, size + 1); int publicationsReceived = 0; bool isSubscribed = false; int main(int argc, char** argv) { setup_test_environment(); void* context = zmq_ctx_new(); void* pubSocket; void* subSocket; (pubSocket = zmq_socket(context, ZMQ_XPUB)) || printf("zmq_socket: %s\n", zmq_strerror(errno)); (subSocket = zmq_socket(context, ZMQ_SUB)) || printf("zmq_socket: %s\n", zmq_strerror(errno)); zmq_setsockopt(subSocket, ZMQ_SUBSCRIBE, "foo", 3) && printf("zmq_setsockopt: %s\n",zmq_strerror(errno)); zmq_bind(pubSocket, "inproc://someInProcDescriptor") && printf("zmq_bind: %s\n", zmq_strerror(errno)); //zmq_bind(pubSocket, "tcp://127.0.0.1:30010") && printf("zmq_bind: %s\n", zmq_strerror(errno)); int more; size_t more_size = sizeof(more); int iteration = 0; while (1) { zmq_pollitem_t items [] = { { subSocket, 0, ZMQ_POLLIN, 0 }, // read publications { pubSocket, 0, ZMQ_POLLIN, 0 }, // read subscriptions }; int rc = zmq_poll (items, 2, 100); if (items [1].revents & ZMQ_POLLIN) { while (1) { zmq_msg_t msg; zmq_msg_init (&msg); zmq_msg_recv (&msg, pubSocket, 0); char* buffer = (char*)zmq_msg_data(&msg); if (buffer[0] == 0) { assert(isSubscribed); isSubscribed = false; } else { assert(!isSubscribed); isSubscribed = true; } zmq_getsockopt (pubSocket, ZMQ_RCVMORE, &more, &more_size); zmq_msg_close (&msg); if (!more) break; // Last message part } } if (items[0].revents & ZMQ_POLLIN) { while (1) { zmq_msg_t msg; zmq_msg_init (&msg); zmq_msg_recv (&msg, subSocket, 0); zmq_getsockopt (subSocket, ZMQ_RCVMORE, &more, &more_size); zmq_msg_close (&msg); if (!more) { publicationsReceived++; break; // Last message part } } } if (iteration == 1) { zmq_connect(subSocket, "inproc://someInProcDescriptor") && printf("zmq_connect: %s\n", zmq_strerror(errno)); //zmq_connect(subSocket, "tcp://127.0.0.1:30010") && printf("zmq_connect: %s\n", zmq_strerror(errno)); } if (iteration == 4) { zmq_disconnect(subSocket, "inproc://someInProcDescriptor") && printf("zmq_disconnect(%d): %s\n", errno, zmq_strerror(errno)); //zmq_disconnect(subSocket, "tcp://127.0.0.1:30010") && printf("zmq_disconnect: %s\n", zmq_strerror(errno)); } if (iteration > 4 && rc == 0) break; zmq_msg_t channelEnvlp; ZMQ_PREPARE_STRING(channelEnvlp, "foo", 3); zmq_msg_send (&channelEnvlp, pubSocket, ZMQ_SNDMORE) >= 0 || printf("zmq_msg_send: %s\n",zmq_strerror(errno)); zmq_msg_close(&channelEnvlp) && printf("zmq_msg_close: %s\n",zmq_strerror(errno)); zmq_msg_t message; ZMQ_PREPARE_STRING(message, "this is foo!", 12); zmq_msg_send (&message, pubSocket, 0) >= 0 || printf("zmq_msg_send: %s\n",zmq_strerror(errno)); zmq_msg_close(&message) && printf("zmq_msg_close: %s\n",zmq_strerror(errno)); iteration++; } assert(publicationsReceived == 3); assert(!isSubscribed); zmq_close(pubSocket) && printf("zmq_close: %s", zmq_strerror(errno)); zmq_close(subSocket) && printf("zmq_close: %s", zmq_strerror(errno)); zmq_ctx_term(context); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_timeo.cpp0000644000175000017500000000441212240736636017767 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *frontend = zmq_socket (ctx, ZMQ_DEALER); assert (frontend); int rc = zmq_bind (frontend, "inproc://timeout_test"); assert (rc == 0); // Receive on disconnected socket returns immediately char buffer [32]; rc = zmq_recv (frontend, buffer, 32, ZMQ_DONTWAIT); assert (rc == -1); assert (zmq_errno() == EAGAIN); // Check whether receive timeout is honored int timeout = 250; rc = zmq_setsockopt (frontend, ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); void* stopwatch = zmq_stopwatch_start(); rc = zmq_recv (frontend, buffer, 32, 0); assert (rc == -1); assert (zmq_errno () == EAGAIN); unsigned int elapsed = zmq_stopwatch_stop(stopwatch) / 1000; assert (elapsed > 200 && elapsed < 300); // Check that normal message flow works as expected void *backend = zmq_socket (ctx, ZMQ_DEALER); assert (backend); rc = zmq_connect (backend, "inproc://timeout_test"); assert (rc == 0); rc = zmq_setsockopt (backend, ZMQ_SNDTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_send (backend, "Hello", 5, 0); assert (rc == 5); rc = zmq_recv (frontend, buffer, 32, 0); assert (rc == 5); // Clean-up rc = zmq_close (backend); assert (rc == 0); rc = zmq_close (frontend); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_conflate.cpp0000644000175000017500000000361612240736636020452 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (int argc, char *argv []) { const char *bind_to = "tcp://127.0.0.1:5555"; int rc; void* ctx = zmq_init (1); assert (ctx); void* s_in = zmq_socket (ctx, ZMQ_PULL); assert (s_in); int conflate = 1; rc = zmq_setsockopt (s_in, ZMQ_CONFLATE, &conflate, sizeof(conflate)); assert (rc == 0); rc = zmq_bind (s_in, bind_to); assert (rc == 0); void* s_out = zmq_socket (ctx, ZMQ_PUSH); assert (s_out); rc = zmq_connect (s_out, bind_to); assert (rc == 0); int message_count = 20; for (int j = 0; j < message_count; ++j) { rc = zmq_send(s_out, (void*)&j, sizeof(int), 0); if (rc < 0) { printf ("error in zmq_sendmsg: %s\n", zmq_strerror (errno)); return -1; } } msleep (SETTLE_TIME); int payload_recved = 0; rc = zmq_recv (s_in, (void*)&payload_recved, sizeof(int), 0); assert (rc > 0); assert (payload_recved == message_count - 1); rc = zmq_close (s_in); assert (rc == 0); rc = zmq_close (s_out); assert (rc == 0); rc = zmq_term (ctx); assert (rc == 0); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_reqrep_device.cpp0000644000175000017500000000765312240736636021501 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); // Create a req/rep device. void *dealer = zmq_socket (ctx, ZMQ_DEALER); assert (dealer); int rc = zmq_bind (dealer, "tcp://127.0.0.1:5560"); assert (rc == 0); void *router = zmq_socket (ctx, ZMQ_ROUTER); assert (router); rc = zmq_bind (router, "tcp://127.0.0.1:5561"); assert (rc == 0); // Create a worker. void *rep = zmq_socket (ctx, ZMQ_REP); assert (rep); rc = zmq_connect (rep, "tcp://127.0.0.1:5560"); assert (rc == 0); // Create a client. void *req = zmq_socket (ctx, ZMQ_REQ); assert (req); rc = zmq_connect (req, "tcp://127.0.0.1:5561"); assert (rc == 0); // Send a request. rc = zmq_send (req, "ABC", 3, ZMQ_SNDMORE); assert (rc == 3); rc = zmq_send (req, "DEF", 3, 0); assert (rc == 3); // Pass the request through the device. for (int i = 0; i != 4; i++) { zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, router, 0); assert (rc >= 0); int rcvmore; size_t sz = sizeof (rcvmore); rc = zmq_getsockopt (router, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); rc = zmq_msg_send (&msg, dealer, rcvmore? ZMQ_SNDMORE: 0); assert (rc >= 0); } // Receive the request. char buff [3]; rc = zmq_recv (rep, buff, 3, 0); assert (rc == 3); assert (memcmp (buff, "ABC", 3) == 0); int rcvmore; size_t sz = sizeof (rcvmore); rc = zmq_getsockopt (rep, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (rcvmore); rc = zmq_recv (rep, buff, 3, 0); assert (rc == 3); assert (memcmp (buff, "DEF", 3) == 0); rc = zmq_getsockopt (rep, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (!rcvmore); // Send the reply. rc = zmq_send (rep, "GHI", 3, ZMQ_SNDMORE); assert (rc == 3); rc = zmq_send (rep, "JKL", 3, 0); assert (rc == 3); // Pass the reply through the device. for (int i = 0; i != 4; i++) { zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, dealer, 0); assert (rc >= 0); int rcvmore; rc = zmq_getsockopt (dealer, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); rc = zmq_msg_send (&msg, router, rcvmore? ZMQ_SNDMORE: 0); assert (rc >= 0); } // Receive the reply. rc = zmq_recv (req, buff, 3, 0); assert (rc == 3); assert (memcmp (buff, "GHI", 3) == 0); rc = zmq_getsockopt (req, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (rcvmore); rc = zmq_recv (req, buff, 3, 0); assert (rc == 3); assert (memcmp (buff, "JKL", 3) == 0); rc = zmq_getsockopt (req, ZMQ_RCVMORE, &rcvmore, &sz); assert (rc == 0); assert (!rcvmore); // Clean up. rc = zmq_close (req); assert (rc == 0); rc = zmq_close (rep); assert (rc == 0); rc = zmq_close (router); assert (rc == 0); rc = zmq_close (dealer); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_sub_forward.cpp0000644000175000017500000000510512240736636021167 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); // First, create an intermediate device void *xpub = zmq_socket (ctx, ZMQ_XPUB); assert (xpub); int rc = zmq_bind (xpub, "tcp://127.0.0.1:5560"); assert (rc == 0); void *xsub = zmq_socket (ctx, ZMQ_XSUB); assert (xsub); rc = zmq_bind (xsub, "tcp://127.0.0.1:5561"); assert (rc == 0); // Create a publisher void *pub = zmq_socket (ctx, ZMQ_PUB); assert (pub); rc = zmq_connect (pub, "tcp://127.0.0.1:5561"); assert (rc == 0); // Create a subscriber void *sub = zmq_socket (ctx, ZMQ_SUB); assert (sub); rc = zmq_connect (sub, "tcp://127.0.0.1:5560"); assert (rc == 0); // Subscribe for all messages. rc = zmq_setsockopt (sub, ZMQ_SUBSCRIBE, "", 0); assert (rc == 0); // Pass the subscription upstream through the device char buff [32]; rc = zmq_recv (xpub, buff, sizeof (buff), 0); assert (rc >= 0); rc = zmq_send (xsub, buff, rc, 0); assert (rc >= 0); // Wait a bit till the subscription gets to the publisher msleep (SETTLE_TIME); // Send an empty message rc = zmq_send (pub, NULL, 0, 0); assert (rc == 0); // Pass the message downstream through the device rc = zmq_recv (xsub, buff, sizeof (buff), 0); assert (rc >= 0); rc = zmq_send (xpub, buff, rc, 0); assert (rc >= 0); // Receive the message in the subscriber rc = zmq_recv (sub, buff, sizeof (buff), 0); assert (rc == 0); // Clean up. rc = zmq_close (xpub); assert (rc == 0); rc = zmq_close (xsub); assert (rc == 0); rc = zmq_close (pub); assert (rc == 0); rc = zmq_close (sub); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_ctx_options.cpp0000644000175000017500000000303512240736636021223 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); int rc; // Set up our context and sockets void *ctx = zmq_ctx_new (); assert (ctx); assert (zmq_ctx_get (ctx, ZMQ_MAX_SOCKETS) == ZMQ_MAX_SOCKETS_DFLT); assert (zmq_ctx_get (ctx, ZMQ_IO_THREADS) == ZMQ_IO_THREADS_DFLT); assert (zmq_ctx_get (ctx, ZMQ_IPV6) == 0); rc = zmq_ctx_set (ctx, ZMQ_IPV6, true); assert (zmq_ctx_get (ctx, ZMQ_IPV6) == 1); void *router = zmq_socket (ctx, ZMQ_ROUTER); int ipv6; size_t optsize = sizeof (int); rc = zmq_getsockopt (router, ZMQ_IPV6, &ipv6, &optsize); assert (rc == 0); assert (ipv6); rc = zmq_close (router); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_system.cpp0000644000175000017500000000427212240736636020202 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" #if defined (ZMQ_HAVE_WINDOWS) # include # include #else # include # include # include #endif #if defined (ZMQ_HAVE_WINDOWS) void initialise_network() { WSADATA info; if (WSAStartup(MAKEWORD(2,0), &info) != 0) { throw std::runtime_error("Could not start WSA"); } } int close(int fd) { return closesocket(fd); } #else void initialise_network() { } #endif // This test case stresses the system to shake out known configuration // problems. We're not using libzmq here but direct system calls. Note // that code may need wrapping to be properly portable. int main (void) { initialise_network(); // Check that we can create 1,000 sockets int handle [1000]; int count; for (count = 0; count < 1000; count++) { handle [count] = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); if (handle [count] == -1) { printf ("W: Only able to create %d sockets on this box\n", count); printf ("I: Tune your system to increase maximum allowed file handles\n"); #if defined (ZMQ_HAVE_OSX) printf ("I: On OS/X, run 'ulimit -n 1200' in bash"); #elif defined (ZMQ_HAVE_LINUX) printf ("I: On Linux, run 'ulimit -n 1200' in bash"); #endif return -1; } } // Release the socket handles while (count) close (handle [count--]); } zeromq3-4.0.4+dfsg.orig/tests/test_spec_rep.cpp0000644000175000017500000001065312240736636020456 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" const char *bind_address = 0; const char *connect_address = 0; void test_fair_queue_in (void *ctx) { void *rep = zmq_socket (ctx, ZMQ_REP); assert (rep); int timeout = 100; int rc = zmq_setsockopt (rep, ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_bind (rep, bind_address); assert (rc == 0); const size_t services = 5; void *reqs [services]; for (size_t peer = 0; peer < services; ++peer) { reqs [peer] = zmq_socket (ctx, ZMQ_REQ); assert (reqs [peer]); rc = zmq_setsockopt (reqs [peer], ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); rc = zmq_connect (reqs [peer], connect_address); assert (rc == 0); } s_send_seq (reqs [0], "A", SEQ_END); s_recv_seq (rep, "A", SEQ_END); s_send_seq (rep, "A", SEQ_END); s_recv_seq (reqs [0], "A", SEQ_END); s_send_seq (reqs [0], "A", SEQ_END); s_recv_seq (rep, "A", SEQ_END); s_send_seq (rep, "A", SEQ_END); s_recv_seq (reqs [0], "A", SEQ_END); // TODO: following test fails randomly on some boxes #ifdef SOMEONE_FIXES_THIS // send N requests for (size_t peer = 0; peer < services; ++peer) { char * str = strdup("A"); str [0] += peer; s_send_seq (reqs [peer], str, SEQ_END); free (str); } // handle N requests for (size_t peer = 0; peer < services; ++peer) { char * str = strdup("A"); str [0] += peer; // Test fails here s_recv_seq (rep, str, SEQ_END); s_send_seq (rep, str, SEQ_END); s_recv_seq (reqs [peer], str, SEQ_END); free (str); } #endif close_zero_linger (rep); for (size_t peer = 0; peer < services; ++peer) close_zero_linger (reqs [peer]); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } void test_envelope (void *ctx) { void *rep = zmq_socket (ctx, ZMQ_REP); assert (rep); int rc = zmq_bind (rep, bind_address); assert (rc == 0); void *dealer = zmq_socket (ctx, ZMQ_DEALER); assert (dealer); rc = zmq_connect (dealer, connect_address); assert (rc == 0); // minimal envelope s_send_seq (dealer, 0, "A", SEQ_END); s_recv_seq (rep, "A", SEQ_END); s_send_seq (rep, "A", SEQ_END); s_recv_seq (dealer, 0, "A", SEQ_END); // big envelope s_send_seq (dealer, "X", "Y", 0, "A", SEQ_END); s_recv_seq (rep, "A", SEQ_END); s_send_seq (rep, "A", SEQ_END); s_recv_seq (dealer, "X", "Y", 0, "A", SEQ_END); close_zero_linger (rep); close_zero_linger (dealer); // Wait for disconnects. rc = zmq_poll (0, 0, 100); assert (rc == 0); } int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transport = 0; transport < 2; ++transport) { bind_address = binds [transport]; connect_address = connects [transport]; // SHALL receive incoming messages from its peers using a fair-queuing // strategy. test_fair_queue_in (ctx); // For an incoming message: // SHALL remove and store the address envelope, including the delimiter. // SHALL pass the remaining data frames to its calling application. // SHALL wait for a single reply message from its calling application. // SHALL prepend the address envelope and delimiter. // SHALL deliver this message back to the originating peer. test_envelope (ctx); } int rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_reqrep_inproc.cpp0000644000175000017500000000245612240736636021530 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_REP); assert (sb); int rc = zmq_bind (sb, "inproc://a"); assert (rc == 0); void *sc = zmq_socket (ctx, ZMQ_REQ); assert (sc); rc = zmq_connect (sc, "inproc://a"); assert (rc == 0); bounce (sb, sc); rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_pair_tcp.cpp0000644000175000017500000000250412240736636020453 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_PAIR); assert (sb); int rc = zmq_bind (sb, "tcp://127.0.0.1:5560"); assert (rc == 0); void *sc = zmq_socket (ctx, ZMQ_PAIR); assert (sc); rc = zmq_connect (sc, "tcp://127.0.0.1:5560"); assert (rc == 0); bounce (sb, sc); rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_iov.cpp0000644000175000017500000000465512240736636017460 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" // XSI vector I/O #if defined ZMQ_HAVE_UIO #include #else struct iovec { void *iov_base; size_t iov_len; }; #endif void do_check(void* sb, void* sc, unsigned int msgsz) { setup_test_environment(); int rc; int sum =0; for (int i = 0; i < 10; i++) { zmq_msg_t msg; zmq_msg_init_size(&msg, msgsz); void * data = zmq_msg_data(&msg); memcpy(data,&i, sizeof(int)); rc = zmq_msg_send(&msg,sc,i==9 ? 0 :ZMQ_SNDMORE); assert (rc == (int)msgsz); zmq_msg_close(&msg); sum += i; } struct iovec ibuffer[32] ; memset(&ibuffer[0], 0, sizeof(ibuffer)); size_t count = 10; rc = zmq_recviov(sb,&ibuffer[0],&count,0); assert (rc == 10); int rsum=0; for(;count;--count) { int v; memcpy(&v,ibuffer[count-1].iov_base,sizeof(int)); rsum += v; assert(ibuffer[count-1].iov_len == msgsz); // free up the memory free(ibuffer[count-1].iov_base); } assert ( sum == rsum ); } int main (void) { void *ctx = zmq_ctx_new (); assert (ctx); int rc; void *sb = zmq_socket (ctx, ZMQ_PULL); assert (sb); rc = zmq_bind (sb, "inproc://a"); assert (rc == 0); msleep (SETTLE_TIME); void *sc = zmq_socket (ctx, ZMQ_PUSH); rc = zmq_connect (sc, "inproc://a"); assert (rc == 0); // message bigger than vsm max do_check(sb,sc,100); // message smaller than vsm max do_check(sb,sc,10); rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0; } zeromq3-4.0.4+dfsg.orig/tests/Makefile.in0000644000175000017500000013731512307430722017154 0ustar ghedoghedo# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = test_system$(EXEEXT) test_pair_inproc$(EXEEXT) \ test_pair_tcp$(EXEEXT) test_reqrep_inproc$(EXEEXT) \ test_reqrep_tcp$(EXEEXT) test_hwm$(EXEEXT) \ test_reqrep_device$(EXEEXT) test_sub_forward$(EXEEXT) \ test_invalid_rep$(EXEEXT) test_msg_flags$(EXEEXT) \ test_connect_resolve$(EXEEXT) test_immediate$(EXEEXT) \ test_last_endpoint$(EXEEXT) test_term_endpoint$(EXEEXT) \ test_monitor$(EXEEXT) test_router_mandatory$(EXEEXT) \ test_router_raw_empty$(EXEEXT) test_probe_router$(EXEEXT) \ test_stream$(EXEEXT) test_disconnect_inproc$(EXEEXT) \ test_ctx_options$(EXEEXT) test_ctx_destroy$(EXEEXT) \ test_security_null$(EXEEXT) test_security_plain$(EXEEXT) \ test_security_curve$(EXEEXT) test_iov$(EXEEXT) \ test_spec_req$(EXEEXT) test_spec_rep$(EXEEXT) \ test_spec_dealer$(EXEEXT) test_spec_router$(EXEEXT) \ test_spec_pushpull$(EXEEXT) test_req_correlate$(EXEEXT) \ test_req_relaxed$(EXEEXT) test_conflate$(EXEEXT) \ test_inproc_connect$(EXEEXT) test_issue_566$(EXEEXT) \ test_abstract_ipc$(EXEEXT) test_many_sockets$(EXEEXT) \ $(am__EXEEXT_1) @ON_MINGW_FALSE@am__append_1 = test_shutdown_stress \ @ON_MINGW_FALSE@ test_pair_ipc \ @ON_MINGW_FALSE@ test_reqrep_ipc \ @ON_MINGW_FALSE@ test_timeo \ @ON_MINGW_FALSE@ test_fork @ON_LINUX_FALSE@XFAIL_TESTS = test_abstract_ipc$(EXEEXT) subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @ON_MINGW_FALSE@am__EXEEXT_1 = test_shutdown_stress$(EXEEXT) \ @ON_MINGW_FALSE@ test_pair_ipc$(EXEEXT) \ @ON_MINGW_FALSE@ test_reqrep_ipc$(EXEEXT) test_timeo$(EXEEXT) \ @ON_MINGW_FALSE@ test_fork$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_test_abstract_ipc_OBJECTS = test_abstract_ipc.$(OBJEXT) test_abstract_ipc_OBJECTS = $(am_test_abstract_ipc_OBJECTS) test_abstract_ipc_LDADD = $(LDADD) test_abstract_ipc_DEPENDENCIES = $(top_builddir)/src/libzmq.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am_test_conflate_OBJECTS = test_conflate.$(OBJEXT) test_conflate_OBJECTS = $(am_test_conflate_OBJECTS) test_conflate_LDADD = $(LDADD) test_conflate_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_connect_resolve_OBJECTS = test_connect_resolve.$(OBJEXT) test_connect_resolve_OBJECTS = $(am_test_connect_resolve_OBJECTS) test_connect_resolve_LDADD = $(LDADD) test_connect_resolve_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_ctx_destroy_OBJECTS = test_ctx_destroy.$(OBJEXT) test_ctx_destroy_OBJECTS = $(am_test_ctx_destroy_OBJECTS) test_ctx_destroy_LDADD = $(LDADD) test_ctx_destroy_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_ctx_options_OBJECTS = test_ctx_options.$(OBJEXT) test_ctx_options_OBJECTS = $(am_test_ctx_options_OBJECTS) test_ctx_options_LDADD = $(LDADD) test_ctx_options_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_disconnect_inproc_OBJECTS = test_disconnect_inproc.$(OBJEXT) test_disconnect_inproc_OBJECTS = $(am_test_disconnect_inproc_OBJECTS) test_disconnect_inproc_LDADD = $(LDADD) test_disconnect_inproc_DEPENDENCIES = $(top_builddir)/src/libzmq.la am__test_fork_SOURCES_DIST = test_fork.cpp @ON_MINGW_FALSE@am_test_fork_OBJECTS = test_fork.$(OBJEXT) test_fork_OBJECTS = $(am_test_fork_OBJECTS) test_fork_LDADD = $(LDADD) test_fork_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_hwm_OBJECTS = test_hwm.$(OBJEXT) test_hwm_OBJECTS = $(am_test_hwm_OBJECTS) test_hwm_LDADD = $(LDADD) test_hwm_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_immediate_OBJECTS = test_immediate.$(OBJEXT) test_immediate_OBJECTS = $(am_test_immediate_OBJECTS) test_immediate_LDADD = $(LDADD) test_immediate_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_inproc_connect_OBJECTS = test_inproc_connect.$(OBJEXT) test_inproc_connect_OBJECTS = $(am_test_inproc_connect_OBJECTS) test_inproc_connect_LDADD = $(LDADD) test_inproc_connect_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_invalid_rep_OBJECTS = test_invalid_rep.$(OBJEXT) test_invalid_rep_OBJECTS = $(am_test_invalid_rep_OBJECTS) test_invalid_rep_LDADD = $(LDADD) test_invalid_rep_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_iov_OBJECTS = test_iov.$(OBJEXT) test_iov_OBJECTS = $(am_test_iov_OBJECTS) test_iov_LDADD = $(LDADD) test_iov_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_issue_566_OBJECTS = test_issue_566.$(OBJEXT) test_issue_566_OBJECTS = $(am_test_issue_566_OBJECTS) test_issue_566_LDADD = $(LDADD) test_issue_566_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_last_endpoint_OBJECTS = test_last_endpoint.$(OBJEXT) test_last_endpoint_OBJECTS = $(am_test_last_endpoint_OBJECTS) test_last_endpoint_LDADD = $(LDADD) test_last_endpoint_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_many_sockets_OBJECTS = test_many_sockets.$(OBJEXT) test_many_sockets_OBJECTS = $(am_test_many_sockets_OBJECTS) test_many_sockets_LDADD = $(LDADD) test_many_sockets_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_monitor_OBJECTS = test_monitor.$(OBJEXT) test_monitor_OBJECTS = $(am_test_monitor_OBJECTS) test_monitor_LDADD = $(LDADD) test_monitor_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_msg_flags_OBJECTS = test_msg_flags.$(OBJEXT) test_msg_flags_OBJECTS = $(am_test_msg_flags_OBJECTS) test_msg_flags_LDADD = $(LDADD) test_msg_flags_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_pair_inproc_OBJECTS = test_pair_inproc.$(OBJEXT) test_pair_inproc_OBJECTS = $(am_test_pair_inproc_OBJECTS) test_pair_inproc_LDADD = $(LDADD) test_pair_inproc_DEPENDENCIES = $(top_builddir)/src/libzmq.la am__test_pair_ipc_SOURCES_DIST = test_pair_ipc.cpp testutil.hpp @ON_MINGW_FALSE@am_test_pair_ipc_OBJECTS = test_pair_ipc.$(OBJEXT) test_pair_ipc_OBJECTS = $(am_test_pair_ipc_OBJECTS) test_pair_ipc_LDADD = $(LDADD) test_pair_ipc_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_pair_tcp_OBJECTS = test_pair_tcp.$(OBJEXT) test_pair_tcp_OBJECTS = $(am_test_pair_tcp_OBJECTS) test_pair_tcp_LDADD = $(LDADD) test_pair_tcp_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_probe_router_OBJECTS = test_probe_router.$(OBJEXT) test_probe_router_OBJECTS = $(am_test_probe_router_OBJECTS) test_probe_router_LDADD = $(LDADD) test_probe_router_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_req_correlate_OBJECTS = test_req_correlate.$(OBJEXT) test_req_correlate_OBJECTS = $(am_test_req_correlate_OBJECTS) test_req_correlate_LDADD = $(LDADD) test_req_correlate_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_req_relaxed_OBJECTS = test_req_relaxed.$(OBJEXT) test_req_relaxed_OBJECTS = $(am_test_req_relaxed_OBJECTS) test_req_relaxed_LDADD = $(LDADD) test_req_relaxed_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_reqrep_device_OBJECTS = test_reqrep_device.$(OBJEXT) test_reqrep_device_OBJECTS = $(am_test_reqrep_device_OBJECTS) test_reqrep_device_LDADD = $(LDADD) test_reqrep_device_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_reqrep_inproc_OBJECTS = test_reqrep_inproc.$(OBJEXT) test_reqrep_inproc_OBJECTS = $(am_test_reqrep_inproc_OBJECTS) test_reqrep_inproc_LDADD = $(LDADD) test_reqrep_inproc_DEPENDENCIES = $(top_builddir)/src/libzmq.la am__test_reqrep_ipc_SOURCES_DIST = test_reqrep_ipc.cpp testutil.hpp @ON_MINGW_FALSE@am_test_reqrep_ipc_OBJECTS = \ @ON_MINGW_FALSE@ test_reqrep_ipc.$(OBJEXT) test_reqrep_ipc_OBJECTS = $(am_test_reqrep_ipc_OBJECTS) test_reqrep_ipc_LDADD = $(LDADD) test_reqrep_ipc_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_reqrep_tcp_OBJECTS = test_reqrep_tcp.$(OBJEXT) test_reqrep_tcp_OBJECTS = $(am_test_reqrep_tcp_OBJECTS) test_reqrep_tcp_LDADD = $(LDADD) test_reqrep_tcp_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_router_mandatory_OBJECTS = test_router_mandatory.$(OBJEXT) test_router_mandatory_OBJECTS = $(am_test_router_mandatory_OBJECTS) test_router_mandatory_LDADD = $(LDADD) test_router_mandatory_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_router_raw_empty_OBJECTS = test_router_raw_empty.$(OBJEXT) test_router_raw_empty_OBJECTS = $(am_test_router_raw_empty_OBJECTS) test_router_raw_empty_LDADD = $(LDADD) test_router_raw_empty_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_security_curve_OBJECTS = test_security_curve.$(OBJEXT) test_security_curve_OBJECTS = $(am_test_security_curve_OBJECTS) test_security_curve_LDADD = $(LDADD) test_security_curve_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_security_null_OBJECTS = test_security_null.$(OBJEXT) test_security_null_OBJECTS = $(am_test_security_null_OBJECTS) test_security_null_LDADD = $(LDADD) test_security_null_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_security_plain_OBJECTS = test_security_plain.$(OBJEXT) test_security_plain_OBJECTS = $(am_test_security_plain_OBJECTS) test_security_plain_LDADD = $(LDADD) test_security_plain_DEPENDENCIES = $(top_builddir)/src/libzmq.la am__test_shutdown_stress_SOURCES_DIST = test_shutdown_stress.cpp @ON_MINGW_FALSE@am_test_shutdown_stress_OBJECTS = \ @ON_MINGW_FALSE@ test_shutdown_stress.$(OBJEXT) test_shutdown_stress_OBJECTS = $(am_test_shutdown_stress_OBJECTS) test_shutdown_stress_LDADD = $(LDADD) test_shutdown_stress_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_spec_dealer_OBJECTS = test_spec_dealer.$(OBJEXT) test_spec_dealer_OBJECTS = $(am_test_spec_dealer_OBJECTS) test_spec_dealer_LDADD = $(LDADD) test_spec_dealer_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_spec_pushpull_OBJECTS = test_spec_pushpull.$(OBJEXT) test_spec_pushpull_OBJECTS = $(am_test_spec_pushpull_OBJECTS) test_spec_pushpull_LDADD = $(LDADD) test_spec_pushpull_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_spec_rep_OBJECTS = test_spec_rep.$(OBJEXT) test_spec_rep_OBJECTS = $(am_test_spec_rep_OBJECTS) test_spec_rep_LDADD = $(LDADD) test_spec_rep_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_spec_req_OBJECTS = test_spec_req.$(OBJEXT) test_spec_req_OBJECTS = $(am_test_spec_req_OBJECTS) test_spec_req_LDADD = $(LDADD) test_spec_req_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_spec_router_OBJECTS = test_spec_router.$(OBJEXT) test_spec_router_OBJECTS = $(am_test_spec_router_OBJECTS) test_spec_router_LDADD = $(LDADD) test_spec_router_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_stream_OBJECTS = test_stream.$(OBJEXT) test_stream_OBJECTS = $(am_test_stream_OBJECTS) test_stream_LDADD = $(LDADD) test_stream_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_sub_forward_OBJECTS = test_sub_forward.$(OBJEXT) test_sub_forward_OBJECTS = $(am_test_sub_forward_OBJECTS) test_sub_forward_LDADD = $(LDADD) test_sub_forward_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_system_OBJECTS = test_system.$(OBJEXT) test_system_OBJECTS = $(am_test_system_OBJECTS) test_system_LDADD = $(LDADD) test_system_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_term_endpoint_OBJECTS = test_term_endpoint.$(OBJEXT) test_term_endpoint_OBJECTS = $(am_test_term_endpoint_OBJECTS) test_term_endpoint_LDADD = $(LDADD) test_term_endpoint_DEPENDENCIES = $(top_builddir)/src/libzmq.la am__test_timeo_SOURCES_DIST = test_timeo.cpp @ON_MINGW_FALSE@am_test_timeo_OBJECTS = test_timeo.$(OBJEXT) test_timeo_OBJECTS = $(am_test_timeo_OBJECTS) test_timeo_LDADD = $(LDADD) test_timeo_DEPENDENCIES = $(top_builddir)/src/libzmq.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(test_abstract_ipc_SOURCES) $(test_conflate_SOURCES) \ $(test_connect_resolve_SOURCES) $(test_ctx_destroy_SOURCES) \ $(test_ctx_options_SOURCES) $(test_disconnect_inproc_SOURCES) \ $(test_fork_SOURCES) $(test_hwm_SOURCES) \ $(test_immediate_SOURCES) $(test_inproc_connect_SOURCES) \ $(test_invalid_rep_SOURCES) $(test_iov_SOURCES) \ $(test_issue_566_SOURCES) $(test_last_endpoint_SOURCES) \ $(test_many_sockets_SOURCES) $(test_monitor_SOURCES) \ $(test_msg_flags_SOURCES) $(test_pair_inproc_SOURCES) \ $(test_pair_ipc_SOURCES) $(test_pair_tcp_SOURCES) \ $(test_probe_router_SOURCES) $(test_req_correlate_SOURCES) \ $(test_req_relaxed_SOURCES) $(test_reqrep_device_SOURCES) \ $(test_reqrep_inproc_SOURCES) $(test_reqrep_ipc_SOURCES) \ $(test_reqrep_tcp_SOURCES) $(test_router_mandatory_SOURCES) \ $(test_router_raw_empty_SOURCES) \ $(test_security_curve_SOURCES) $(test_security_null_SOURCES) \ $(test_security_plain_SOURCES) $(test_shutdown_stress_SOURCES) \ $(test_spec_dealer_SOURCES) $(test_spec_pushpull_SOURCES) \ $(test_spec_rep_SOURCES) $(test_spec_req_SOURCES) \ $(test_spec_router_SOURCES) $(test_stream_SOURCES) \ $(test_sub_forward_SOURCES) $(test_system_SOURCES) \ $(test_term_endpoint_SOURCES) $(test_timeo_SOURCES) DIST_SOURCES = $(test_abstract_ipc_SOURCES) $(test_conflate_SOURCES) \ $(test_connect_resolve_SOURCES) $(test_ctx_destroy_SOURCES) \ $(test_ctx_options_SOURCES) $(test_disconnect_inproc_SOURCES) \ $(am__test_fork_SOURCES_DIST) $(test_hwm_SOURCES) \ $(test_immediate_SOURCES) $(test_inproc_connect_SOURCES) \ $(test_invalid_rep_SOURCES) $(test_iov_SOURCES) \ $(test_issue_566_SOURCES) $(test_last_endpoint_SOURCES) \ $(test_many_sockets_SOURCES) $(test_monitor_SOURCES) \ $(test_msg_flags_SOURCES) $(test_pair_inproc_SOURCES) \ $(am__test_pair_ipc_SOURCES_DIST) $(test_pair_tcp_SOURCES) \ $(test_probe_router_SOURCES) $(test_req_correlate_SOURCES) \ $(test_req_relaxed_SOURCES) $(test_reqrep_device_SOURCES) \ $(test_reqrep_inproc_SOURCES) \ $(am__test_reqrep_ipc_SOURCES_DIST) $(test_reqrep_tcp_SOURCES) \ $(test_router_mandatory_SOURCES) \ $(test_router_raw_empty_SOURCES) \ $(test_security_curve_SOURCES) $(test_security_null_SOURCES) \ $(test_security_plain_SOURCES) \ $(am__test_shutdown_stress_SOURCES_DIST) \ $(test_spec_dealer_SOURCES) $(test_spec_pushpull_SOURCES) \ $(test_spec_rep_SOURCES) $(test_spec_req_SOURCES) \ $(test_spec_router_SOURCES) $(test_stream_SOURCES) \ $(test_sub_forward_SOURCES) $(test_system_SOURCES) \ $(test_term_endpoint_SOURCES) $(am__test_timeo_SOURCES_DIST) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_builddir)/include \ -I$(top_srcdir)/include LDADD = $(top_builddir)/src/libzmq.la test_system_SOURCES = test_system.cpp test_pair_inproc_SOURCES = test_pair_inproc.cpp testutil.hpp test_pair_tcp_SOURCES = test_pair_tcp.cpp testutil.hpp test_reqrep_inproc_SOURCES = test_reqrep_inproc.cpp testutil.hpp test_reqrep_tcp_SOURCES = test_reqrep_tcp.cpp testutil.hpp test_hwm_SOURCES = test_hwm.cpp test_reqrep_device_SOURCES = test_reqrep_device.cpp test_sub_forward_SOURCES = test_sub_forward.cpp test_invalid_rep_SOURCES = test_invalid_rep.cpp test_msg_flags_SOURCES = test_msg_flags.cpp test_connect_resolve_SOURCES = test_connect_resolve.cpp test_immediate_SOURCES = test_immediate.cpp test_last_endpoint_SOURCES = test_last_endpoint.cpp test_term_endpoint_SOURCES = test_term_endpoint.cpp test_monitor_SOURCES = test_monitor.cpp test_router_mandatory_SOURCES = test_router_mandatory.cpp test_router_raw_empty_SOURCES = test_router_raw_empty.cpp test_probe_router_SOURCES = test_probe_router.cpp test_stream_SOURCES = test_stream.cpp test_disconnect_inproc_SOURCES = test_disconnect_inproc.cpp test_ctx_options_SOURCES = test_ctx_options.cpp test_iov_SOURCES = test_iov.cpp test_ctx_destroy_SOURCES = test_ctx_destroy.cpp test_security_null_SOURCES = test_security_null.cpp test_security_plain_SOURCES = test_security_plain.cpp test_security_curve_SOURCES = test_security_curve.cpp test_spec_req_SOURCES = test_spec_req.cpp test_spec_rep_SOURCES = test_spec_rep.cpp test_spec_dealer_SOURCES = test_spec_dealer.cpp test_spec_router_SOURCES = test_spec_router.cpp test_spec_pushpull_SOURCES = test_spec_pushpull.cpp test_req_correlate_SOURCES = test_req_correlate.cpp test_req_relaxed_SOURCES = test_req_relaxed.cpp test_conflate_SOURCES = test_conflate.cpp test_inproc_connect_SOURCES = test_inproc_connect.cpp test_issue_566_SOURCES = test_issue_566.cpp test_abstract_ipc_SOURCES = test_abstract_ipc.cpp test_many_sockets_SOURCES = test_many_sockets.cpp @ON_MINGW_FALSE@test_shutdown_stress_SOURCES = test_shutdown_stress.cpp @ON_MINGW_FALSE@test_pair_ipc_SOURCES = test_pair_ipc.cpp testutil.hpp @ON_MINGW_FALSE@test_reqrep_ipc_SOURCES = test_reqrep_ipc.cpp testutil.hpp @ON_MINGW_FALSE@test_timeo_SOURCES = test_timeo.cpp @ON_MINGW_FALSE@test_fork_SOURCES = test_fork.cpp # Run the test cases TESTS = $(noinst_PROGRAMS) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list test_abstract_ipc$(EXEEXT): $(test_abstract_ipc_OBJECTS) $(test_abstract_ipc_DEPENDENCIES) $(EXTRA_test_abstract_ipc_DEPENDENCIES) @rm -f test_abstract_ipc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_abstract_ipc_OBJECTS) $(test_abstract_ipc_LDADD) $(LIBS) test_conflate$(EXEEXT): $(test_conflate_OBJECTS) $(test_conflate_DEPENDENCIES) $(EXTRA_test_conflate_DEPENDENCIES) @rm -f test_conflate$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_conflate_OBJECTS) $(test_conflate_LDADD) $(LIBS) test_connect_resolve$(EXEEXT): $(test_connect_resolve_OBJECTS) $(test_connect_resolve_DEPENDENCIES) $(EXTRA_test_connect_resolve_DEPENDENCIES) @rm -f test_connect_resolve$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_connect_resolve_OBJECTS) $(test_connect_resolve_LDADD) $(LIBS) test_ctx_destroy$(EXEEXT): $(test_ctx_destroy_OBJECTS) $(test_ctx_destroy_DEPENDENCIES) $(EXTRA_test_ctx_destroy_DEPENDENCIES) @rm -f test_ctx_destroy$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_ctx_destroy_OBJECTS) $(test_ctx_destroy_LDADD) $(LIBS) test_ctx_options$(EXEEXT): $(test_ctx_options_OBJECTS) $(test_ctx_options_DEPENDENCIES) $(EXTRA_test_ctx_options_DEPENDENCIES) @rm -f test_ctx_options$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_ctx_options_OBJECTS) $(test_ctx_options_LDADD) $(LIBS) test_disconnect_inproc$(EXEEXT): $(test_disconnect_inproc_OBJECTS) $(test_disconnect_inproc_DEPENDENCIES) $(EXTRA_test_disconnect_inproc_DEPENDENCIES) @rm -f test_disconnect_inproc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_disconnect_inproc_OBJECTS) $(test_disconnect_inproc_LDADD) $(LIBS) test_fork$(EXEEXT): $(test_fork_OBJECTS) $(test_fork_DEPENDENCIES) $(EXTRA_test_fork_DEPENDENCIES) @rm -f test_fork$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_fork_OBJECTS) $(test_fork_LDADD) $(LIBS) test_hwm$(EXEEXT): $(test_hwm_OBJECTS) $(test_hwm_DEPENDENCIES) $(EXTRA_test_hwm_DEPENDENCIES) @rm -f test_hwm$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_hwm_OBJECTS) $(test_hwm_LDADD) $(LIBS) test_immediate$(EXEEXT): $(test_immediate_OBJECTS) $(test_immediate_DEPENDENCIES) $(EXTRA_test_immediate_DEPENDENCIES) @rm -f test_immediate$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_immediate_OBJECTS) $(test_immediate_LDADD) $(LIBS) test_inproc_connect$(EXEEXT): $(test_inproc_connect_OBJECTS) $(test_inproc_connect_DEPENDENCIES) $(EXTRA_test_inproc_connect_DEPENDENCIES) @rm -f test_inproc_connect$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_inproc_connect_OBJECTS) $(test_inproc_connect_LDADD) $(LIBS) test_invalid_rep$(EXEEXT): $(test_invalid_rep_OBJECTS) $(test_invalid_rep_DEPENDENCIES) $(EXTRA_test_invalid_rep_DEPENDENCIES) @rm -f test_invalid_rep$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_invalid_rep_OBJECTS) $(test_invalid_rep_LDADD) $(LIBS) test_iov$(EXEEXT): $(test_iov_OBJECTS) $(test_iov_DEPENDENCIES) $(EXTRA_test_iov_DEPENDENCIES) @rm -f test_iov$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_iov_OBJECTS) $(test_iov_LDADD) $(LIBS) test_issue_566$(EXEEXT): $(test_issue_566_OBJECTS) $(test_issue_566_DEPENDENCIES) $(EXTRA_test_issue_566_DEPENDENCIES) @rm -f test_issue_566$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_issue_566_OBJECTS) $(test_issue_566_LDADD) $(LIBS) test_last_endpoint$(EXEEXT): $(test_last_endpoint_OBJECTS) $(test_last_endpoint_DEPENDENCIES) $(EXTRA_test_last_endpoint_DEPENDENCIES) @rm -f test_last_endpoint$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_last_endpoint_OBJECTS) $(test_last_endpoint_LDADD) $(LIBS) test_many_sockets$(EXEEXT): $(test_many_sockets_OBJECTS) $(test_many_sockets_DEPENDENCIES) $(EXTRA_test_many_sockets_DEPENDENCIES) @rm -f test_many_sockets$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_many_sockets_OBJECTS) $(test_many_sockets_LDADD) $(LIBS) test_monitor$(EXEEXT): $(test_monitor_OBJECTS) $(test_monitor_DEPENDENCIES) $(EXTRA_test_monitor_DEPENDENCIES) @rm -f test_monitor$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_monitor_OBJECTS) $(test_monitor_LDADD) $(LIBS) test_msg_flags$(EXEEXT): $(test_msg_flags_OBJECTS) $(test_msg_flags_DEPENDENCIES) $(EXTRA_test_msg_flags_DEPENDENCIES) @rm -f test_msg_flags$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_msg_flags_OBJECTS) $(test_msg_flags_LDADD) $(LIBS) test_pair_inproc$(EXEEXT): $(test_pair_inproc_OBJECTS) $(test_pair_inproc_DEPENDENCIES) $(EXTRA_test_pair_inproc_DEPENDENCIES) @rm -f test_pair_inproc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_pair_inproc_OBJECTS) $(test_pair_inproc_LDADD) $(LIBS) test_pair_ipc$(EXEEXT): $(test_pair_ipc_OBJECTS) $(test_pair_ipc_DEPENDENCIES) $(EXTRA_test_pair_ipc_DEPENDENCIES) @rm -f test_pair_ipc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_pair_ipc_OBJECTS) $(test_pair_ipc_LDADD) $(LIBS) test_pair_tcp$(EXEEXT): $(test_pair_tcp_OBJECTS) $(test_pair_tcp_DEPENDENCIES) $(EXTRA_test_pair_tcp_DEPENDENCIES) @rm -f test_pair_tcp$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_pair_tcp_OBJECTS) $(test_pair_tcp_LDADD) $(LIBS) test_probe_router$(EXEEXT): $(test_probe_router_OBJECTS) $(test_probe_router_DEPENDENCIES) $(EXTRA_test_probe_router_DEPENDENCIES) @rm -f test_probe_router$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_probe_router_OBJECTS) $(test_probe_router_LDADD) $(LIBS) test_req_correlate$(EXEEXT): $(test_req_correlate_OBJECTS) $(test_req_correlate_DEPENDENCIES) $(EXTRA_test_req_correlate_DEPENDENCIES) @rm -f test_req_correlate$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_req_correlate_OBJECTS) $(test_req_correlate_LDADD) $(LIBS) test_req_relaxed$(EXEEXT): $(test_req_relaxed_OBJECTS) $(test_req_relaxed_DEPENDENCIES) $(EXTRA_test_req_relaxed_DEPENDENCIES) @rm -f test_req_relaxed$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_req_relaxed_OBJECTS) $(test_req_relaxed_LDADD) $(LIBS) test_reqrep_device$(EXEEXT): $(test_reqrep_device_OBJECTS) $(test_reqrep_device_DEPENDENCIES) $(EXTRA_test_reqrep_device_DEPENDENCIES) @rm -f test_reqrep_device$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_device_OBJECTS) $(test_reqrep_device_LDADD) $(LIBS) test_reqrep_inproc$(EXEEXT): $(test_reqrep_inproc_OBJECTS) $(test_reqrep_inproc_DEPENDENCIES) $(EXTRA_test_reqrep_inproc_DEPENDENCIES) @rm -f test_reqrep_inproc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_inproc_OBJECTS) $(test_reqrep_inproc_LDADD) $(LIBS) test_reqrep_ipc$(EXEEXT): $(test_reqrep_ipc_OBJECTS) $(test_reqrep_ipc_DEPENDENCIES) $(EXTRA_test_reqrep_ipc_DEPENDENCIES) @rm -f test_reqrep_ipc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_ipc_OBJECTS) $(test_reqrep_ipc_LDADD) $(LIBS) test_reqrep_tcp$(EXEEXT): $(test_reqrep_tcp_OBJECTS) $(test_reqrep_tcp_DEPENDENCIES) $(EXTRA_test_reqrep_tcp_DEPENDENCIES) @rm -f test_reqrep_tcp$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_tcp_OBJECTS) $(test_reqrep_tcp_LDADD) $(LIBS) test_router_mandatory$(EXEEXT): $(test_router_mandatory_OBJECTS) $(test_router_mandatory_DEPENDENCIES) $(EXTRA_test_router_mandatory_DEPENDENCIES) @rm -f test_router_mandatory$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_router_mandatory_OBJECTS) $(test_router_mandatory_LDADD) $(LIBS) test_router_raw_empty$(EXEEXT): $(test_router_raw_empty_OBJECTS) $(test_router_raw_empty_DEPENDENCIES) $(EXTRA_test_router_raw_empty_DEPENDENCIES) @rm -f test_router_raw_empty$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_router_raw_empty_OBJECTS) $(test_router_raw_empty_LDADD) $(LIBS) test_security_curve$(EXEEXT): $(test_security_curve_OBJECTS) $(test_security_curve_DEPENDENCIES) $(EXTRA_test_security_curve_DEPENDENCIES) @rm -f test_security_curve$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_security_curve_OBJECTS) $(test_security_curve_LDADD) $(LIBS) test_security_null$(EXEEXT): $(test_security_null_OBJECTS) $(test_security_null_DEPENDENCIES) $(EXTRA_test_security_null_DEPENDENCIES) @rm -f test_security_null$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_security_null_OBJECTS) $(test_security_null_LDADD) $(LIBS) test_security_plain$(EXEEXT): $(test_security_plain_OBJECTS) $(test_security_plain_DEPENDENCIES) $(EXTRA_test_security_plain_DEPENDENCIES) @rm -f test_security_plain$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_security_plain_OBJECTS) $(test_security_plain_LDADD) $(LIBS) test_shutdown_stress$(EXEEXT): $(test_shutdown_stress_OBJECTS) $(test_shutdown_stress_DEPENDENCIES) $(EXTRA_test_shutdown_stress_DEPENDENCIES) @rm -f test_shutdown_stress$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_shutdown_stress_OBJECTS) $(test_shutdown_stress_LDADD) $(LIBS) test_spec_dealer$(EXEEXT): $(test_spec_dealer_OBJECTS) $(test_spec_dealer_DEPENDENCIES) $(EXTRA_test_spec_dealer_DEPENDENCIES) @rm -f test_spec_dealer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_spec_dealer_OBJECTS) $(test_spec_dealer_LDADD) $(LIBS) test_spec_pushpull$(EXEEXT): $(test_spec_pushpull_OBJECTS) $(test_spec_pushpull_DEPENDENCIES) $(EXTRA_test_spec_pushpull_DEPENDENCIES) @rm -f test_spec_pushpull$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_spec_pushpull_OBJECTS) $(test_spec_pushpull_LDADD) $(LIBS) test_spec_rep$(EXEEXT): $(test_spec_rep_OBJECTS) $(test_spec_rep_DEPENDENCIES) $(EXTRA_test_spec_rep_DEPENDENCIES) @rm -f test_spec_rep$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_spec_rep_OBJECTS) $(test_spec_rep_LDADD) $(LIBS) test_spec_req$(EXEEXT): $(test_spec_req_OBJECTS) $(test_spec_req_DEPENDENCIES) $(EXTRA_test_spec_req_DEPENDENCIES) @rm -f test_spec_req$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_spec_req_OBJECTS) $(test_spec_req_LDADD) $(LIBS) test_spec_router$(EXEEXT): $(test_spec_router_OBJECTS) $(test_spec_router_DEPENDENCIES) $(EXTRA_test_spec_router_DEPENDENCIES) @rm -f test_spec_router$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_spec_router_OBJECTS) $(test_spec_router_LDADD) $(LIBS) test_stream$(EXEEXT): $(test_stream_OBJECTS) $(test_stream_DEPENDENCIES) $(EXTRA_test_stream_DEPENDENCIES) @rm -f test_stream$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_stream_OBJECTS) $(test_stream_LDADD) $(LIBS) test_sub_forward$(EXEEXT): $(test_sub_forward_OBJECTS) $(test_sub_forward_DEPENDENCIES) $(EXTRA_test_sub_forward_DEPENDENCIES) @rm -f test_sub_forward$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_sub_forward_OBJECTS) $(test_sub_forward_LDADD) $(LIBS) test_system$(EXEEXT): $(test_system_OBJECTS) $(test_system_DEPENDENCIES) $(EXTRA_test_system_DEPENDENCIES) @rm -f test_system$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_system_OBJECTS) $(test_system_LDADD) $(LIBS) test_term_endpoint$(EXEEXT): $(test_term_endpoint_OBJECTS) $(test_term_endpoint_DEPENDENCIES) $(EXTRA_test_term_endpoint_DEPENDENCIES) @rm -f test_term_endpoint$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_term_endpoint_OBJECTS) $(test_term_endpoint_LDADD) $(LIBS) test_timeo$(EXEEXT): $(test_timeo_OBJECTS) $(test_timeo_DEPENDENCIES) $(EXTRA_test_timeo_DEPENDENCIES) @rm -f test_timeo$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_timeo_OBJECTS) $(test_timeo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_abstract_ipc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_conflate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_connect_resolve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ctx_destroy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ctx_options.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_disconnect_inproc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_fork.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hwm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_immediate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_inproc_connect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_invalid_rep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_iov.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_issue_566.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_last_endpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_many_sockets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_monitor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_msg_flags.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pair_inproc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pair_ipc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pair_tcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_probe_router.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_req_correlate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_req_relaxed.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_device.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_inproc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_ipc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_tcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_router_mandatory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_router_raw_empty.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_security_curve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_security_null.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_security_plain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_shutdown_stress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spec_dealer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spec_pushpull.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spec_rep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spec_req.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_spec_router.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_stream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sub_forward.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_system.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_term_endpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_timeo.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libtool clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq3-4.0.4+dfsg.orig/tests/test_shutdown_stress.cpp0000644000175000017500000000373512240736636022137 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" #define THREAD_COUNT 100 extern "C" { static void worker (void *s) { int rc; rc = zmq_connect (s, "tcp://127.0.0.1:5560"); assert (rc == 0); // Start closing the socket while the connecting process is underway. rc = zmq_close (s); assert (rc == 0); } } int main (void) { setup_test_environment(); void *s1; void *s2; int i; int j; int rc; void* threads [THREAD_COUNT]; for (j = 0; j != 10; j++) { // Check the shutdown with many parallel I/O threads. void *ctx = zmq_ctx_new (); assert (ctx); zmq_ctx_set (ctx, ZMQ_IO_THREADS, 7); s1 = zmq_socket (ctx, ZMQ_PUB); assert (s1); rc = zmq_bind (s1, "tcp://127.0.0.1:5560"); assert (rc == 0); for (i = 0; i != THREAD_COUNT; i++) { s2 = zmq_socket (ctx, ZMQ_SUB); assert (s2); threads [i] = zmq_threadstart(&worker, s2); } for (i = 0; i != THREAD_COUNT; i++) { zmq_threadclose(threads [i]); } rc = zmq_close (s1); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); } return 0; } zeromq3-4.0.4+dfsg.orig/tests/test_router_mandatory.cpp0000644000175000017500000000474712240736636022263 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *router = zmq_socket (ctx, ZMQ_ROUTER); assert (router); int rc = zmq_bind (router, "tcp://127.0.0.1:5560"); assert (rc == 0); // Send a message to an unknown peer with the default setting // This will not report any error rc = zmq_send (router, "UNKNOWN", 7, ZMQ_SNDMORE); assert (rc == 7); rc = zmq_send (router, "DATA", 4, 0); assert (rc == 4); // Send a message to an unknown peer with mandatory routing // This will fail int mandatory = 1; rc = zmq_setsockopt (router, ZMQ_ROUTER_MANDATORY, &mandatory, sizeof (mandatory)); assert (rc == 0); rc = zmq_send (router, "UNKNOWN", 7, ZMQ_SNDMORE); assert (rc == -1 && errno == EHOSTUNREACH); // Create dealer called "X" and connect it to our router void *dealer = zmq_socket (ctx, ZMQ_DEALER); assert (dealer); rc = zmq_setsockopt (dealer, ZMQ_IDENTITY, "X", 1); assert (rc == 0); rc = zmq_connect (dealer, "tcp://127.0.0.1:5560"); assert (rc == 0); // Get message from dealer to know when connection is ready char buffer [255]; rc = zmq_send (dealer, "Hello", 5, 0); assert (rc == 5); rc = zmq_recv (router, buffer, 255, 0); assert (rc == 1); assert (buffer [0] == 'X'); // Send a message to connected dealer now // It should work rc = zmq_send (router, "X", 1, ZMQ_SNDMORE); assert (rc == 1); rc = zmq_send (router, "Hello", 5, 0); assert (rc == 5); rc = zmq_close (router); assert (rc == 0); rc = zmq_close (dealer); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_pair_ipc.cpp0000644000175000017500000000247612240736636020450 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new (); assert (ctx); void *sb = zmq_socket (ctx, ZMQ_PAIR); assert (sb); int rc = zmq_bind (sb, "ipc:///tmp/tester"); assert (rc == 0); void *sc = zmq_socket (ctx, ZMQ_PAIR); assert (sc); rc = zmq_connect (sc, "ipc:///tmp/tester"); assert (rc == 0); bounce (sb, sc); rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); return 0 ; } zeromq3-4.0.4+dfsg.orig/tests/test_immediate.cpp0000644000175000017500000001543212240736636020614 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); int val; int rc; char buffer[16]; // TEST 1. // First we're going to attempt to send messages to two // pipes, one connected, the other not. We should see // the PUSH load balancing to both pipes, and hence half // of the messages getting queued, as connect() creates a // pipe immediately. void *context = zmq_ctx_new(); assert (context); void *to = zmq_socket(context, ZMQ_PULL); assert (to); // Bind the one valid receiver val = 0; rc = zmq_setsockopt(to, ZMQ_LINGER, &val, sizeof(val)); assert (rc == 0); rc = zmq_bind (to, "tcp://127.0.0.1:6555"); assert (rc == 0); // Create a socket pushing to two endpoints - only 1 message should arrive. void *from = zmq_socket (context, ZMQ_PUSH); assert(from); val = 0; zmq_setsockopt (from, ZMQ_LINGER, &val, sizeof (val)); // This pipe will not connect rc = zmq_connect (from, "tcp://localhost:5556"); assert (rc == 0); // This pipe will rc = zmq_connect (from, "tcp://localhost:6555"); assert (rc == 0); // We send 10 messages, 5 should just get stuck in the queue // for the not-yet-connected pipe for (int i = 0; i < 10; ++i) { rc = zmq_send (from, "Hello", 5, 0); assert (rc == 5); } // We now consume from the connected pipe // - we should see just 5 int timeout = 100; rc = zmq_setsockopt (to, ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); int seen = 0; while (true) { rc = zmq_recv (to, &buffer, sizeof (buffer), 0); if (rc == -1) break; // Break when we didn't get a message seen++; } assert (seen == 5); rc = zmq_close (from); assert (rc == 0); rc = zmq_close (to); assert (rc == 0); rc = zmq_ctx_term (context); assert (rc == 0); // TEST 2 // This time we will do the same thing, connect two pipes, // one of which will succeed in connecting to a bound // receiver, the other of which will fail. However, we will // also set the delay attach on connect flag, which should // cause the pipe attachment to be delayed until the connection // succeeds. context = zmq_ctx_new(); // Bind the valid socket to = zmq_socket (context, ZMQ_PULL); assert (to); rc = zmq_bind (to, "tcp://127.0.0.1:5560"); assert (rc == 0); val = 0; rc = zmq_setsockopt (to, ZMQ_LINGER, &val, sizeof(val)); assert (rc == 0); // Create a socket pushing to two endpoints - all messages should arrive. from = zmq_socket (context, ZMQ_PUSH); assert (from); val = 0; rc = zmq_setsockopt (from, ZMQ_LINGER, &val, sizeof(val)); assert (rc == 0); // Set the key flag val = 1; rc = zmq_setsockopt (from, ZMQ_IMMEDIATE, &val, sizeof(val)); assert (rc == 0); // Connect to the invalid socket rc = zmq_connect (from, "tcp://localhost:5561"); assert (rc == 0); // Connect to the valid socket rc = zmq_connect (from, "tcp://localhost:5560"); assert (rc == 0); // Send 10 messages, all should be routed to the connected pipe for (int i = 0; i < 10; ++i) { rc = zmq_send (from, "Hello", 5, 0); assert (rc == 5); } rc = zmq_setsockopt (to, ZMQ_RCVTIMEO, &timeout, sizeof (int)); assert (rc == 0); seen = 0; while (true) { rc = zmq_recv (to, &buffer, sizeof (buffer), 0); if (rc == -1) break; // Break when we didn't get a message seen++; } assert (seen == 10); rc = zmq_close (from); assert (rc == 0); rc = zmq_close (to); assert (rc == 0); rc = zmq_ctx_term (context); assert (rc == 0); // TEST 3 // This time we want to validate that the same blocking behaviour // occurs with an existing connection that is broken. We will send // messages to a connected pipe, disconnect and verify the messages // block. Then we reconnect and verify messages flow again. context = zmq_ctx_new (); void *backend = zmq_socket (context, ZMQ_DEALER); assert (backend); void *frontend = zmq_socket (context, ZMQ_DEALER); assert (frontend); int zero = 0; rc = zmq_setsockopt (backend, ZMQ_LINGER, &zero, sizeof (zero)); assert (rc == 0); rc = zmq_setsockopt (frontend, ZMQ_LINGER, &zero, sizeof (zero)); assert (rc == 0); // Frontend connects to backend using IMMEDIATE int on = 1; rc = zmq_setsockopt (frontend, ZMQ_IMMEDIATE, &on, sizeof (on)); assert (rc == 0); rc = zmq_bind (backend, "tcp://127.0.0.1:5560"); assert (rc == 0); rc = zmq_connect (frontend, "tcp://localhost:5560"); assert (rc == 0); // Ping backend to frontend so we know when the connection is up rc = zmq_send (backend, "Hello", 5, 0); assert (rc == 5); rc = zmq_recv (frontend, buffer, 255, 0); assert (rc == 5); // Send message from frontend to backend rc = zmq_send (frontend, "Hello", 5, ZMQ_DONTWAIT); assert (rc == 5); rc = zmq_close (backend); assert (rc == 0); // Give time to process disconnect msleep (SETTLE_TIME); // Send a message, should fail rc = zmq_send (frontend, "Hello", 5, ZMQ_DONTWAIT); assert (rc == -1); // Recreate backend socket backend = zmq_socket (context, ZMQ_DEALER); assert (backend); rc = zmq_setsockopt (backend, ZMQ_LINGER, &zero, sizeof (zero)); assert (rc == 0); rc = zmq_bind (backend, "tcp://127.0.0.1:5560"); assert (rc == 0); // Ping backend to frontend so we know when the connection is up rc = zmq_send (backend, "Hello", 5, 0); assert (rc == 5); rc = zmq_recv (frontend, buffer, 255, 0); assert (rc == 5); // After the reconnect, should succeed rc = zmq_send (frontend, "Hello", 5, ZMQ_DONTWAIT); assert (rc == 5); rc = zmq_close (backend); assert (rc == 0); rc = zmq_close (frontend); assert (rc == 0); rc = zmq_ctx_term (context); assert (rc == 0); } zeromq3-4.0.4+dfsg.orig/tests/test_router_raw_empty.cpp0000644000175000017500000000367712240736636022275 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" int main (void) { setup_test_environment(); void *ctx = zmq_ctx_new(); assert(ctx); void *router = zmq_socket(ctx, ZMQ_ROUTER); assert(router); void *dealer = zmq_socket(ctx, ZMQ_DEALER); assert(dealer); int one=1; int rc = zmq_setsockopt(router, ZMQ_ROUTER_RAW, &one, sizeof(int)); assert(rc >= 0); rc = zmq_setsockopt(router, ZMQ_ROUTER_MANDATORY, &one, sizeof(int)); assert(rc >= 0); rc = zmq_bind(router, "tcp://127.0.0.1:5555"); rc = zmq_connect(dealer, "tcp://127.0.0.1:5555"); zmq_send(dealer, "", 0, 0); zmq_msg_t ident, empty; zmq_msg_init(&ident); rc = zmq_msg_recv(&ident, router, 0); assert(rc >= 0); rc = zmq_msg_init_data(&empty, (void*)"", 0, NULL, NULL); assert(rc >= 0); rc = zmq_msg_send(&ident, router, ZMQ_SNDMORE); assert(rc >= 0); rc = zmq_msg_close(&ident); assert(rc >= 0); rc = zmq_msg_send(&empty, router, 0); assert(rc >= 0); // This close used to fail with Bad Address rc = zmq_msg_close(&empty); assert(rc >= 0); close_zero_linger(dealer); close_zero_linger(router); zmq_ctx_term(ctx); } zeromq3-4.0.4+dfsg.orig/tests/Makefile.am0000644000175000017500000000754612240736636017156 0ustar ghedoghedoINCLUDES = -I$(top_builddir)/include \ -I$(top_srcdir)/include LDADD = $(top_builddir)/src/libzmq.la noinst_PROGRAMS = test_system \ test_pair_inproc \ test_pair_tcp \ test_reqrep_inproc \ test_reqrep_tcp \ test_hwm \ test_reqrep_device \ test_sub_forward \ test_invalid_rep \ test_msg_flags \ test_connect_resolve \ test_immediate \ test_last_endpoint \ test_term_endpoint \ test_monitor \ test_router_mandatory \ test_router_raw_empty \ test_probe_router \ test_stream \ test_disconnect_inproc \ test_ctx_options \ test_ctx_destroy \ test_security_null \ test_security_plain \ test_security_curve \ test_iov \ test_spec_req \ test_spec_rep \ test_spec_dealer \ test_spec_router \ test_spec_pushpull \ test_req_correlate \ test_req_relaxed \ test_conflate \ test_inproc_connect \ test_issue_566 \ test_abstract_ipc \ test_many_sockets if !ON_MINGW noinst_PROGRAMS += test_shutdown_stress \ test_pair_ipc \ test_reqrep_ipc \ test_timeo \ test_fork endif test_system_SOURCES = test_system.cpp test_pair_inproc_SOURCES = test_pair_inproc.cpp testutil.hpp test_pair_tcp_SOURCES = test_pair_tcp.cpp testutil.hpp test_reqrep_inproc_SOURCES = test_reqrep_inproc.cpp testutil.hpp test_reqrep_tcp_SOURCES = test_reqrep_tcp.cpp testutil.hpp test_hwm_SOURCES = test_hwm.cpp test_reqrep_device_SOURCES = test_reqrep_device.cpp test_sub_forward_SOURCES = test_sub_forward.cpp test_invalid_rep_SOURCES = test_invalid_rep.cpp test_msg_flags_SOURCES = test_msg_flags.cpp test_connect_resolve_SOURCES = test_connect_resolve.cpp test_immediate_SOURCES = test_immediate.cpp test_last_endpoint_SOURCES = test_last_endpoint.cpp test_term_endpoint_SOURCES = test_term_endpoint.cpp test_monitor_SOURCES = test_monitor.cpp test_router_mandatory_SOURCES = test_router_mandatory.cpp test_router_raw_empty_SOURCES = test_router_raw_empty.cpp test_probe_router_SOURCES = test_probe_router.cpp test_stream_SOURCES = test_stream.cpp test_disconnect_inproc_SOURCES = test_disconnect_inproc.cpp test_ctx_options_SOURCES = test_ctx_options.cpp test_iov_SOURCES = test_iov.cpp test_ctx_destroy_SOURCES = test_ctx_destroy.cpp test_security_null_SOURCES = test_security_null.cpp test_security_plain_SOURCES = test_security_plain.cpp test_security_curve_SOURCES = test_security_curve.cpp test_spec_req_SOURCES = test_spec_req.cpp test_spec_rep_SOURCES = test_spec_rep.cpp test_spec_dealer_SOURCES = test_spec_dealer.cpp test_spec_router_SOURCES = test_spec_router.cpp test_spec_pushpull_SOURCES = test_spec_pushpull.cpp test_req_correlate_SOURCES = test_req_correlate.cpp test_req_relaxed_SOURCES = test_req_relaxed.cpp test_conflate_SOURCES = test_conflate.cpp test_inproc_connect_SOURCES = test_inproc_connect.cpp test_issue_566_SOURCES = test_issue_566.cpp test_abstract_ipc_SOURCES = test_abstract_ipc.cpp test_many_sockets_SOURCES = test_many_sockets.cpp if !ON_MINGW test_shutdown_stress_SOURCES = test_shutdown_stress.cpp test_pair_ipc_SOURCES = test_pair_ipc.cpp testutil.hpp test_reqrep_ipc_SOURCES = test_reqrep_ipc.cpp testutil.hpp test_timeo_SOURCES = test_timeo.cpp test_fork_SOURCES = test_fork.cpp endif # Run the test cases TESTS = $(noinst_PROGRAMS) if !ON_LINUX XFAIL_TESTS = test_abstract_ipc endif zeromq3-4.0.4+dfsg.orig/tests/test_inproc_connect.cpp0000644000175000017500000002104212307426216021645 0ustar ghedoghedo/* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" static void pusher (void *ctx) { // Connect first void *connectSocket = zmq_socket (ctx, ZMQ_PAIR); assert (connectSocket); int rc = zmq_connect (connectSocket, "inproc://a"); assert (rc == 0); // Queue up some data rc = zmq_send_const (connectSocket, "foobar", 6, 0); assert (rc == 6); // Cleanup rc = zmq_close (connectSocket); assert (rc == 0); } void test_bind_before_connect() { void *ctx = zmq_ctx_new (); assert (ctx); // Bind first void *bindSocket = zmq_socket (ctx, ZMQ_PAIR); assert (bindSocket); int rc = zmq_bind (bindSocket, "inproc://a"); assert (rc == 0); // Now connect void *connectSocket = zmq_socket (ctx, ZMQ_PAIR); assert (connectSocket); rc = zmq_connect (connectSocket, "inproc://a"); assert (rc == 0); // Queue up some data rc = zmq_send_const (connectSocket, "foobar", 6, 0); assert (rc == 6); // Read pending message zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, bindSocket, 0); assert (rc == 6); void *data = zmq_msg_data (&msg); assert (memcmp ("foobar", data, 6) == 0); // Cleanup rc = zmq_close (connectSocket); assert (rc == 0); rc = zmq_close (bindSocket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); } void test_connect_before_bind() { void *ctx = zmq_ctx_new (); assert (ctx); // Connect first void *connectSocket = zmq_socket (ctx, ZMQ_PAIR); assert (connectSocket); int rc = zmq_connect (connectSocket, "inproc://a"); assert (rc == 0); // Queue up some data rc = zmq_send_const (connectSocket, "foobar", 6, 0); assert (rc == 6); // Now bind void *bindSocket = zmq_socket (ctx, ZMQ_PAIR); assert (bindSocket); rc = zmq_bind (bindSocket, "inproc://a"); assert (rc == 0); // Read pending message zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, bindSocket, 0); assert (rc == 6); void *data = zmq_msg_data (&msg); assert (memcmp ("foobar", data, 6) == 0); // Cleanup rc = zmq_close (connectSocket); assert (rc == 0); rc = zmq_close (bindSocket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); } void test_connect_before_bind_pub_sub() { void *ctx = zmq_ctx_new (); assert (ctx); // Connect first void *connectSocket = zmq_socket (ctx, ZMQ_PUB); assert (connectSocket); int rc = zmq_connect (connectSocket, "inproc://a"); assert (rc == 0); // Queue up some data, this will be dropped rc = zmq_send_const (connectSocket, "before", 6, 0); assert (rc == 6); // Now bind void *bindSocket = zmq_socket (ctx, ZMQ_SUB); assert (bindSocket); rc = zmq_setsockopt (bindSocket, ZMQ_SUBSCRIBE, "", 0); assert (rc == 0); rc = zmq_bind (bindSocket, "inproc://a"); assert (rc == 0); // Wait for pub-sub connection to happen msleep (SETTLE_TIME); // Queue up some data, this not will be dropped rc = zmq_send_const (connectSocket, "after", 6, 0); assert (rc == 6); // Read pending message zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, bindSocket, 0); assert (rc == 6); void *data = zmq_msg_data (&msg); assert (memcmp ("after", data, 5) == 0); // Cleanup rc = zmq_close (connectSocket); assert (rc == 0); rc = zmq_close (bindSocket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); } void test_multiple_connects() { const unsigned int no_of_connects = 10; void *ctx = zmq_ctx_new (); assert (ctx); int rc; void *connectSocket[no_of_connects]; // Connect first for (unsigned int i = 0; i < no_of_connects; ++i) { connectSocket [i] = zmq_socket (ctx, ZMQ_PUSH); assert (connectSocket [i]); rc = zmq_connect (connectSocket [i], "inproc://a"); assert (rc == 0); // Queue up some data rc = zmq_send_const (connectSocket [i], "foobar", 6, 0); assert (rc == 6); } // Now bind void *bindSocket = zmq_socket (ctx, ZMQ_PULL); assert (bindSocket); rc = zmq_bind (bindSocket, "inproc://a"); assert (rc == 0); for (unsigned int i = 0; i < no_of_connects; ++i) { // Read pending message zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, bindSocket, 0); assert (rc == 6); void *data = zmq_msg_data (&msg); assert (memcmp ("foobar", data, 6) == 0); } // Cleanup for (unsigned int i = 0; i < no_of_connects; ++i) { rc = zmq_close (connectSocket [i]); assert (rc == 0); } rc = zmq_close (bindSocket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); } void test_multiple_threads() { const unsigned int no_of_threads = 30; void *ctx = zmq_ctx_new (); assert (ctx); int rc; void *threads [no_of_threads]; // Connect first for (unsigned int i = 0; i < no_of_threads; ++i) { threads [i] = zmq_threadstart (&pusher, ctx); } // Now bind void *bindSocket = zmq_socket (ctx, ZMQ_PULL); assert (bindSocket); rc = zmq_bind (bindSocket, "inproc://a"); assert (rc == 0); for (unsigned int i = 0; i < no_of_threads; ++i) { // Read pending message zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, bindSocket, 0); assert (rc == 6); void *data = zmq_msg_data (&msg); assert (memcmp ("foobar", data, 6) == 0); } // Cleanup for (unsigned int i = 0; i < no_of_threads; ++i) { zmq_threadclose (threads [i]); } rc = zmq_close (bindSocket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); } void test_identity() { // Create the infrastructure void *ctx = zmq_ctx_new (); assert (ctx); void *sc = zmq_socket (ctx, ZMQ_DEALER); assert (sc); int rc = zmq_connect (sc, "inproc://a"); assert (rc == 0); void *sb = zmq_socket (ctx, ZMQ_ROUTER); assert (sb); rc = zmq_bind (sb, "inproc://a"); assert (rc == 0); // Send 2-part message. rc = zmq_send (sc, "A", 1, ZMQ_SNDMORE); assert (rc == 1); rc = zmq_send (sc, "B", 1, 0); assert (rc == 1); // Identity comes first. zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_msg_recv (&msg, sb, 0); assert (rc >= 0); int more = zmq_msg_more (&msg); assert (more == 1); // Then the first part of the message body. rc = zmq_msg_recv (&msg, sb, 0); assert (rc == 1); more = zmq_msg_more (&msg); assert (more == 1); // And finally, the second part of the message body. rc = zmq_msg_recv (&msg, sb, 0); assert (rc == 1); more = zmq_msg_more (&msg); assert (more == 0); // Deallocate the infrastructure. rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); } void test_connect_only () { void *ctx = zmq_ctx_new (); assert (ctx); void *connectSocket = zmq_socket (ctx, ZMQ_PUSH); assert (connectSocket); int rc = zmq_connect (connectSocket, "inproc://a"); assert (rc == 0); rc = zmq_close (connectSocket); assert (rc == 0); rc = zmq_ctx_term (ctx); assert (rc == 0); } int main (void) { setup_test_environment(); test_bind_before_connect (); test_connect_before_bind (); test_connect_before_bind_pub_sub (); test_multiple_connects (); test_multiple_threads (); test_identity (); test_connect_only (); return 0; } zeromq3-4.0.4+dfsg.orig/config/0000755000175000017500000000000012307431206015176 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/config/config.guess0000755000175000017500000012743212307430721017530 0ustar ghedoghedo#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: zeromq3-4.0.4+dfsg.orig/config/depcomp0000755000175000017500000004755612307430722016576 0ustar ghedoghedo#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2011-12-04.11; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/ / G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: zeromq3-4.0.4+dfsg.orig/config/ltmain.sh0000644000175000017500000105204012307430712017021 0ustar ghedoghedo # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1ubuntu1" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 zeromq3-4.0.4+dfsg.orig/config/config.sub0000755000175000017500000010517612307430721017174 0ustar ghedoghedo#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: zeromq3-4.0.4+dfsg.orig/config/install-sh0000755000175000017500000003325612307430721017214 0ustar ghedoghedo#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: zeromq3-4.0.4+dfsg.orig/config/ltsugar.m40000644000175000017500000001042412307430712017123 0ustar ghedoghedo# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) zeromq3-4.0.4+dfsg.orig/config/lt~obsolete.m40000644000175000017500000001375612307430712020027 0ustar ghedoghedo# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) zeromq3-4.0.4+dfsg.orig/config/ltoptions.m40000644000175000017500000003007312307430712017477 0ustar ghedoghedo# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) zeromq3-4.0.4+dfsg.orig/config/missing0000755000175000017500000002415212307430721016602 0ustar ghedoghedo#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: zeromq3-4.0.4+dfsg.orig/config/ltversion.m40000644000175000017500000000126212307430712017467 0ustar ghedoghedo# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) zeromq3-4.0.4+dfsg.orig/config/libtool.m40000644000175000017500000106043412307430712017115 0ustar ghedoghedo# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS zeromq3-4.0.4+dfsg.orig/config/compile0000755000175000017500000001533712307430721016566 0ustar ghedoghedo#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-01-04.17; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free # Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l*) lib=${1#-l} found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes set x "$@" "$dir/$lib.dll.lib" break fi if test -f "$dir/$lib.lib"; then found=yes set x "$@" "$dir/$lib.lib" break fi done IFS=$save_IFS test "$found" != yes && set x "$@" "$lib.lib" shift ;; -L*) func_file_conv "${1#-L}" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: zeromq3-4.0.4+dfsg.orig/builds/0000755000175000017500000000000012307431206015213 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/redhat/0000755000175000017500000000000012307431206016462 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/redhat/zeromq.spec.in0000644000175000017500000001051212240736636021272 0ustar ghedoghedoName: zeromq Version: @PACKAGE_VERSION@ Release: 1%{?dist} Summary: The ZeroMQ messaging library Group: Applications/Internet License: LGPLv3+ URL: http://www.zeromq.org/ Source: http://download.zeromq.org/%{name}-%{version}.tar.gz Prefix: %{_prefix} Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc, make, gcc-c++, libstdc++-devel Requires: libstdc++ %if 0%{?rhel} %if 0%{?rhel} == 6 BuildRequires: libuuid-devel Requires: libuuid %endif %if 0%{?rhel} == 5 BuildRequires: e2fsprogs-devel Requires: e2fsprogs %endif %else BuildRequires: uuid-devel Requires: uuid %endif # Build pgm only on supported archs %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 BuildRequires: python, perl %endif %description The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains the ZeroMQ shared library. %package devel Summary: Development files and static library for the ZeroMQ library Group: Development/Libraries Requires: %{name} = %{version}-%{release}, pkgconfig %description devel The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains ZeroMQ related development libraries and header files. %prep %setup -q %build %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 %configure --with-pgm --with-pic --with-gnu-ld %else %configure %endif %{__make} %{?_smp_mflags} %install [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} # Install the package to build area %{__make} check %makeinstall %post /sbin/ldconfig %postun /sbin/ldconfig %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) # docs in the main package %doc AUTHORS ChangeLog COPYING COPYING.LESSER NEWS README # libraries %{_libdir}/libzmq.so.3 %{_libdir}/libzmq.so.3.0.0 %{_mandir}/man7/zmq.7.gz %files devel %defattr(-,root,root,-) %{_includedir}/zmq.h %{_includedir}/zmq_utils.h %{_libdir}/libzmq.la %{_libdir}/libzmq.a %{_libdir}/pkgconfig/libzmq.pc %{_libdir}/libzmq.so %{_mandir}/man3/zmq_bind.3.gz %{_mandir}/man3/zmq_close.3.gz %{_mandir}/man3/zmq_connect.3.gz %{_mandir}/man3/zmq_disconnect.3.gz %{_mandir}/man3/zmq_ctx_destroy.3.gz %{_mandir}/man3/zmq_ctx_get.3.gz %{_mandir}/man3/zmq_ctx_new.3.gz %{_mandir}/man3/zmq_ctx_set.3.gz %{_mandir}/man3/zmq_ctx_term.3.gz %{_mandir}/man3/zmq_msg_recv.3.gz %{_mandir}/man3/zmq_errno.3.gz %{_mandir}/man3/zmq_getsockopt.3.gz %{_mandir}/man3/zmq_init.3.gz %{_mandir}/man3/zmq_msg_close.3.gz %{_mandir}/man3/zmq_msg_copy.3.gz %{_mandir}/man3/zmq_msg_data.3.gz %{_mandir}/man3/zmq_msg_init.3.gz %{_mandir}/man3/zmq_msg_init_data.3.gz %{_mandir}/man3/zmq_msg_init_size.3.gz %{_mandir}/man3/zmq_msg_move.3.gz %{_mandir}/man3/zmq_msg_size.3.gz %{_mandir}/man3/zmq_msg_get.3.gz %{_mandir}/man3/zmq_msg_more.3.gz %{_mandir}/man3/zmq_msg_recv.3.gz %{_mandir}/man3/zmq_msg_send.3.gz %{_mandir}/man3/zmq_msg_set.3.gz %{_mandir}/man3/zmq_poll.3.gz %{_mandir}/man3/zmq_proxy.3.gz %{_mandir}/man3/zmq_recv.3.gz %{_mandir}/man3/zmq_recvmsg.3.gz %{_mandir}/man3/zmq_send.3.gz %{_mandir}/man3/zmq_sendmsg.3.gz %{_mandir}/man3/zmq_setsockopt.3.gz %{_mandir}/man3/zmq_socket.3.gz %{_mandir}/man3/zmq_socket_monitor.3.gz %{_mandir}/man3/zmq_strerror.3.gz %{_mandir}/man3/zmq_term.3.gz %{_mandir}/man3/zmq_version.3.gz %{_mandir}/man3/zmq_unbind.3.gz %{_mandir}/man7/zmq_epgm.7.gz %{_mandir}/man7/zmq_inproc.7.gz %{_mandir}/man7/zmq_ipc.7.gz %{_mandir}/man7/zmq_pgm.7.gz %{_mandir}/man7/zmq_tcp.7.gz %changelog * Mon Nov 26 2012 Justin Cook 3.2.2 - Update packaged files * Fri Apr 8 2011 Mikko Koppanen 3.0.0-1 - Update dependencies and packaged files * Sat Apr 10 2010 Mikko Koppanen 2.0.7-1 - Initial packaging zeromq3-4.0.4+dfsg.orig/builds/msvc/0000755000175000017500000000000012307431377016174 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/msvc/c_local_lat/0000755000175000017500000000000012307431377020430 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/msvc/c_local_lat/c_local_lat.vcproj0000644000175000017500000000643212240736636024120 0ustar ghedoghedo zeromq3-4.0.4+dfsg.orig/builds/msvc/c_local_lat/c_local_lat.vcxproj0000644000175000017500000001122012240736636024277 0ustar ghedoghedo Debug Win32 Debug x64 Release Win32 Release x64 local_lat {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57} c_local_lat Application MultiByte true Application MultiByte true Application MultiByte Application MultiByte <_ProjectFileVersion>10.0.40219.1 AllRules.ruleset {641c5f36-32ee-4323-b740-992b651cf9d6} false zeromq3-4.0.4+dfsg.orig/builds/msvc/errno.cpp0000644000175000017500000000101612240736636020025 0ustar ghedoghedo#if defined _WIN32_WCE //#include "..\..\include\zmq.h" #include "..\..\src\err.hpp" int errno; int _doserrno; int _sys_nerr; char* error_desc_buff = NULL; char* strerror(int errno) { if (NULL != error_desc_buff) { LocalFree(error_desc_buff); error_desc_buff = NULL; } FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, errno, 0, (LPTSTR)&error_desc_buff, 1024, NULL ); return error_desc_buff; } #endifzeromq3-4.0.4+dfsg.orig/builds/msvc/c_remote_lat/0000755000175000017500000000000012307431377020631 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/msvc/c_remote_lat/c_remote_lat.vcxproj0000644000175000017500000001122312240736636024704 0ustar ghedoghedo Debug Win32 Debug x64 Release Win32 Release x64 remote_lat {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1} c_remote_lat Application MultiByte true Application MultiByte true Application MultiByte Application MultiByte <_ProjectFileVersion>10.0.40219.1 AllRules.ruleset {641c5f36-32ee-4323-b740-992b651cf9d6} false zeromq3-4.0.4+dfsg.orig/builds/msvc/c_remote_lat/c_remote_lat.vcproj0000644000175000017500000000643712240736636024527 0ustar ghedoghedo zeromq3-4.0.4+dfsg.orig/builds/msvc/msvc.sln0000644000175000017500000001412712240736636017671 0ustar ghedoghedo Microsoft Visual Studio Solution File, Format Version 10.00 # Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzmq", "libzmq\libzmq.vcproj", "{641C5F36-32EE-4323-B740-992B651CF9D6}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "local_lat", "c_local_lat\c_local_lat.vcproj", "{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote_lat", "c_remote_lat\c_remote_lat.vcproj", "{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "local_thr", "c_local_thr\c_local_thr.vcproj", "{8EF2DF6B-6646-460F-8032-913B70FE0E94}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote_thr", "c_remote_thr\c_remote_thr.vcproj", "{B15E059C-0CBB-4A82-8C42-6567FB650802}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inproc_lat", "inproc_lat\inproc_lat.vcproj", "{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inproc_thr", "inproc_thr\inproc_thr.vcproj", "{1077E977-95DD-4E73-A692-74647DD0CC1E}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 StaticDebug|Win32 = StaticDebug|Win32 StaticRelease|Win32 = StaticRelease|Win32 WithOpenPGM|Win32 = WithOpenPGM|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|Win32.ActiveCfg = Debug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|Win32.Build.0 = Debug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Release|Win32.ActiveCfg = Release|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Release|Win32.Build.0 = Release|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|Win32.ActiveCfg = StaticDebug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|Win32.Build.0 = StaticDebug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|Win32.ActiveCfg = StaticRelease|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|Win32.Build.0 = StaticRelease|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.ActiveCfg = WithOpenPGM|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.Build.0 = WithOpenPGM|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|Win32.ActiveCfg = Debug|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|Win32.Build.0 = Debug|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.ActiveCfg = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.Build.0 = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.Build.0 = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|Win32.ActiveCfg = Debug|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|Win32.Build.0 = Debug|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.ActiveCfg = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.Build.0 = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.Build.0 = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|Win32.ActiveCfg = Debug|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|Win32.Build.0 = Debug|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.ActiveCfg = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.Build.0 = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.Build.0 = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|Win32.ActiveCfg = Debug|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|Win32.Build.0 = Debug|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.ActiveCfg = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.Build.0 = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.Build.0 = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|Win32.ActiveCfg = Debug|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|Win32.Build.0 = Debug|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.ActiveCfg = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.Build.0 = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.Build.0 = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|Win32.ActiveCfg = Debug|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|Win32.Build.0 = Debug|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.ActiveCfg = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.Build.0 = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal zeromq3-4.0.4+dfsg.orig/builds/msvc/msvc10.sln0000644000175000017500000002520312240736636020027 0ustar ghedoghedo Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Express 2012 for Windows Desktop Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzmq", "libzmq\libzmq.vcxproj", "{641C5F36-32EE-4323-B740-992B651CF9D6}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "local_lat", "c_local_lat\c_local_lat.vcxproj", "{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote_lat", "c_remote_lat\c_remote_lat.vcxproj", "{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "local_thr", "c_local_thr\c_local_thr.vcxproj", "{8EF2DF6B-6646-460F-8032-913B70FE0E94}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote_thr", "c_remote_thr\c_remote_thr.vcxproj", "{B15E059C-0CBB-4A82-8C42-6567FB650802}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inproc_lat", "inproc_lat\inproc_lat.vcxproj", "{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inproc_thr", "inproc_thr\inproc_thr.vcxproj", "{1077E977-95DD-4E73-A692-74647DD0CC1E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 StaticDebug|Win32 = StaticDebug|Win32 StaticDebug|x64 = StaticDebug|x64 StaticRelease|Win32 = StaticRelease|Win32 StaticRelease|x64 = StaticRelease|x64 WithOpenPGM|Win32 = WithOpenPGM|Win32 WithOpenPGM|x64 = WithOpenPGM|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|Win32.ActiveCfg = Debug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|Win32.Build.0 = Debug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|x64.ActiveCfg = Debug|x64 {641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|x64.Build.0 = Debug|x64 {641C5F36-32EE-4323-B740-992B651CF9D6}.Release|Win32.ActiveCfg = Release|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Release|Win32.Build.0 = Release|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Release|x64.ActiveCfg = Release|x64 {641C5F36-32EE-4323-B740-992B651CF9D6}.Release|x64.Build.0 = Release|x64 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|Win32.ActiveCfg = StaticDebug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|Win32.Build.0 = StaticDebug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticDebug|x64.ActiveCfg = StaticDebug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|Win32.ActiveCfg = StaticRelease|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|Win32.Build.0 = StaticRelease|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.StaticRelease|x64.ActiveCfg = StaticRelease|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.ActiveCfg = WithOpenPGM|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.Build.0 = WithOpenPGM|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|x64.ActiveCfg = WithOpenPGM|x64 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|x64.Build.0 = WithOpenPGM|x64 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|Win32.ActiveCfg = Debug|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|Win32.Build.0 = Debug|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|x64.ActiveCfg = Debug|x64 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|x64.Build.0 = Debug|x64 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.ActiveCfg = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.Build.0 = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|x64.ActiveCfg = Release|x64 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|x64.Build.0 = Release|x64 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticDebug|Win32.ActiveCfg = Debug|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticDebug|x64.ActiveCfg = Debug|x64 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticRelease|Win32.ActiveCfg = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.StaticRelease|x64.ActiveCfg = Release|x64 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.Build.0 = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|x64.ActiveCfg = Release|x64 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|x64.Build.0 = Release|x64 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|Win32.ActiveCfg = Debug|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|Win32.Build.0 = Debug|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|x64.ActiveCfg = Debug|x64 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|x64.Build.0 = Debug|x64 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.ActiveCfg = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.Build.0 = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|x64.ActiveCfg = Release|x64 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|x64.Build.0 = Release|x64 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticDebug|Win32.ActiveCfg = Debug|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticDebug|x64.ActiveCfg = Debug|x64 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticRelease|Win32.ActiveCfg = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.StaticRelease|x64.ActiveCfg = Release|x64 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.Build.0 = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|x64.ActiveCfg = Release|x64 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|x64.Build.0 = Release|x64 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|Win32.ActiveCfg = Debug|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|Win32.Build.0 = Debug|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|x64.ActiveCfg = Debug|x64 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|x64.Build.0 = Debug|x64 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.ActiveCfg = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.Build.0 = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|x64.ActiveCfg = Release|x64 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|x64.Build.0 = Release|x64 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticDebug|Win32.ActiveCfg = Debug|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticDebug|x64.ActiveCfg = Debug|x64 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticRelease|Win32.ActiveCfg = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.StaticRelease|x64.ActiveCfg = Release|x64 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.Build.0 = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|x64.ActiveCfg = Release|x64 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|x64.Build.0 = Release|x64 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|Win32.ActiveCfg = Debug|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|Win32.Build.0 = Debug|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|x64.ActiveCfg = Debug|x64 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|x64.Build.0 = Debug|x64 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.ActiveCfg = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.Build.0 = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|x64.ActiveCfg = Release|x64 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|x64.Build.0 = Release|x64 {B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticDebug|Win32.ActiveCfg = Debug|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticDebug|x64.ActiveCfg = Debug|x64 {B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticRelease|Win32.ActiveCfg = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.StaticRelease|x64.ActiveCfg = Release|x64 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.Build.0 = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|x64.ActiveCfg = Release|x64 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|x64.Build.0 = Release|x64 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|Win32.ActiveCfg = Debug|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|Win32.Build.0 = Debug|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|x64.ActiveCfg = Debug|x64 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|x64.Build.0 = Debug|x64 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.ActiveCfg = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.Build.0 = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|x64.ActiveCfg = Release|x64 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|x64.Build.0 = Release|x64 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticDebug|Win32.ActiveCfg = Debug|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticDebug|x64.ActiveCfg = Debug|x64 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticRelease|Win32.ActiveCfg = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.StaticRelease|x64.ActiveCfg = Release|x64 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.Build.0 = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|x64.ActiveCfg = Release|x64 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|x64.Build.0 = Release|x64 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|Win32.ActiveCfg = Debug|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|Win32.Build.0 = Debug|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|x64.ActiveCfg = Debug|x64 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|x64.Build.0 = Debug|x64 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.ActiveCfg = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.Build.0 = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|x64.ActiveCfg = Release|x64 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|x64.Build.0 = Release|x64 {1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticDebug|Win32.ActiveCfg = Debug|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticDebug|x64.ActiveCfg = Debug|x64 {1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticRelease|Win32.ActiveCfg = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.StaticRelease|x64.ActiveCfg = Release|x64 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.Build.0 = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|x64.ActiveCfg = Release|x64 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal zeromq3-4.0.4+dfsg.orig/builds/msvc/inproc_lat/0000755000175000017500000000000012307431377020326 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/msvc/inproc_lat/inproc_lat.vcxproj0000644000175000017500000001264712240736636024111 0ustar ghedoghedo Debug Win32 Debug x64 Release Win32 Release x64 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0} inproc_lat Application MultiByte true Application MultiByte true Application MultiByte Application MultiByte <_ProjectFileVersion>10.0.40219.1 AllRules.ruleset copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf {641c5f36-32ee-4323-b740-992b651cf9d6} false zeromq3-4.0.4+dfsg.orig/builds/msvc/inproc_lat/inproc_lat.vcproj0000644000175000017500000000671112240736636023714 0ustar ghedoghedo zeromq3-4.0.4+dfsg.orig/builds/msvc/c_remote_thr/0000755000175000017500000000000012307431377020646 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/msvc/c_remote_thr/c_remote_thr.vcxproj0000644000175000017500000001272312240736636024744 0ustar ghedoghedo Debug Win32 Debug x64 Release Win32 Release x64 remote_thr {B15E059C-0CBB-4A82-8C42-6567FB650802} c_remote_thr Application MultiByte true Application MultiByte true Application MultiByte Application MultiByte <_ProjectFileVersion>10.0.40219.1 AllRules.ruleset copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf {641c5f36-32ee-4323-b740-992b651cf9d6} false zeromq3-4.0.4+dfsg.orig/builds/msvc/c_remote_thr/c_remote_thr.vcproj0000644000175000017500000000661112240736636024553 0ustar ghedoghedo zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/0000755000175000017500000000000012307431377020370 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/msvc/properties/x64.props0000644000175000017500000000077212240736636022106 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>x64 Settings _WIN64;%(PreprocessorDefinitions) zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/Common.props0000644000175000017500000000175712240736636022721 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>Common Settings $(ProjectDir)../../../bin/$(PlatformName)/ $(ProjectDir)../../../obj/$(PlatformName)/$(Configuration)/$(ProjectName)/ false Level3 ProgramDatabase _BIND_TO_CURRENT_VCLIBS_VERSION=1;%(PreprocessorDefinitions) true true zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/Executable.props0000644000175000017500000000144512240736636023544 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>Executable Program _CONSOLE;%(PreprocessorDefinitions) $(TargetDir)../../lib/$(PlatformName);%(AdditionalLibraryDirectories) Console zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/ZeroMQ_Static.props0000644000175000017500000000176512251014562024141 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>ZeroMQ Static Settings copy ..\platform.hpp ..\..\..\src _CRT_SECURE_NO_WARNINGS;ZMQ_STATIC;FD_SETSIZE=1024;%(PreprocessorDefinitions) Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies) /ignore:4006 /ignore:4221 %(AdditionalOptions) zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/Dynamic.props0000644000175000017500000000161412240736636023045 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>Dynamic Link Library _WINDOWS;_USRDLL;%(PreprocessorDefinitions) $(TargetDir)../../lib/$(PlatformName);%(AdditionalLibraryDirectories) Windows $(TargetDir)../../lib/$(PlatformName)/$(TargetName).lib zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/Win32_Release.props0000644000175000017500000000132012240736636024015 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>Release Win32 Settings /Oy- %(AdditionalOptions) StreamingSIMDExtensions2 zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/WithOpenPGM.props0000644000175000017500000000100512240736636023554 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>OpenPGM Settings ZMQ_HAVE_OPENPGM;%(PreprocessorDefinitions) zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/Debug.props0000644000175000017500000000154012240736636022505 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>Debug Configuration $(ProjectName)_d Disabled _DEBUG;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL _DEBUG;%(PreprocessorDefinitions) zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/Static.props0000644000175000017500000000113412240736636022705 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>Static Library _WINDOWS;%(PreprocessorDefinitions) zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/ZeroMQ.props0000644000175000017500000000162512251014562022625 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>ZeroMQ Settings copy ..\platform.hpp ..\..\..\src _CRT_SECURE_NO_WARNINGS;DLL_EXPORT;FD_SETSIZE=1024;%(PreprocessorDefinitions) Ws2_32.lib;Rpcrt4.lib;%(AdditionalDependencies) zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/Release.props0000644000175000017500000000165012240736636023041 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>Release Configuration MaxSpeed NDEBUG;%(PreprocessorDefinitions) MultiThreadedDLL true NDEBUG;%(PreprocessorDefinitions) true true zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/Precompiled.props0000644000175000017500000000113312240736636023720 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>Precompiled Headers Use precompiled.hpp precompiled.hpp zeromq3-4.0.4+dfsg.orig/builds/msvc/properties/Win32.props0000644000175000017500000000077312240736636022370 0ustar ghedoghedo <_ProjectFileVersion>10.0.30319.1 <_PropertySheetDisplayName>Win32 Settings WIN32;%(PreprocessorDefinitions) zeromq3-4.0.4+dfsg.orig/builds/msvc/libzmq/0000755000175000017500000000000012307431377017472 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/msvc/libzmq/libzmq.vcxproj0000644000175000017500000004237512240736636022422 0ustar ghedoghedo Debug Win32 Debug x64 Release Win32 Release x64 StaticDebug Win32 StaticRelease Win32 WithOpenPGM Win32 WithOpenPGM x64 {641C5F36-32EE-4323-B740-992B651CF9D6} libzmq DynamicLibrary MultiByte true DynamicLibrary MultiByte true DynamicLibrary MultiByte true DynamicLibrary MultiByte true DynamicLibrary MultiByte DynamicLibrary MultiByte StaticLibrary MultiByte true StaticLibrary MultiByte <_ProjectFileVersion>10.0.40219.1 AllRules.ruleset copy ..\platform.hpp ..\..\..\src copy ..\platform.hpp ..\..\..\src copy ..\platform.hpp ..\..\..\src copy ..\platform.hpp ..\..\..\src copy ..\platform.hpp ..\..\..\src MultiThreadedDLL copy ..\platform.hpp ..\..\..\src MultiThreadedDebugDLL Create zeromq3-4.0.4+dfsg.orig/builds/msvc/libzmq/libzmq.vcxproj.filters0000644000175000017500000003755412240736636024074 0ustar ghedoghedo {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files zeromq3-4.0.4+dfsg.orig/builds/msvc/libzmq/libzmq.vcproj0000644000175000017500000004650312251014562022214 0ustar ghedoghedo zeromq3-4.0.4+dfsg.orig/builds/msvc/Makefile.in0000644000175000017500000002756212307430721020245 0ustar ghedoghedo# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = builds/msvc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LIBZMQ_DIST = libzmq/libzmq.vcproj libzmq/libzmq.vcxproj \ libzmq/libzmq.vcxproj.filters \ platform.hpp msvc.sln msvc10.sln \ errno.cpp errno.hpp PERF_DIST = c_local_thr/c_local_thr.vcproj \ c_local_thr/c_local_thr.vcxproj \ c_remote_thr/c_remote_thr.vcproj \ c_remote_thr/c_remote_thr.vcxproj \ c_local_lat/c_local_lat.vcproj \ c_local_lat/c_local_lat.vcxproj \ c_remote_lat/c_remote_lat.vcproj \ c_remote_lat/c_remote_lat.vcxproj \ inproc_lat/inproc_lat.vcproj \ inproc_lat/inproc_lat.vcxproj \ inproc_thr/inproc_thr.vcproj \ inproc_thr/inproc_thr.vcxproj PROPERTIES_DIST = properties/Common.props \ properties/Debug.props \ properties/Dynamic.props \ properties/Executable.props \ properties/Precompiled.props \ properties/Release.props \ properties/Static.props \ properties/Win32.props \ properties/Win32_Release.props \ properties/WithOpenPGM.props \ properties/x64.props \ properties/ZeroMQ.props \ properties/ZeroMQ_Static.props PRECOMPILED_DIST = ../../src/precompiled.hpp \ ../../src/precompiled.cpp EXTRA_DIST = $(LIBZMQ_DIST) $(PERF_DIST) $(PROPERTIES_DIST) $(PRECOMPILED_DIST) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign builds/msvc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign builds/msvc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq3-4.0.4+dfsg.orig/builds/msvc/errno.hpp0000644000175000017500000000240412240736636020034 0ustar ghedoghedo#ifndef ERRNO_H #define ERRNO_H 1 //#define EPERM 1 //#define ENOENT 2 //#define ESRCH 3 #define EINTR 4 //#define EIO 5 //#define ENXIO 6 //#define E2BIG 7 //#define ENOEXEC 8 #define EBADF 9 //#define ECHILD 10 #define EAGAIN 11 //#define ENOMEM 12 #define EACCES 13 #define EFAULT 14 //#define EOSERR 15 // rk //#define EBUSY 16 //#define EEXIST 17 //#define EXDEV 18 //#define ENODEV 19 //#define ENOTDIR 20 //#define EISDIR 21 #define EINVAL 22 //#define ENFILE 23 #define EMFILE 24 //#define ENOTTY 25 //#define EFBIG 27 //#define ENOSPC 28 //#define ESPIPE 29 //#define EROFS 30 //#define EMLINK 31 //#define EPIPE 32 //#define EDOM 33 //#define ERANGE 34 //#define EDEADLK 36 //#define ENOSYS 37 #ifdef __cplusplus extern "C" { #endif extern int errno; extern int _doserrno; extern int _sys_nerr; char* strerror(int errno); #define sys_nerr _sys_nerr #ifdef __cplusplus }; #endif #endifzeromq3-4.0.4+dfsg.orig/builds/msvc/inproc_thr/0000755000175000017500000000000012307431377020343 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/msvc/inproc_thr/inproc_thr.vcproj0000644000175000017500000000671112240736636023746 0ustar ghedoghedo zeromq3-4.0.4+dfsg.orig/builds/msvc/inproc_thr/inproc_thr.vcxproj0000644000175000017500000001264712240736636024143 0ustar ghedoghedo Debug Win32 Debug x64 Release Win32 Release x64 {1077E977-95DD-4E73-A692-74647DD0CC1E} inproc_thr Application MultiByte true Application MultiByte true Application MultiByte Application MultiByte <_ProjectFileVersion>10.0.40219.1 AllRules.ruleset copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf {641c5f36-32ee-4323-b740-992b651cf9d6} false zeromq3-4.0.4+dfsg.orig/builds/msvc/c_local_thr/0000755000175000017500000000000012307431377020445 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/builds/msvc/c_local_thr/c_local_thr.vcproj0000644000175000017500000000660412240736636024153 0ustar ghedoghedo zeromq3-4.0.4+dfsg.orig/builds/msvc/c_local_thr/c_local_thr.vcxproj0000644000175000017500000001272012240736636024337 0ustar ghedoghedo Debug Win32 Debug x64 Release Win32 Release x64 local_thr {8EF2DF6B-6646-460F-8032-913B70FE0E94} c_local_thr Application MultiByte true Application MultiByte true Application MultiByte Application MultiByte <_ProjectFileVersion>10.0.40219.1 AllRules.ruleset copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf copy ..\platform.hpp ..\..\..\perf {641c5f36-32ee-4323-b740-992b651cf9d6} false zeromq3-4.0.4+dfsg.orig/builds/msvc/platform.hpp0000644000175000017500000000227612240736636020542 0ustar ghedoghedo/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PLATFORM_HPP_INCLUDED__ #define __ZMQ_PLATFORM_HPP_INCLUDED__ // This is the platform definition for the MSVC platform. // As a first step of the build process it is copied to // zmq directory to take place of platform.hpp generated from // platform.hpp.in on platforms supported by GNU autotools. // Place any MSVC-specific definitions here. #define ZMQ_HAVE_WINDOWS #endif zeromq3-4.0.4+dfsg.orig/builds/msvc/Makefile.am0000644000175000017500000000273712240736636020243 0ustar ghedoghedoLIBZMQ_DIST = libzmq/libzmq.vcproj libzmq/libzmq.vcxproj \ libzmq/libzmq.vcxproj.filters \ platform.hpp msvc.sln msvc10.sln \ errno.cpp errno.hpp PERF_DIST = c_local_thr/c_local_thr.vcproj \ c_local_thr/c_local_thr.vcxproj \ c_remote_thr/c_remote_thr.vcproj \ c_remote_thr/c_remote_thr.vcxproj \ c_local_lat/c_local_lat.vcproj \ c_local_lat/c_local_lat.vcxproj \ c_remote_lat/c_remote_lat.vcproj \ c_remote_lat/c_remote_lat.vcxproj \ inproc_lat/inproc_lat.vcproj \ inproc_lat/inproc_lat.vcxproj \ inproc_thr/inproc_thr.vcproj \ inproc_thr/inproc_thr.vcxproj PROPERTIES_DIST = properties/Common.props \ properties/Debug.props \ properties/Dynamic.props \ properties/Executable.props \ properties/Precompiled.props \ properties/Release.props \ properties/Static.props \ properties/Win32.props \ properties/Win32_Release.props \ properties/WithOpenPGM.props \ properties/x64.props \ properties/ZeroMQ.props \ properties/ZeroMQ_Static.props PRECOMPILED_DIST = ../../src/precompiled.hpp \ ../../src/precompiled.cpp EXTRA_DIST = $(LIBZMQ_DIST) $(PERF_DIST) $(PROPERTIES_DIST) $(PRECOMPILED_DIST) zeromq3-4.0.4+dfsg.orig/tools/0000755000175000017500000000000012307431377015102 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/tools/curve_keygen.c0000644000175000017500000000430712240736636017742 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. This tool generates a CurveZMQ keypair, as two printable strings you can use in configuration files or source code. The encoding uses Z85, which is a base-85 format that is described in 0MQ RFC 32, and which has an implementation in the z85_codec.h source used by this tool. The keypair always works with the secret key held by one party and the public key distributed (securely!) to peers wishing to connect to it. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include #include int main (void) { puts ("This tool generates a CurveZMQ keypair, as two printable strings you can"); puts ("use in configuration files or source code. The encoding uses Z85, which"); puts ("is a base-85 format that is described in 0MQ RFC 32, and which has an"); puts ("implementation in the z85_codec.h source used by this tool. The keypair"); puts ("always works with the secret key held by one party and the public key"); puts ("distributed (securely!) to peers wishing to connect to it."); char public_key [41]; char secret_key [41]; int rc = zmq_curve_keypair (public_key, secret_key); if (rc != 0) { if (zmq_errno () == ENOTSUP) { puts ("To use curve_keygen, please install libsodium and then rebuild libzmq."); } exit (1); } puts ("\n== CURVE PUBLIC KEY =="); puts (public_key); puts ("\n== CURVE SECRET KEY =="); puts (secret_key); exit (0); } zeromq3-4.0.4+dfsg.orig/tools/Makefile.in0000644000175000017500000004246312307430722017151 0ustar ghedoghedo# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = curve_keygen$(EXEEXT) subdir = tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_curve_keygen_OBJECTS = curve_keygen.$(OBJEXT) curve_keygen_OBJECTS = $(am_curve_keygen_OBJECTS) curve_keygen_DEPENDENCIES = $(top_builddir)/src/libzmq.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(curve_keygen_SOURCES) DIST_SOURCES = $(curve_keygen_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = curve_keygen.c INCLUDES = -I$(top_srcdir)/include curve_keygen_LDADD = $(top_builddir)/src/libzmq.la curve_keygen_SOURCES = curve_keygen.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tools/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list curve_keygen$(EXEEXT): $(curve_keygen_OBJECTS) $(curve_keygen_DEPENDENCIES) $(EXTRA_curve_keygen_DEPENDENCIES) @rm -f curve_keygen$(EXEEXT) $(AM_V_CCLD)$(LINK) $(curve_keygen_OBJECTS) $(curve_keygen_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve_keygen.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq3-4.0.4+dfsg.orig/tools/Makefile.am0000644000175000017500000000027112240736636017140 0ustar ghedoghedoEXTRA_DIST = curve_keygen.c INCLUDES = -I$(top_srcdir)/include bin_PROGRAMS = curve_keygen curve_keygen_LDADD = $(top_builddir)/src/libzmq.la curve_keygen_SOURCES = curve_keygen.c zeromq3-4.0.4+dfsg.orig/COPYING0000644000175000017500000010451512240736636015005 0ustar ghedoghedo GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . zeromq3-4.0.4+dfsg.orig/NEWS0000644000175000017500000004440312307426216014442 0ustar ghedoghedo0MQ version 4.0.4 stable, released on 2014/03/10 ================================================ Bug Fixes --------- * Fixed #909; out of tree build issue on Linux. * Fixed #888; hangs on terminate when inproc connected but never bound. * Fixed #868; assertion failure at ip.cpp:137 when using port scanner. * Fixed #818; fix timestamp counter on s390/s390x. * Fixed #817; only export zmq_* symbols. * Fixed #797; fixed setting TCP keepalive on Windows. * Fixed #775; compile error on Windows. * Fixed #763; when talking to a ZMTP v1 peer (libzmq 2.2), a socket would send an extra identity frame at the start of the connection. * Fixed LIBZMQ-576 - Crash closing a socket after zmq_msg_send returns EAGAIN (reverts LIBZMQ-497) * Fixed LIBZMQ-584; subscription filters getting lost on reconnection. 0MQ version 4.0.3 stable, released on 2013/11/24 ================================================ Bug Fixes --------- * Fixed test_many_sockets case, which failed when process socket limit was 1024. 0MQ version 4.0.2 stable, released on 2013/11/24 ================================================ Bug Fixes --------- * Fixed LIBZMQ-583 - improved low-res timer for Windows * Fixed LIBZMQ-578 - z85_decode was extremely slow * Fixed LIBZMQ-577 - fault in man pages. * Fixed LIBZMQ-574 - assertion failure when ran out of system file handles * Fixed LIBZMQ-571 - test_stream failing in some cases * Fixed LIBZMQ-569 - Socket server crashes with random client data and when talking to 2.2 versions * Fixed LIBZMQ-39 - Bad file descriptor during shutdown * Pulled expected failing test_linger.cpp from release * Reduced pause time in tests to allow "make check" to run faster 0MQ version 4.0.1 stable, released on 2013/10/08 ================================================ Changes ------- * Updated CURVE mechanism to track revised RFC 27 (INITIATE vouch). The INITIATE command vouch box is Box[C',S](C->S') instead of Box[C'](C->S), to reduce the risk of client impersonation, as per https://codesinchaos.wordpress.com/2012/09/09/curvecp-1/. * Fixed LIBZMQ-567, adding abstract namespaces for IPC sockets on Linux. Converts an initial strudel or "at sign" (@) in the Unix socket path to a NULL character ('\0') indicating that the socket uses the abstract namespace instead of the filesystem namespace. For instance, binding a socket to 'ipc://@/tmp/tester' will not create a file associated with the socket whereas binding to 'ipc:///tmp/tester' will create the file /tmp/tester. See issue 567 for more information. * Added zmq_z85_encode and zmq_z85_decode to core libzmq API. * Added zmq_curve_keypair to core libzmq API. * Bumped library ABI version to 4:0:1. Bug fixes --------- * Fixed some build/test errors on OS/X + Clang++. * Fixed LIBZMQ-565, typo in code. * Fixed LIBZMQ-566, dealer-to-router connections sometimes failing. * Fixed builds for AIX, MSVC 2008, OS/X with clang++, Solaris. * Improved CURVE handshake error handling. 0MQ version 4.0.0 (RC1), released on 2013/09/20 =============================================== Major changes ------------- * New wire level protocol, ZMTP/3.0, see http://rfc.zeromq.org/spec:23. Does not yet implement the SUBSCRIBE, CANCEL, PING, and PONG commands. * New security framework, from plain user+password to strong encryption, see section below. See http://hintjens.com/blog:49 for a tutorial. * New ZMQ_STREAM socket type for working as a TCP client or server. See: tests/test_stream.cpp. Improvements ------------ * You can now connect to an inproc:// endpoint that does not already exist. This means inproc:// no longer needs careful set-up, but it may break code that relied on the old behaviour. See: tests/test_inproc_connect.cpp. * Libzmq now checks socket types at connection time, so that trying to connect a 'wrong' socket type will fail. * New zmq_ctx_shutdown API method will shutdown a context and send ETERM to blocking calls, without blocking. Use zmq_ctx_term to finalise the process. * The regression test suite has been significantly extended and improved. * Contexts can now be terminated in forked child processes. See: tests/test_fork.cpp. * zmq_disconnect now respects the linger setting on sockets. * New zmq_send_const API method to send constant data (without copying). See: tests/test_inproc_connect.cpp. * Added CMake support for static libraries. * Added test cases for socket semantics as defined in RFCs 28, 29, 30, 31. See: tests/test_spec_*.cpp. * New socket option, ZMQ_PROBE_ROUTER triggers an empty message on connect. See: tests/test_probe_router.cpp. * New socket option, ZMQ_REQ_CORRELATE allows for correlation of replies from a REP socket. See: tests/test_req_correlate.cpp. * New socket option, ZMQ_REQ_RELAXED, lets you disable the state machine on a REQ socket, so you can send multiple requests without waiting for replies, and without getting an EFSM error. See: tests/test_req_relaxed.cpp. * New socket option, ZMQ_CONFLATE restricts the outgoing and incoming socket buffers to a single message. See: tests/test_conflate.cpp. Deprecated Options ------------------ * ZMQ_IPV4ONLY deprecated and renamed to ZMQ_IPV6 so that options are consistently "off" by default. * ZMQ_DELAY_ATTACH_ON_CONNECT deprecated, and renamed to ZMQ_IMMEDIATE. See: tests/test_immediate.cpp. Security Framework ------------------ Based on new ZMTP wire level protocol that negotiates a security "mechanism" between client and server before exchanging any other data. Security mechanisms are extensible. ZMTP defines three by default: * NULL - classic ZeroMQ, with no authentication. See http://rfc.zeromq.org/spec:23. * PLAIN - plain-text username + password authentication. See http://rfc.zeromq.org/spec:24. * CURVE - secure authentication and encryption based on elliptic curve cryptography, using the Curve25519 algorithm from Daniel Bernstein and based on CurveCP's security handshake. See http://rfc.zeromq.org/spec:25, http://rfc.zeromq.org/spec:26, and http://curvecp.org. Authentication is done by pluggable "authenticators" that connect to libzmq over an inproc endpoint, see http://rfc.zeromq.org/spec:27. Socket options to configure PLAIN security on client or server: * ZMQ_PLAIN_SERVER, ZMQ_PLAIN_USERNAME, ZMQ_PLAIN_PASSWORD. See tests/test_security_plain. Socket options to configure CURVE security on client or server: * ZMQ_CURVE_SERVER, ZMQ_CURVE_PUBLICKEY, ZMQ_CURVE_SECRETKEY, ZMQ_CURVE_SERVERKEY. See tests/test_security_curve.cpp. Socket options to configure "domain" for ZAP handler: * ZMQ_ZAP_DOMAIN, see tests/test_security_null.cpp. Support for encoding/decoding CURVE binary keys to ASCII: * zmq_z85_encode, zmq_z85_decode. Other issues addressed in this release -------------------------------------- * LIBZMQ-525 Multipart upstreaming from XSUB to XPUB 0MQ version 3.2.4 stable, released on 2013/09/20 ================================================ * LIBZMQ-84 (Windows) Assertion failed: Address already in use at signaler.cpp:80 * LIBZMQ-456 ZMQ_XPUB_VERBOSE does not propagate in a tree of XPUB/XSUB devices * LIBZMQ-532 (Windows) critical section not released on error * LIBZMQ-569 Detect OpenPGM 5.2 system library * LIBZMQ-563 Subscribers sometimes stopped receiving messages (aka LIBZMQ-541) * LIBZMQ-XXX Added support for Travis Continuous Integration * LIBZMQ-XXX Several improvements to MSVC support 0MQ version 3.2.3 stable, released on 2013/05/02 ================================================ Issues addressed in this release -------------------------------- * LIBZMQ-526 Assertion failure "Invalid argument (tcp_connecter.cpp:285)" * LIBZMQ-446 Setting the DSCP bits by default causes CAP_NET_ADMIN error * LIBZMQ-496 Crash on heavy socket opening/closing: Device or resource busy (mutex.hpp:90) * LIBZMQ-462 test_connect_delay fails at test_connect_delay.cpp:80 * LIBZMQ-497 Messages getting dropped * LIBZMQ-488 signaler.cpp leaks the win32 Event Handle * LIBZMQ-476 zmq_disconnect has no effect for inproc sockets * LIBZMQ-475 zmq_disconnect does not sent unsubscribe messages 0MQ version 3.2.2 stable, released on 2012/11/23 ================================================ Issues addressed in this release -------------------------------- * LIBZMQ-384 No meta data for ZMQ_EVENT_DISCONNECTED monitor event * LIBZMQ-414 Error in ARM/Thumb2 assembly (atomic_ptr.hpp) * LIBZMQ-417 zmq_assert (!incomplete_in) in session_base.cpp 228 * LIBZMQ-447 socket_base_t::recv() packet loss and memory leak at high receiving rate * LIBZMQ-448 Builds fail on older versions of GCC * LIBZMQ-449 Builds fail on AIX * LIBZMQ-450 lt-test_monitor: fails with assertion at test_monitor.cpp:81 * LIBZMQ-451 ZMQ_ROUTER_MANDATORY blocks forever * LIBZMQ-452 test_connect_delay.cpp:175:12: error: 'sleep' was not declared in this scope * LIBZMQ-458 lt-test_router_mandatory fails with assertion at test_router_mandatory.cpp:53 * LIBZMQ-459 Assertion failed: encoder (stream_engine.cpp:266 * LIBZMQ-464 PUB socket with HWM set leaks memory * LIBZMQ-465 PUB/SUB results in 80-90% of CPU load * LIBZMQ-468 ZMQ_XPUB_VERBOSE & unsubscribe * LIBZMQ-472 Segfault in zmq_poll in REQ to ROUTER dialog 0MQ version 3.2.1 (RC2), released on 2012/10/15 =============================================== Issues addressed in this release -------------------------------- * Fixed issue xxx - handle insufficient resources on accept() properly. * Fixed issue 443 - added ZMQ_XPUB_VERBOSE setsocket option. * Fixed issue 433 - ZeroMQ died on receiving EPIPE * Fixed issue 423 - test_pair_tcp hangs * Fixed issue 416 - socket_base: fix 'va_list' has not been declared error * Fixed issue 409 - Pub-sub interoperability between 2.x and 3.x. * Fixed issue 404 - zmq_term can not safely be re-entered with pgm transport * Fixed issue 399 - zmq_ctx_set_monitor callback is not works properly * Fixed issue 393 - libzmq does not build on Android (socklen_t signed comparison) * Fixed issue 392 - Interaction with pyzmq on Android * Fixed issue 389 - Assertion failure in mtrie.cpp:317 * Fixed issue 388 - tests/test_monitor.cpp has no newline at EOF (causes compile error) * Fixed issue 387 - "sa_family_t sa_family;" in pgm_socket.cpp is unused variable * Fixed issue 385 - Rework ZMQ_FAIL_UNROUTABLE socket option to actually work * Fixed issue 382 - Current libzmq doesn't compile on Android NDK * Fixed issue 377 - ZeroMQ will not build on Windows with OpenPGM * Fixed issue 375 - error: unused variable 'sa_family' * Fixed issue 373 - Unable to build libzmq/zeromq3.x on AIX7 * Fixed issue 372 - Unable to build libzmq/zeromq3.x on HPUX 11iv3 * Fixed issue 371 - Unable to build libzmq/zeromq3.x on RHEL5/SLES10 * Fixed issue 329 - wsa_error_to_errno() calls abort() on WSAEACCES * Fixed issue 309 - Assertion failed: options.recv_identity (socket_base.cpp:864) * Fixed issue 211 - Assertion failed: msg_->flags & ZMQ_MSG_MORE (rep.cpp:81) API changes ----------- * zmq_device () deprecated and replaced by zmq_proxy (). * zmq_ctx_set_monitor () replaced by zmq_socket_monitor (). * ZMQ_ROUTER_BEHAVIOR/ZMQ_FAIL_UNROUTABLE renamed experimentally to ZMQ_ROUTER_MANDATORY. 0MQ version 3.2.0 (RC1), released on 2012/06/05 =============================================== Bug fixes --------- * Fixed issue 264 - Potential bug with linger, messages dropped during socket close. * Fixed issue 293 - libzmq doesn't follow the ZMTP/1.0 spec (did not set reserved bits to 0). * Fixed issue 303 - Assertion failure in pgm_sender.cpp:102. * Fixed issue 320 - Assertion failure in connect_session.cpp:96 when connecting epgm to an invalid endpoint. * Fixed issue 325 - Assertion failure in xrep.cpp:93, when two sockets connect using the same identity. * Fixed issue 327 - Assertion failure in mtrie.cpp:246, when unsubscribing from channel. * Fixed issue 346 - Assertion failure in signaler.cpp:155, when using a closed socket. * Fixed issue 328 - unsubscribe wrongly clears multiple subscriptions. * Fixed issue 330 - IPC listener does not remove unix domain stream file when terminated. * Fixed issue 334 - Memory leak in session_base.cpp:59. * Fixed issue 369 - ROUTER cannot close/reopen while DEALER connected. Operating systems ----------------- * Fixed issue 301 - HPUX 11iv2 - build fails, CLOCK_MONOTONIC undefined. * Fixed issue 324 - OS/X - build fails, ECANTROUTE undefined. * Fixed issue 368 - Solaris / Sun C++ - build fails, no insert method in multimap classes. * Fixed issue 366 - Windows - ports not freed after crash. * Fixed issue 355 - Windows - build fails, MSVC solution file is out of date. * Fixed issue 331 - FreeBSD 8 and 9 - getaddrinfo fails with EAI_BADFLAGS on AI_V4MAPPED flag. * Fixed issue xxx - Added support for WinCE. Performance ----------- * Fixed issue xxx - Implemented atomic operations for ARMv7a (runs 15-20% faster). API changes ----------- * Fixed issue 337 - Cleaned-up context API: zmq_ctx_new() - create new context (will deprecate zmq_init) zmq_ctx_destroy() - destroy context (will deprecate zmq_term) zmq_ctx_set() - set context property zmq_ctx_get() - get context property * Fixed issue xxx - Cleaned-up message API: zmq_msg_send() - send a message (will deprecate zmq_sendmsg) zmq_msg_recv() - receive a message (will deprecate zmq_recvmsg) zmq_msg_more() - indicate whether this is final part of message zmq_msg_get() - get message property zmq_msg_set() - set message property * Fixed issue xxx - Added context monitoring API: zmq_ctx_set_monitor() - configure monitor callback. * Fixed issue xxx - Added unbind/disconnect API: zmq_unbind() - unbind socket. zmq_disconnect() - disconnect socket. * Fixed issue xxx - Added ZMQ_TCP_ACCEPT_FILTER setsockopt() for listening TCP sockets. * Fixed issue 336 - Removed sys: transport. * Fixed issue 333 - Added zmq_device function back to API (was removed in 3.0). * Fixed issue 340 - Add support for MAX_SOCKETS to new context API. OMQ version 3.1.0 (beta), released on 2011/12/18 ================================================ General information ------------------- Based on community consensus, the 0MQ 3.1.x release reverts a number of features introduced in version 3.0. The major reason for these changes is improving backward compatibility with 0MQ 2.1.x. Development of the 0MQ 3.0.x series will be discontinued, and users are encouraged to upgrade to 3.1. The 0MQ 3.1.x releases use ABI version 3. Reverted functionality ---------------------- The following functionality present in 0MQ 3.0 has been reverted: * Wire format changes. The 0MQ 3.1 wire format is identical to that of 0MQ 2.1. * LABELs and COMMANDs have been removed. * Explicit identies are re-introduced, however they can be used only for explicit routing, not for durable sockets. * The ZMQ_ROUTER and ZMQ_DEALER socket types are once again aliases for ZMQ_XREQ and ZMQ_XREP. New functionality ----------------- * The zmq_getmsgopt() function has been introduced. * Experimental IPv6 support has been introduced. This is disabled by default, see the zmq_setsockopt() documentation for enabling it. Other changes ------------- * The default HWM for all socket types has been set to 1000. * Many bug fixes. Building -------- * The dependency on libuuid has been removed. * Support for building on Android, and with MSVC 10 has been added. 0MQ version 3.0.0 (alpha), released on 2011/07/12 ================================================= New functionality ----------------- * A zmq_ctx_set_monitor() API to register a callback / event sink for changes in socket state. * POSIX-compliant zmq_send and zmq_recv introduced (uses raw buffer instead of message object). * ZMQ_MULTICAST_HOPS socket option added. Sets the appropriate field in IP headers of PGM packets. * Subscription forwarding. Instead of filtering on consumer, the subscription is moved as far as possible towards the publisher and filtering is done there. * ZMQ_XPUB, ZMQ_XSUB introduced. Allow to create subscription- forwarding-friendly intermediate devices. * Add sockopt ZMQ_RCVTIMEO/ZMQ_SNDTIMEO. Allow to set timeout for blocking send/recv calls. * A new LABEL flag was added to the wire format. The flag distinguishes message parts used by 0MQ (labels) from user payload message parts. * There is a new wire format for the REQ/REP pattern. First, the empty bottom-of-the-stack message part is not needed any more, the LABEL flag is used instead. Secondly, peer IDs are 32-bit integers rather than 17-byte UUIDs. * The REQ socket now drops duplicate replies. * Outstanding requests & replies associated with a client are dropped when the clients dies. This is a performance optimisation. * Introduced ZMQ_ROUTER and ZMQ_DEALER sockets. These mimic the functionality of ZMQ_ROUTER and ZMQ_DEALER in 0MQ/2.1.x. Guarantees backward compatibility for exsiting code. * Removed dependency on OS socketpair buffer size. No more asserts in mailbox.cpp because of low system limit of sockepair buffer size. API improvements ---------------- * Obsolete constants ZMQ_UPSTREAM and ZMQ_DOWNSTREAM removed. Use ZMQ_PUSH and ZMQ_PULL instead. * Timeout in zmq_poll is in milliseconds instead of microseconds. This makes zmq_poll() compliant with POSIX poll() * ZMQ_MCAST_LOOP removed. There's no support for multicast over loopback any more. Use IPC or TCP isntead. * zmq_send/zmq_recv was renamed zmq_sendmsg/zmq_recvmsg. * ZMQ_RECOVERY_IVL and ZMQ_RECOVERY_IVL_MSEC reconciled. The new option is named ZMQ_RECOVERY_IVL and the unit is milliseconds. * Option types changed. Most of the numeric types are now represented as 'int'. * ZMQ_HWM split into ZMQ_SNDHWM and ZMQ_RCVHWM. This makes it possible to control message flow separately for each direction. * ZMQ_NOBLOCK renamed ZMQ_DONTWAIT. That makes it POSIX-compliant. Less is More ------------ * Pre-built devices and zmq_device() removed. Should be made available as a separate project(s). * ZMQ_SWAP removed. Writing data to disk should be done on top of 0MQ, on inside it. * C++ binding removed from the core. Now it's a separate project, same as any other binding. Bug fixes --------- * Many. Building -------- * Make pkg-config dependency conditional. Distribution ------------ * Removed Debian packaging, which is now available at packages.debian.org or via apt-get. Older versions ============== * See NEWS in ZeroMQ 2.1.x repository at http://github.com/zeromq/zeromq2-1. zeromq3-4.0.4+dfsg.orig/configure.ac0000644000175000017500000004002612240736636016234 0ustar ghedoghedo# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) # # The 0MQ version number is extracted from include/zmq.h using # the version.sh script. Hence, it should be updated there. # The version in git should reflect the *next* version planned. # AC_INIT([zeromq],[m4_esyscmd([./version.sh])],[zeromq-dev@lists.zeromq.org]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(config) AC_CONFIG_HEADERS([src/platform.hpp]) AM_INIT_AUTOMAKE(tar-ustar dist-zip foreign) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # This lets us use PACKAGE_VERSION in Makefiles AC_SUBST(PACKAGE_VERSION) # Libtool -version-info (ABI version) # # Don't change this unless you know exactly what you're doing and have read and # understand: # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # # Changes: # # ZeroMQ versions prior to 2.1.0 use 0:0:0 (undefined) # ZeroMQ versions 2.1.x: 1:0:0 (ABI version 1) # ZeroMQ version 3.0: 2:0:0 (ABI version 2) # ZeroMQ version 3.1: 3:0:0 (ABI version 3) # ZeroMQ version 4.0: 4:0:1 (ABI version 4) # # libzmq -version-info current:revision:age LTVER="4:0:1" AC_SUBST(LTVER) # Take a copy of original flags ZMQ_ORIG_CFLAGS="${CFLAGS:-none}" ZMQ_ORIG_CPPFLAGS="${CPPFLAGS:-none}" ZMQ_ORIG_CXXFLAGS="${CXXFLAGS:-none}" # Checks for programs. AC_PROG_CC AC_PROG_CC_C99 AC_PROG_CXX AM_PROG_CC_C_O AC_PROG_SED AC_PROG_AWK # Libtool configuration for different targets. See acinclude.m4 AC_ARG_VAR([XMLTO], [Path to xmlto command]) AC_PATH_PROG([XMLTO], [xmlto]) AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) AC_PATH_PROG([ASCIIDOC], [asciidoc]) LIBZMQ_CONFIG_LIBTOOL AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL # Check whether to build a with debug symbols LIBZMQ_CHECK_ENABLE_DEBUG # Check wheter to enable code coverage LIBZMQ_WITH_GCOV # Allow libsodium to be installed in a custom path: AC_ARG_WITH([libsodium], [AS_HELP_STRING([--with-libsodium], [Specify libsodium prefix])], [zmq_search_libsodium="yes"], []) if test "x$zmq_search_libsodium" = "xyes"; then if test -r "${with_libsodium}/include/sodium.h"; then CPPFLAGS="-I${with_libsodium}/include ${CPPFLAGS}" LDFLAGS="-L${with_libsodium}/lib ${LDFLAGS}" fi fi AC_ARG_WITH([libsodium-include-dir], [AS_HELP_STRING([--with-libsodium-include-dir], [Specify libsodium include prefix])], [zmq_search_libsodium_include="yes"], []) if test "x$zmq_search_libsodium_include" = "xyes"; then if test -r "${with_libsodium_include_dir}/sodium.h"; then CPPFLAGS="-I${with_libsodium_include_dir}/include ${CPPFLAGS}" fi fi AC_ARG_WITH([libsodium_lib_dir], [AS_HELP_STRING([--with-libsodium-lib-dir], [Specify libsodium library prefix])], [zmq_search_libsodium_lib="yes"], []) if test "x$zmq_search_libsodium_lib" = "xyes"; then if test -r "${with_libsodium_lib_dir}/libsodium.{a|so|dylib}"; then LDFLAGS="-L${with_libsodium}/lib ${LDFLAGS}" fi fi # Set pedantic libzmq_pedantic="yes" # By default compiling with -Werror except OSX. libzmq_werror="yes" # By default use DSO visibility libzmq_dso_visibility="yes" # Platform specific checks libzmq_on_mingw32="no" libzmq_on_android="no" libzmq_on_linux="no" # Set some default features required by 0MQ code. CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS" # For host type checks AC_CANONICAL_HOST # OS-specific tests case "${host_os}" in *linux*) # Define on Linux to enable all library features. Define if using a gnu compiler if test "x$GXX" = "xyes"; then CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" fi AC_DEFINE(ZMQ_HAVE_LINUX, 1, [Have Linux OS]) libzmq_on_linux="yes" case "${host_os}" in *android*) AC_DEFINE(ZMQ_HAVE_ANDROID, 1, [Have Android OS]) libzmq_on_android="yes" ;; esac ;; *solaris*) # Define on Solaris to enable all library features CPPFLAGS="-D_PTHREADS $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_SOLARIS, 1, [Have Solaris OS]) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyname) AC_MSG_CHECKING([whether atomic operations can be used]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include ]], [[uint32_t value; atomic_cas_32 (&value, 0, 0); return 0;]])], [solaris_has_atomic=yes], [solaris_has_atomic=no]) AC_MSG_RESULT([$solaris_has_atomic]) # Solaris 8 does not have atomic operations exported to user space. if test "x$solaris_has_atomic" = "xno"; then AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) fi # ssp library is required for libsodium on Solaris-like systems LDFLAGS="-lssp $LDFLAGS" CPPFLAGS="$CPPFLAGS -Wno-long-long" ;; *freebsd*) # Define on FreeBSD to enable all library features CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_FREEBSD, 1, [Have FreeBSD OS]) ;; *darwin*) # Define on Darwin to enable all library features CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS" libzmq_pedantic="no" libzmq_werror="no" AC_DEFINE(ZMQ_HAVE_OSX, 1, [Have DarwinOSX OS]) AC_LANG_PUSH([C++]) LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-uninitialized]) AC_LANG_POP([C++]) ;; *netbsd*) # Define on NetBSD to enable all library features CPPFLAGS="-D_NETBSD_SOURCE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_NETBSD, 1, [Have NetBSD OS]) # NetBSD 5.0 and newer provides atomic operations but we can # only use these on systems where PR #42842 has been fixed so # we must try and link a test program using C++. libzmq_netbsd_has_atomic=no AC_MSG_CHECKING([whether atomic operations can be used]) AC_LANG_PUSH([C++]) AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include ]], [[uint32_t value; atomic_cas_32 (&value, 0, 0); return 0;]])], [libzmq_netbsd_has_atomic=yes], [libzmq_netbsd_has_atomic=no]) AC_LANG_POP([C++]) AC_MSG_RESULT([$libzmq_netbsd_has_atomic]) if test "x$libzmq_netbsd_has_atomic" = "xno"; then AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) fi ;; *openbsd*) # Define on OpenBSD to enable all library features CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_OPENBSD, 1, [Have OpenBSD OS]) ;; *nto-qnx*) libzmq_pedantic="no" AC_DEFINE(ZMQ_HAVE_QNXNTO, 1, [Have QNX Neutrino OS]) AC_CHECK_LIB(socket, socket) ;; *aix*) AC_DEFINE(ZMQ_HAVE_AIX, 1, [Have AIX OS]) ;; *hpux*) # Define on HP-UX to enable all library features CPPFLAGS="-D_POSIX_C_SOURCE=200112L $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_HPUX, 1, [Have HPUX OS]) LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Ae]) AC_CHECK_FUNCS(gethrtime) ;; *mingw32*) AC_DEFINE(ZMQ_HAVE_WINDOWS, 1, [Have Windows OS]) AC_DEFINE(ZMQ_HAVE_MINGW32, 1, [Have MinGW32]) AC_CHECK_HEADERS(windows.h) AC_CHECK_LIB(ws2_32, main, , [AC_MSG_ERROR([cannot link with ws2_32.dll.])]) AC_CHECK_LIB(rpcrt4, main, , [AC_MSG_ERROR([cannot link with rpcrt4.dll.])]) AC_CHECK_LIB(iphlpapi, main, , [AC_MSG_ERROR([cannot link with iphlpapi.dll.])]) # mingw32 defines __int64_t as long long AC_LANG_PUSH([C++]) LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-long-long]) AC_LANG_POP([C++]) libzmq_on_mingw32="yes" libzmq_dso_visibility="no" if test "x$enable_static" = "xyes"; then AC_MSG_ERROR([Building static libraries is not supported under MinGW32]) fi ;; *cygwin*) # Define on Cygwin to enable all library features CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_CYGWIN, 1, [Have Cygwin]) if test "x$enable_static" = "xyes"; then AC_MSG_ERROR([Building static libraries is not supported under Cygwin]) fi ;; *) AC_MSG_ERROR([unsupported system: ${host_os}.]) ;; esac # Checks for libraries AC_CHECK_LIB([pthread], [pthread_create]) AC_CHECK_LIB([rt], [clock_gettime]) AC_CHECK_LIB([sodium], [sodium_init],,AC_MSG_WARN(libsodium is needed for CURVE security)) # # Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec # if test "x$libzmq_dso_visibility" = "xyes"; then AC_LANG_PUSH([C++]) LIBZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CXXFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}"]) AC_LANG_POP([C++]) fi # CPU-specific optimizations case "${host_cpu}" in *sparc*) AC_LANG_PUSH([C++]) LIBZMQ_CHECK_LANG_FLAG_PREPEND([-mcpu=v9]) AC_LANG_POP([C++]) ;; *) ;; esac # Check whether to build docs / install man pages LIBZMQ_CHECK_DOC_BUILD # Check polling system LIBZMQ_CHECK_POLLER([CPPFLAGS="${CPPFLAGS} -D${libzmq_cv_poller_flag}"], [AC_MSG_ERROR([Unable to continue without polling system])]) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(errno.h arpa/inet.h netinet/tcp.h netinet/in.h stddef.h \ stdlib.h string.h sys/socket.h sys/time.h time.h unistd.h limits.h) # Check if we have ifaddrs.h header file. AC_CHECK_HEADERS(ifaddrs.h, [AC_DEFINE(ZMQ_HAVE_IFADDRS, 1, [Have ifaddrs.h header.])]) # Check if we have sys/uio.h header file. AC_CHECK_HEADERS(sys/uio.h, [AC_DEFINE(ZMQ_HAVE_UIO, 1, [Have uio.h header.])]) # Force not to use eventfd AC_ARG_ENABLE([eventfd], [AS_HELP_STRING([--disable-eventfd], [disable eventfd [default=no]])], [zmq_disable_eventfd=yes], [zmq_disable_eventfd=no]) if test "x$zmq_disable_eventfd" != "xyes"; then # Check if we have eventfd.h header file. AC_CHECK_HEADERS(sys/eventfd.h, [AC_DEFINE(ZMQ_HAVE_EVENTFD, 1, [Have eventfd extension.])]) fi # Use c++ in subsequent tests AC_LANG_PUSH(C++) AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE # Checks for typedefs, structures, and compiler characteristics. if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then dnl 279: controlling expression is constant dnl Fixes build with ICC 12.x LIBZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SIZE_T]) LIBZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SSIZE_T]) else AC_TYPE_SIZE_T AC_TYPE_SSIZE_T fi AC_HEADER_TIME AC_TYPE_UINT32_T AC_C_VOLATILE # PGM extension libzmq_pgm_ext="no" pgm_basename="libpgm-5.2.122~dfsg" AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm], [build libzmq with PGM extension [default=no]])], [with_pgm_ext=$withval], [with_pgm_ext=no]) # build using system pgm AC_ARG_WITH([system-pgm], [AS_HELP_STRING([--with-system-pgm], [build libzmq with PGM extension. Requires pkg-config [default=no]])], [with_system_pgm_ext=yes], [with_system_pgm_ext=no]) if test "x$with_pgm_ext" != "xno" -a "x$with_system_pgm_ext" != "xno"; then AC_MSG_ERROR([--with-pgm and --with-system-pgm cannot be specified together]) fi if test "x$with_pgm_ext" != "xno"; then # This allows placing the tar.gz to foreign/openpgm # and using ./configure --with-pgm=libpgm-x.y.z if test "x$with_pgm_ext" != "xyes"; then pgm_basename="$with_pgm_ext" fi # Unpack libpgm AC_MSG_NOTICE([Unpacking ${pgm_basename}.tar.gz]) libzmq_pwd=`pwd` cd foreign/openpgm if ! (gzip -dc "${pgm_basename}.tar.gz" || echo "failed") | ${am__untar}; then AC_MSG_ERROR([cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file]) fi cd "${libzmq_pwd}" if test -d foreign/openpgm/build-staging; then rm -rf foreign/openpgm/build-staging fi mv foreign/openpgm/${pgm_basename} foreign/openpgm/build-staging pgm_srcdir=foreign/openpgm/build-staging/openpgm/pgm if ! test -d foreign/openpgm/build-staging/openpgm/pgm/config; then mkdir foreign/openpgm/build-staging/openpgm/pgm/config fi # DSO symbol visibility for openpgm AC_LANG_PUSH([C]) LIBZMQ_CHECK_LANG_VISIBILITY([ac_configure_args="CFLAGS='$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag' ${ac_configure_args}"]) AC_LANG_POP([C]) pgm_subdir=build-staging/openpgm/pgm AC_SUBST(pgm_subdir) AC_SUBST(pgm_srcdir) AC_CONFIG_SUBDIRS([foreign/openpgm/build-staging/openpgm/pgm/]) # Success! AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension]) libzmq_pgm_ext="yes" fi # Build with system openpgm if test "x$with_system_pgm_ext" != "xno"; then m4_ifdef([PKG_CHECK_MODULES], [ have_pgm_system_library="no" PKG_CHECK_MODULES([OpenPGM], [openpgm-5.2 >= 5.2], [ have_pgm_system_library="yes" ], [PKG_CHECK_MODULES([OpenPGM], [openpgm-5.1 >= 5.1], [ have_pgm_system_library="yes" ]) ] ) if test "x$have_pgm_system_library" = "xyes"; then AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension]) LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS" LIBS="$OpenPGM_LIBS $LIBS" fi ], [AC_MSG_ERROR([--with-system-pgm requires a working pkg-config installation])]) fi AC_SUBST(pgm_basename) # Set -Wall, -Werror and -pedantic AC_LANG_PUSH([C++]) # Check how to enable -Wall LIBZMQ_LANG_WALL([CPPFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag $CPPFLAGS"]) if test "x$libzmq_werror" = "xyes" -a "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" != "xyes"; then LIBZMQ_LANG_WERROR([CPPFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag $CPPFLAGS"]) fi if test "x$libzmq_pedantic" = "xyes"; then LIBZMQ_LANG_STRICT([CPPFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag $CPPFLAGS"]) fi AC_LANG_POP([C++]) AM_CONDITIONAL(BUILD_PGM, test "x$libzmq_pgm_ext" = "xyes") AM_CONDITIONAL(ON_MINGW, test "x$libzmq_on_mingw32" = "xyes") AM_CONDITIONAL(ON_ANDROID, test "x$libzmq_on_android" = "xyes") AM_CONDITIONAL(ON_LINUX, test "x$libzmq_on_linux" = "xyes") # Checks for library functions. AC_TYPE_SIGNAL AC_CHECK_FUNCS(perror gettimeofday clock_gettime memset socket getifaddrs freeifaddrs fork) AC_CHECK_HEADERS([alloca.h]) LIBZMQ_CHECK_SOCK_CLOEXEC([AC_DEFINE( [ZMQ_HAVE_SOCK_CLOEXEC], [1], [Whether SOCK_CLOEXEC is defined and functioning.]) ]) # TCP keep-alives Checks. LIBZMQ_CHECK_SO_KEEPALIVE([AC_DEFINE( [ZMQ_HAVE_SO_KEEPALIVE], [1], [Whether SO_KEEPALIVE is supported.]) ]) LIBZMQ_CHECK_TCP_KEEPCNT([AC_DEFINE( [ZMQ_HAVE_TCP_KEEPCNT], [1], [Whether TCP_KEEPCNT is supported.]) ]) LIBZMQ_CHECK_TCP_KEEPIDLE([AC_DEFINE( [ZMQ_HAVE_TCP_KEEPIDLE], [1], [Whether TCP_KEEPIDLE is supported.]) ]) LIBZMQ_CHECK_TCP_KEEPINTVL([AC_DEFINE( [ZMQ_HAVE_TCP_KEEPINTVL], [1], [Whether TCP_KEEPINTVL is supported.]) ]) LIBZMQ_CHECK_TCP_KEEPALIVE([AC_DEFINE( [ZMQ_HAVE_TCP_KEEPALIVE], [1], [Whether TCP_KEEPALIVE is supported.]) ]) # Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS AC_SUBST(LIBZMQ_EXTRA_CFLAGS) AC_SUBST(LIBZMQ_EXTRA_CXXFLAGS) AC_SUBST(LIBZMQ_EXTRA_LDFLAGS) AC_CONFIG_FILES([Makefile \ src/Makefile \ src/libzmq.pc \ doc/Makefile \ perf/Makefile \ tests/Makefile \ tools/Makefile \ builds/msvc/Makefile \ foreign/openpgm/Makefile \ builds/redhat/zeromq.spec]) AC_OUTPUT zeromq3-4.0.4+dfsg.orig/MAINTAINERS0000644000175000017500000000235312240736636015444 0ustar ghedoghedoComponent: Atomic Operations Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Lock-free Algorithms Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: TCP transport Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: IPC transport Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: PGM transport Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: In-process transport Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: I/O Threads Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Application Threads and Differnet Socket Types Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Multiplexing (zmq_poll) Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Generic Infrastructure (context, mailbox, command, pipe) Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Documentation Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Autotools build system Maintainer: Mikko Koppanen Contact: mikko.koppanen@gmail.com Component: MSVC build system Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Performance tests Maintainer: Martin Sustrik Contact: sustrik@250bpm.com zeromq3-4.0.4+dfsg.orig/COPYING.LESSER0000644000175000017500000002047012240736636015776 0ustar ghedoghedo GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. -------------------------------------------------------------------------------- SPECIAL EXCEPTION GRANTED BY COPYRIGHT HOLDERS As a special exception, copyright holders give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you must extend this exception to your version of the library. Note: this exception relieves you of any obligations under sections 4 and 5 of this license, and section 6 of the GNU General Public License. zeromq3-4.0.4+dfsg.orig/src/0000755000175000017500000000000012307431377014531 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/src/mailbox.cpp0000644000175000017500000000445012240736636016675 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "mailbox.hpp" #include "err.hpp" zmq::mailbox_t::mailbox_t () { // Get the pipe into passive state. That way, if the users starts by // polling on the associated file descriptor it will get woken up when // new command is posted. bool ok = cpipe.read (NULL); zmq_assert (!ok); active = false; } zmq::mailbox_t::~mailbox_t () { // TODO: Retrieve and deallocate commands inside the cpipe. // Work around problem that other threads might still be in our // send() method, by waiting on the mutex before disappearing. sync.lock (); sync.unlock (); } zmq::fd_t zmq::mailbox_t::get_fd () { return signaler.get_fd (); } void zmq::mailbox_t::send (const command_t &cmd_) { sync.lock (); cpipe.write (cmd_, false); bool ok = cpipe.flush (); sync.unlock (); if (!ok) signaler.send (); } int zmq::mailbox_t::recv (command_t *cmd_, int timeout_) { // Try to get the command straight away. if (active) { bool ok = cpipe.read (cmd_); if (ok) return 0; // If there are no more commands available, switch into passive state. active = false; signaler.recv (); } // Wait for signal from the command sender. int rc = signaler.wait (timeout_); if (rc != 0 && (errno == EAGAIN || errno == EINTR)) return -1; // We've got the signal. Now we can switch into active state. active = true; // Get a command. errno_assert (rc == 0); bool ok = cpipe.read (cmd_); zmq_assert (ok); return 0; } zeromq3-4.0.4+dfsg.orig/src/raw_decoder.cpp0000644000175000017500000000317212240736636017520 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "raw_decoder.hpp" #include "err.hpp" zmq::raw_decoder_t::raw_decoder_t (size_t bufsize_) : bufsize (bufsize_) { int rc = in_progress.init (); errno_assert (rc == 0); buffer = (unsigned char *) malloc (bufsize); alloc_assert (buffer); } zmq::raw_decoder_t::~raw_decoder_t () { int rc = in_progress.close (); errno_assert (rc == 0); free (buffer); } void zmq::raw_decoder_t::get_buffer (unsigned char **data_, size_t *size_) { *data_ = buffer; *size_ = bufsize; } int zmq::raw_decoder_t::decode (const uint8_t *data_, size_t size_, size_t &bytes_used_) { int rc = in_progress.init_size (size_); errno_assert (rc != -1); memcpy (in_progress.data (), data_, size_); bytes_used_ = size_; return 1; } zeromq3-4.0.4+dfsg.orig/src/plain_mechanism.hpp0000644000175000017500000000503112240736636020372 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PLAIN_MECHANISM_HPP_INCLUDED__ #define __ZMQ_PLAIN_MECHANISM_HPP_INCLUDED__ #include "mechanism.hpp" #include "options.hpp" namespace zmq { class msg_t; class session_base_t; class plain_mechanism_t : public mechanism_t { public: plain_mechanism_t (session_base_t *session_, const std::string &peer_address_, const options_t &options_); virtual ~plain_mechanism_t (); // mechanism implementation virtual int next_handshake_command (msg_t *msg_); virtual int process_handshake_command (msg_t *msg_); virtual int zap_msg_available (); virtual bool is_handshake_complete () const; private: enum state_t { sending_hello, waiting_for_hello, sending_welcome, waiting_for_welcome, sending_initiate, waiting_for_initiate, sending_ready, waiting_for_ready, waiting_for_zap_reply, ready }; session_base_t * const session; const std::string peer_address; // True iff we are awaiting reply from ZAP reply. bool expecting_zap_reply; state_t state; int produce_hello (msg_t *msg_) const; int produce_welcome (msg_t *msg_) const; int produce_initiate (msg_t *msg_) const; int produce_ready (msg_t *msg_) const; int process_hello (msg_t *msg_); int process_welcome (msg_t *msg); int process_ready (msg_t *msg_); int process_initiate (msg_t *msg_); void send_zap_request (const std::string &username, const std::string &password); int receive_and_process_zap_reply (); }; } #endif zeromq3-4.0.4+dfsg.orig/src/dist.hpp0000644000175000017500000000624412240736636016215 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_DIST_HPP_INCLUDED__ #define __ZMQ_DIST_HPP_INCLUDED__ #include #include "array.hpp" #include "pipe.hpp" namespace zmq { class pipe_t; class msg_t; // Class manages a set of outbound pipes. It sends each messages to // each of them. class dist_t { public: dist_t (); ~dist_t (); // Adds the pipe to the distributor object. void attach (zmq::pipe_t *pipe_); // Activates pipe that have previously reached high watermark. void activated (zmq::pipe_t *pipe_); // Mark the pipe as matching. Subsequent call to send_to_matching // will send message also to this pipe. void match (zmq::pipe_t *pipe_); // Mark all pipes as non-matching. void unmatch (); // Removes the pipe from the distributor object. void pipe_terminated (zmq::pipe_t *pipe_); // Send the message to the matching outbound pipes. int send_to_matching (zmq::msg_t *msg_); // Send the message to all the outbound pipes. int send_to_all (zmq::msg_t *msg_); bool has_out (); private: // Write the message to the pipe. Make the pipe inactive if writing // fails. In such a case false is returned. bool write (zmq::pipe_t *pipe_, zmq::msg_t *msg_); // Put the message to all active pipes. void distribute (zmq::msg_t *msg_); // List of outbound pipes. typedef array_t pipes_t; pipes_t pipes; // Number of all the pipes to send the next message to. pipes_t::size_type matching; // Number of active pipes. All the active pipes are located at the // beginning of the pipes array. These are the pipes the messages // can be sent to at the moment. pipes_t::size_type active; // Number of pipes eligible for sending messages to. This includes all // the active pipes plus all the pipes that we can in theory send // messages to (the HWM is not yet reached), but sending a message // to them would result in partial message being delivered, ie. message // with initial parts missing. pipes_t::size_type eligible; // True if last we are in the middle of a multipart message. bool more; dist_t (const dist_t&); const dist_t &operator = (const dist_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/poll.hpp0000644000175000017500000000515312240736636016216 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_POLL_HPP_INCLUDED__ #define __ZMQ_POLL_HPP_INCLUDED__ // poller.hpp decides which polling mechanism to use. #include "poller.hpp" #if defined ZMQ_USE_POLL #include #include #include #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { struct i_poll_events; // Implements socket polling mechanism using the POSIX.1-2001 // poll() system call. class poll_t : public poller_base_t { public: typedef fd_t handle_t; poll_t (); ~poll_t (); // "poller" concept. handle_t add_fd (fd_t fd_, zmq::i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); static int max_fds (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); struct fd_entry_t { fd_t index; zmq::i_poll_events *events; }; // This table stores data for registered descriptors. typedef std::vector fd_table_t; fd_table_t fd_table; // Pollset to pass to the poll function. typedef std::vector pollset_t; pollset_t pollset; // If true, there's at least one retired event source. bool retired; // If true, thread is in the process of shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; poll_t (const poll_t&); const poll_t &operator = (const poll_t&); }; typedef poll_t poller_t; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/mechanism.cpp0000644000175000017500000001157212240736636017211 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "mechanism.hpp" #include "options.hpp" #include "msg.hpp" #include "err.hpp" #include "wire.hpp" zmq::mechanism_t::mechanism_t (const options_t &options_) : options (options_) { } zmq::mechanism_t::~mechanism_t () { } void zmq::mechanism_t::set_peer_identity (const void *id_ptr, size_t id_size) { identity = blob_t (static_cast (id_ptr), id_size); } void zmq::mechanism_t::peer_identity (msg_t *msg_) { const int rc = msg_->init_size (identity.size ()); errno_assert (rc == 0); memcpy (msg_->data (), identity.data (), identity.size ()); msg_->set_flags (msg_t::identity); } const char *zmq::mechanism_t::socket_type_string (int socket_type) const { static const char *names [] = {"PAIR", "PUB", "SUB", "REQ", "REP", "DEALER", "ROUTER", "PULL", "PUSH", "XPUB", "XSUB", "STREAM"}; zmq_assert (socket_type >= 0 && socket_type <= 10); return names [socket_type]; } size_t zmq::mechanism_t::add_property (unsigned char *ptr, const char *name, const void *value, size_t value_len) const { const size_t name_len = strlen (name); zmq_assert (name_len <= 255); *ptr++ = static_cast (name_len); memcpy (ptr, name, name_len); ptr += name_len; zmq_assert (value_len <= 0x7FFFFFFF); put_uint32 (ptr, static_cast (value_len)); ptr += 4; memcpy (ptr, value, value_len); return 1 + name_len + 4 + value_len; } int zmq::mechanism_t::parse_metadata (const unsigned char *ptr_, size_t length_) { size_t bytes_left = length_; while (bytes_left > 1) { const size_t name_length = static_cast (*ptr_); ptr_ += 1; bytes_left -= 1; if (bytes_left < name_length) break; const std::string name = std::string ((char *) ptr_, name_length); ptr_ += name_length; bytes_left -= name_length; if (bytes_left < 4) break; const size_t value_length = static_cast (get_uint32 (ptr_)); ptr_ += 4; bytes_left -= 4; if (bytes_left < value_length) break; const uint8_t *value = ptr_; ptr_ += value_length; bytes_left -= value_length; if (name == "Identity" && options.recv_identity) set_peer_identity (value, value_length); else if (name == "Socket-Type") { const std::string socket_type ((char *) value, value_length); if (!check_socket_type (socket_type)) { errno = EINVAL; return -1; } } else { const int rc = property (name, value, value_length); if (rc == -1) return -1; } } if (bytes_left > 0) { errno = EPROTO; return -1; } return 0; } int zmq::mechanism_t::property (const std::string name_, const void *value_, size_t length_) { // Default implementation does not check // property values and returns 0 to signal success. return 0; } bool zmq::mechanism_t::check_socket_type (const std::string type_) const { switch (options.type) { case ZMQ_REQ: return type_ == "REP" || type_ == "ROUTER"; case ZMQ_REP: return type_ == "REQ" || type_ == "DEALER"; case ZMQ_DEALER: return type_ == "REP" || type_ == "DEALER" || type_ == "ROUTER"; case ZMQ_ROUTER: return type_ == "REQ" || type_ == "DEALER" || type_ == "ROUTER"; case ZMQ_PUSH: return type_ == "PULL"; case ZMQ_PULL: return type_ == "PUSH"; case ZMQ_PUB: return type_ == "SUB" || type_ == "XSUB"; case ZMQ_SUB: return type_ == "PUB" || type_ == "XPUB"; case ZMQ_XPUB: return type_ == "SUB" || type_ == "XSUB"; case ZMQ_XSUB: return type_ == "PUB" || type_ == "XPUB"; case ZMQ_PAIR: return type_ == "PAIR"; default: break; } return false; } zeromq3-4.0.4+dfsg.orig/src/own.cpp0000644000175000017500000001212512240736636016043 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "own.hpp" #include "err.hpp" #include "io_thread.hpp" zmq::own_t::own_t (class ctx_t *parent_, uint32_t tid_) : object_t (parent_, tid_), terminating (false), sent_seqnum (0), processed_seqnum (0), owner (NULL), term_acks (0) { } zmq::own_t::own_t (io_thread_t *io_thread_, const options_t &options_) : object_t (io_thread_), options (options_), terminating (false), sent_seqnum (0), processed_seqnum (0), owner (NULL), term_acks (0) { } zmq::own_t::~own_t () { } void zmq::own_t::set_owner (own_t *owner_) { zmq_assert (!owner); owner = owner_; } void zmq::own_t::inc_seqnum () { // This function may be called from a different thread! sent_seqnum.add (1); } void zmq::own_t::process_seqnum () { // Catch up with counter of processed commands. processed_seqnum++; // We may have catched up and still have pending terms acks. check_term_acks (); } void zmq::own_t::launch_child (own_t *object_) { // Specify the owner of the object. object_->set_owner (this); // Plug the object into the I/O thread. send_plug (object_); // Take ownership of the object. send_own (this, object_); } void zmq::own_t::term_child (own_t *object_) { process_term_req (object_); } void zmq::own_t::process_term_req (own_t *object_) { // When shutting down we can ignore termination requests from owned // objects. The termination request was already sent to the object. if (terminating) return; // If I/O object is well and alive let's ask it to terminate. owned_t::iterator it = std::find (owned.begin (), owned.end (), object_); // If not found, we assume that termination request was already sent to // the object so we can safely ignore the request. if (it == owned.end ()) return; owned.erase (it); register_term_acks (1); // Note that this object is the root of the (partial shutdown) thus, its // value of linger is used, rather than the value stored by the children. send_term (object_, options.linger); } void zmq::own_t::process_own (own_t *object_) { // If the object is already being shut down, new owned objects are // immediately asked to terminate. Note that linger is set to zero. if (terminating) { register_term_acks (1); send_term (object_, 0); return; } // Store the reference to the owned object. owned.insert (object_); } void zmq::own_t::terminate () { // If termination is already underway, there's no point // in starting it anew. if (terminating) return; // As for the root of the ownership tree, there's noone to terminate it, // so it has to terminate itself. if (!owner) { process_term (options.linger); return; } // If I am an owned object, I'll ask my owner to terminate me. send_term_req (owner, this); } bool zmq::own_t::is_terminating () { return terminating; } void zmq::own_t::process_term (int linger_) { // Double termination should never happen. zmq_assert (!terminating); // Send termination request to all owned objects. for (owned_t::iterator it = owned.begin (); it != owned.end (); ++it) send_term (*it, linger_); register_term_acks ((int) owned.size ()); owned.clear (); // Start termination process and check whether by chance we cannot // terminate immediately. terminating = true; check_term_acks (); } void zmq::own_t::register_term_acks (int count_) { term_acks += count_; } void zmq::own_t::unregister_term_ack () { zmq_assert (term_acks > 0); term_acks--; // This may be a last ack we are waiting for before termination... check_term_acks (); } void zmq::own_t::process_term_ack () { unregister_term_ack (); } void zmq::own_t::check_term_acks () { if (terminating && processed_seqnum == sent_seqnum.get () && term_acks == 0) { // Sanity check. There should be no active children at this point. zmq_assert (owned.empty ()); // The root object has nobody to confirm the termination to. // Other nodes will confirm the termination to the owner. if (owner) send_term_ack (owner); // Deallocate the resources. process_destroy (); } } void zmq::own_t::process_destroy () { delete this; } zeromq3-4.0.4+dfsg.orig/src/poller.hpp0000644000175000017500000000417512240736636016550 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_POLLER_HPP_INCLUDED__ #define __ZMQ_POLLER_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_FORCE_SELECT #define ZMQ_USE_SELECT #include "select.hpp" #elif defined ZMQ_FORCE_POLL #define ZMQ_USE_POLL #include "poll.hpp" #elif defined ZMQ_FORCE_EPOLL #define ZMQ_USE_EPOLL #include "epoll.hpp" #elif defined ZMQ_FORCE_DEVPOLL #define ZMQ_USE_DEVPOLL #include "devpoll.hpp" #elif defined ZMQ_FORCE_KQUEUE #define ZMQ_USE_KQUEUE #include "kqueue.hpp" #elif defined ZMQ_HAVE_LINUX #define ZMQ_USE_EPOLL #include "epoll.hpp" #elif defined ZMQ_HAVE_WINDOWS #define ZMQ_USE_SELECT #include "select.hpp" #elif defined ZMQ_HAVE_FREEBSD #define ZMQ_USE_KQUEUE #include "kqueue.hpp" #elif defined ZMQ_HAVE_OPENBSD #define ZMQ_USE_KQUEUE #include "kqueue.hpp" #elif defined ZMQ_HAVE_NETBSD #define ZMQ_USE_KQUEUE #include "kqueue.hpp" #elif defined ZMQ_HAVE_SOLARIS #define ZMQ_USE_DEVPOLL #include "devpoll.hpp" #elif defined ZMQ_HAVE_OSX #define ZMQ_USE_KQUEUE #include "kqueue.hpp" #elif defined ZMQ_HAVE_QNXNTO #define ZMQ_USE_POLL #include "poll.hpp" #elif defined ZMQ_HAVE_AIX #define ZMQ_USE_POLL #include "poll.hpp" #elif defined ZMQ_HAVE_HPUX #define ZMQ_USE_DEVPOLL #include "devpoll.hpp" #elif defined ZMQ_HAVE_OPENVMS #define ZMQ_USE_SELECT #include "select.hpp" #elif defined ZMQ_HAVE_CYGWIN #define ZMQ_USE_SELECT #include "select.hpp" #else #error Unsupported platform #endif #endif zeromq3-4.0.4+dfsg.orig/src/array.hpp0000644000175000017500000000754212240736636016372 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ARRAY_INCLUDED__ #define __ZMQ_ARRAY_INCLUDED__ #include #include namespace zmq { // Base class for objects stored in the array. If you want to store // same object in mutliple arrays, each of those arrays has to have // different ID. The item itself has to be derived from instantiations of // array_item_t template for all relevant IDs. template class array_item_t { public: inline array_item_t () : array_index (-1) { } // The destructor doesn't have to be virtual. It is mad virtual // just to keep ICC and code checking tools from complaining. inline virtual ~array_item_t () { } inline void set_array_index (int index_) { array_index = index_; } inline int get_array_index () { return array_index; } private: int array_index; array_item_t (const array_item_t&); const array_item_t &operator = (const array_item_t&); }; // Fast array implementation with O(1) access to item, insertion and // removal. Array stores pointers rather than objects. The objects have // to be derived from array_item_t class. template class array_t { private: typedef array_item_t item_t; public: typedef typename std::vector ::size_type size_type; inline array_t () { } inline ~array_t () { } inline size_type size () { return items.size (); } inline bool empty () { return items.empty (); } inline T *&operator [] (size_type index_) { return items [index_]; } inline void push_back (T *item_) { if (item_) ((item_t*) item_)->set_array_index ((int) items.size ()); items.push_back (item_); } inline void erase (T *item_) { erase (((item_t*) item_)->get_array_index ()); } inline void erase (size_type index_) { if (items.back ()) ((item_t*) items.back ())->set_array_index ((int) index_); items [index_] = items.back (); items.pop_back (); } inline void swap (size_type index1_, size_type index2_) { if (items [index1_]) ((item_t*) items [index1_])->set_array_index ((int) index2_); if (items [index2_]) ((item_t*) items [index2_])->set_array_index ((int) index1_); std::swap (items [index1_], items [index2_]); } inline void clear () { items.clear (); } inline size_type index (T *item_) { return (size_type) ((item_t*) item_)->get_array_index (); } private: typedef std::vector items_t; items_t items; array_t (const array_t&); const array_t &operator = (const array_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/atomic_ptr.hpp0000644000175000017500000001376612240736636017422 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ATOMIC_PTR_HPP_INCLUDED__ #define __ZMQ_ATOMIC_PTR_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_FORCE_MUTEXES #define ZMQ_ATOMIC_PTR_MUTEX #elif (defined __i386__ || defined __x86_64__) && defined __GNUC__ #define ZMQ_ATOMIC_PTR_X86 #elif defined __ARM_ARCH_7A__ && defined __GNUC__ #define ZMQ_ATOMIC_PTR_ARM #elif defined __tile__ #define ZMQ_ATOMIC_PTR_TILE #elif defined ZMQ_HAVE_WINDOWS #define ZMQ_ATOMIC_PTR_WINDOWS #elif (defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_NETBSD) #define ZMQ_ATOMIC_PTR_ATOMIC_H #else #define ZMQ_ATOMIC_PTR_MUTEX #endif #if defined ZMQ_ATOMIC_PTR_MUTEX #include "mutex.hpp" #elif defined ZMQ_ATOMIC_PTR_WINDOWS #include "windows.hpp" #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H #include #elif defined ZMQ_ATOMIC_PTR_TILE #include #endif namespace zmq { // This class encapsulates several atomic operations on pointers. template class atomic_ptr_t { public: // Initialise atomic pointer inline atomic_ptr_t () { ptr = NULL; } // Destroy atomic pointer inline ~atomic_ptr_t () { } // Set value of atomic pointer in a non-threadsafe way // Use this function only when you are sure that at most one // thread is accessing the pointer at the moment. inline void set (T *ptr_) { this->ptr = ptr_; } // Perform atomic 'exchange pointers' operation. Pointer is set // to the 'val' value. Old value is returned. inline T *xchg (T *val_) { #if defined ZMQ_ATOMIC_PTR_WINDOWS return (T*) InterlockedExchangePointer ((PVOID*) &ptr, val_); #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H return (T*) atomic_swap_ptr (&ptr, val_); #elif defined ZMQ_ATOMIC_PTR_TILE return (T*) arch_atomic_exchange (&ptr, val_); #elif defined ZMQ_ATOMIC_PTR_X86 T *old; __asm__ volatile ( "lock; xchg %0, %2" : "=r" (old), "=m" (ptr) : "m" (ptr), "0" (val_)); return old; #elif defined ZMQ_ATOMIC_PTR_ARM T* old; unsigned int flag; __asm__ volatile ( " dmb sy\n\t" "1: ldrex %1, [%3]\n\t" " strex %0, %4, [%3]\n\t" " teq %0, #0\n\t" " bne 1b\n\t" " dmb sy\n\t" : "=&r"(flag), "=&r"(old), "+Qo"(ptr) : "r"(&ptr), "r"(val_) : "cc"); return old; #elif defined ZMQ_ATOMIC_PTR_MUTEX sync.lock (); T *old = (T*) ptr; ptr = val_; sync.unlock (); return old; #else #error atomic_ptr is not implemented for this platform #endif } // Perform atomic 'compare and swap' operation on the pointer. // The pointer is compared to 'cmp' argument and if they are // equal, its value is set to 'val'. Old value of the pointer // is returned. inline T *cas (T *cmp_, T *val_) { #if defined ZMQ_ATOMIC_PTR_WINDOWS return (T*) InterlockedCompareExchangePointer ( (volatile PVOID*) &ptr, val_, cmp_); #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H return (T*) atomic_cas_ptr (&ptr, cmp_, val_); #elif defined ZMQ_ATOMIC_PTR_TILE return (T*) arch_atomic_val_compare_and_exchange (&ptr, cmp_, val_); #elif defined ZMQ_ATOMIC_PTR_X86 T *old; __asm__ volatile ( "lock; cmpxchg %2, %3" : "=a" (old), "=m" (ptr) : "r" (val_), "m" (ptr), "0" (cmp_) : "cc"); return old; #elif defined ZMQ_ATOMIC_PTR_ARM T *old; unsigned int flag; __asm__ volatile ( " dmb sy\n\t" "1: ldrex %1, [%3]\n\t" " mov %0, #0\n\t" " teq %1, %4\n\t" " it eq\n\t" " strexeq %0, %5, [%3]\n\t" " teq %0, #0\n\t" " bne 1b\n\t" " dmb sy\n\t" : "=&r"(flag), "=&r"(old), "+Qo"(ptr) : "r"(&ptr), "r"(cmp_), "r"(val_) : "cc"); return old; #elif defined ZMQ_ATOMIC_PTR_MUTEX sync.lock (); T *old = (T*) ptr; if (ptr == cmp_) ptr = val_; sync.unlock (); return old; #else #error atomic_ptr is not implemented for this platform #endif } private: volatile T *ptr; #if defined ZMQ_ATOMIC_PTR_MUTEX mutex_t sync; #endif atomic_ptr_t (const atomic_ptr_t&); const atomic_ptr_t &operator = (const atomic_ptr_t&); }; } // Remove macros local to this file. #if defined ZMQ_ATOMIC_PTR_WINDOWS #undef ZMQ_ATOMIC_PTR_WINDOWS #endif #if defined ZMQ_ATOMIC_PTR_ATOMIC_H #undef ZMQ_ATOMIC_PTR_ATOMIC_H #endif #if defined ZMQ_ATOMIC_PTR_X86 #undef ZMQ_ATOMIC_PTR_X86 #endif #if defined ZMQ_ATOMIC_PTR_ARM #undef ZMQ_ATOMIC_PTR_ARM #endif #if defined ZMQ_ATOMIC_PTR_MUTEX #undef ZMQ_ATOMIC_PTR_MUTEX #endif #endif zeromq3-4.0.4+dfsg.orig/src/config.hpp0000644000175000017500000000667012240736636016522 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_CONFIG_HPP_INCLUDED__ #define __ZMQ_CONFIG_HPP_INCLUDED__ namespace zmq { // Compile-time settings. enum { // Number of new messages in message pipe needed to trigger new memory // allocation. Setting this parameter to 256 decreases the impact of // memory allocation by approximately 99.6% message_pipe_granularity = 256, // Commands in pipe per allocation event. command_pipe_granularity = 16, // Determines how often does socket poll for new commands when it // still has unprocessed messages to handle. Thus, if it is set to 100, // socket will process 100 inbound messages before doing the poll. // If there are no unprocessed messages available, poll is done // immediately. Decreasing the value trades overall latency for more // real-time behaviour (less latency peaks). inbound_poll_rate = 100, // Maximal batching size for engines with receiving functionality. // So, if there are 10 messages that fit into the batch size, all of // them may be read by a single 'recv' system call, thus avoiding // unnecessary network stack traversals. in_batch_size = 8192, // Maximal batching size for engines with sending functionality. // So, if there are 10 messages that fit into the batch size, all of // them may be written by a single 'send' system call, thus avoiding // unnecessary network stack traversals. out_batch_size = 8192, // Maximal delta between high and low watermark. max_wm_delta = 1024, // Maximum number of events the I/O thread can process in one go. max_io_events = 256, // Maximal delay to process command in API thread (in CPU ticks). // 3,000,000 ticks equals to 1 - 2 milliseconds on current CPUs. // Note that delay is only applied when there is continuous stream of // messages to process. If not so, commands are processed immediately. max_command_delay = 3000000, // Low-precision clock precision in CPU ticks. 1ms. Value of 1000000 // should be OK for CPU frequencies above 1GHz. If should work // reasonably well for CPU frequencies above 500MHz. For lower CPU // frequencies you may consider lowering this value to get best // possible latencies. clock_precision = 1000000, // Maximum transport data unit size for PGM (TPDU). pgm_max_tpdu = 1500, // On some OSes the signaler has to be emulated using a TCP // connection. In such cases following port is used. signaler_port = 5905 }; } #endif zeromq3-4.0.4+dfsg.orig/src/router.cpp0000644000175000017500000002660112240736636016564 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "router.hpp" #include "pipe.hpp" #include "wire.hpp" #include "random.hpp" #include "likely.hpp" #include "err.hpp" zmq::router_t::router_t (class ctx_t *parent_, uint32_t tid_, int sid_) : socket_base_t (parent_, tid_, sid_), prefetched (false), identity_sent (false), more_in (false), current_out (NULL), more_out (false), next_peer_id (generate_random ()), mandatory (false), // raw_sock functionality in ROUTER is deprecated raw_sock (false), probe_router (false) { options.type = ZMQ_ROUTER; options.recv_identity = true; options.raw_sock = false; prefetched_id.init (); prefetched_msg.init (); } zmq::router_t::~router_t () { zmq_assert (anonymous_pipes.empty ());; zmq_assert (outpipes.empty ()); prefetched_id.close (); prefetched_msg.close (); } void zmq::router_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { // subscribe_to_all_ is unused (void)subscribe_to_all_; zmq_assert (pipe_); if (probe_router) { msg_t probe_msg_; int rc = probe_msg_.init (); errno_assert (rc == 0); rc = pipe_->write (&probe_msg_); // zmq_assert (rc) is not applicable here, since it is not a bug. pipe_->flush (); rc = probe_msg_.close (); errno_assert (rc == 0); } bool identity_ok = identify_peer (pipe_); if (identity_ok) fq.attach (pipe_); else anonymous_pipes.insert (pipe_); } int zmq::router_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { bool is_int = (optvallen_ == sizeof (int)); int value = is_int? *((int *) optval_): 0; switch (option_) { case ZMQ_ROUTER_RAW: if (is_int && value >= 0) { raw_sock = (value != 0); if (raw_sock) { options.recv_identity = false; options.raw_sock = true; } return 0; } break; case ZMQ_ROUTER_MANDATORY: if (is_int && value >= 0) { mandatory = (value != 0); return 0; } break; case ZMQ_PROBE_ROUTER: if (is_int && value >= 0) { probe_router = (value != 0); return 0; } break; default: break; } errno = EINVAL; return -1; } void zmq::router_t::xpipe_terminated (pipe_t *pipe_) { std::set ::iterator it = anonymous_pipes.find (pipe_); if (it != anonymous_pipes.end ()) anonymous_pipes.erase (it); else { outpipes_t::iterator it = outpipes.find (pipe_->get_identity ()); zmq_assert (it != outpipes.end ()); outpipes.erase (it); fq.pipe_terminated (pipe_); if (pipe_ == current_out) current_out = NULL; } } void zmq::router_t::xread_activated (pipe_t *pipe_) { std::set ::iterator it = anonymous_pipes.find (pipe_); if (it == anonymous_pipes.end ()) fq.activated (pipe_); else { bool identity_ok = identify_peer (pipe_); if (identity_ok) { anonymous_pipes.erase (it); fq.attach (pipe_); } } } void zmq::router_t::xwrite_activated (pipe_t *pipe_) { outpipes_t::iterator it; for (it = outpipes.begin (); it != outpipes.end (); ++it) if (it->second.pipe == pipe_) break; zmq_assert (it != outpipes.end ()); zmq_assert (!it->second.active); it->second.active = true; } int zmq::router_t::xsend (msg_t *msg_) { // If this is the first part of the message it's the ID of the // peer to send the message to. if (!more_out) { zmq_assert (!current_out); // If we have malformed message (prefix with no subsequent message) // then just silently ignore it. // TODO: The connections should be killed instead. if (msg_->flags () & msg_t::more) { more_out = true; // Find the pipe associated with the identity stored in the prefix. // If there's no such pipe just silently ignore the message, unless // router_mandatory is set. blob_t identity ((unsigned char*) msg_->data (), msg_->size ()); outpipes_t::iterator it = outpipes.find (identity); if (it != outpipes.end ()) { current_out = it->second.pipe; if (!current_out->check_write ()) { it->second.active = false; current_out = NULL; if (mandatory) { more_out = false; errno = EAGAIN; return -1; } } } else if (mandatory) { more_out = false; errno = EHOSTUNREACH; return -1; } } int rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); return 0; } // Ignore the MORE flag for raw-sock or assert? if (options.raw_sock) msg_->reset_flags (msg_t::more); // Check whether this is the last part of the message. more_out = msg_->flags () & msg_t::more ? true : false; // Push the message into the pipe. If there's no out pipe, just drop it. if (current_out) { // Close the remote connection if user has asked to do so // by sending zero length message. // Pending messages in the pipe will be dropped (on receiving term- ack) if (raw_sock && msg_->size() == 0) { current_out->terminate (false); int rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); current_out = NULL; return 0; } bool ok = current_out->write (msg_); if (unlikely (!ok)) current_out = NULL; else if (!more_out) { current_out->flush (); current_out = NULL; } } else { int rc = msg_->close (); errno_assert (rc == 0); } // Detach the message from the data buffer. int rc = msg_->init (); errno_assert (rc == 0); return 0; } int zmq::router_t::xrecv (msg_t *msg_) { if (prefetched) { if (!identity_sent) { int rc = msg_->move (prefetched_id); errno_assert (rc == 0); identity_sent = true; } else { int rc = msg_->move (prefetched_msg); errno_assert (rc == 0); prefetched = false; } more_in = msg_->flags () & msg_t::more ? true : false; return 0; } pipe_t *pipe = NULL; int rc = fq.recvpipe (msg_, &pipe); // It's possible that we receive peer's identity. That happens // after reconnection. The current implementation assumes that // the peer always uses the same identity. while (rc == 0 && msg_->is_identity ()) rc = fq.recvpipe (msg_, &pipe); if (rc != 0) return -1; zmq_assert (pipe != NULL); // If we are in the middle of reading a message, just return the next part. if (more_in) more_in = msg_->flags () & msg_t::more ? true : false; else { // We are at the beginning of a message. // Keep the message part we have in the prefetch buffer // and return the ID of the peer instead. rc = prefetched_msg.move (*msg_); errno_assert (rc == 0); prefetched = true; blob_t identity = pipe->get_identity (); rc = msg_->init_size (identity.size ()); errno_assert (rc == 0); memcpy (msg_->data (), identity.data (), identity.size ()); msg_->set_flags (msg_t::more); identity_sent = true; } return 0; } int zmq::router_t::rollback (void) { if (current_out) { current_out->rollback (); current_out = NULL; more_out = false; } return 0; } bool zmq::router_t::xhas_in () { // If we are in the middle of reading the messages, there are // definitely more parts available. if (more_in) return true; // We may already have a message pre-fetched. if (prefetched) return true; // Try to read the next message. // The message, if read, is kept in the pre-fetch buffer. pipe_t *pipe = NULL; int rc = fq.recvpipe (&prefetched_msg, &pipe); // It's possible that we receive peer's identity. That happens // after reconnection. The current implementation assumes that // the peer always uses the same identity. // TODO: handle the situation when the peer changes its identity. while (rc == 0 && prefetched_msg.is_identity ()) rc = fq.recvpipe (&prefetched_msg, &pipe); if (rc != 0) return false; zmq_assert (pipe != NULL); blob_t identity = pipe->get_identity (); rc = prefetched_id.init_size (identity.size ()); errno_assert (rc == 0); memcpy (prefetched_id.data (), identity.data (), identity.size ()); prefetched_id.set_flags (msg_t::more); prefetched = true; identity_sent = false; return true; } bool zmq::router_t::xhas_out () { // In theory, ROUTER socket is always ready for writing. Whether actual // attempt to write succeeds depends on whitch pipe the message is going // to be routed to. return true; } bool zmq::router_t::identify_peer (pipe_t *pipe_) { msg_t msg; blob_t identity; bool ok; if (options.raw_sock) { // Always assign identity for raw-socket unsigned char buf [5]; buf [0] = 0; put_uint32 (buf + 1, next_peer_id++); identity = blob_t (buf, sizeof buf); } else { msg.init (); ok = pipe_->read (&msg); if (!ok) return false; if (msg.size () == 0) { // Fall back on the auto-generation unsigned char buf [5]; buf [0] = 0; put_uint32 (buf + 1, next_peer_id++); identity = blob_t (buf, sizeof buf); msg.close (); } else { identity = blob_t ((unsigned char*) msg.data (), msg.size ()); outpipes_t::iterator it = outpipes.find (identity); msg.close (); // Ignore peers with duplicate ID. if (it != outpipes.end ()) return false; } } pipe_->set_identity (identity); // Add the record into output pipes lookup table outpipe_t outpipe = {pipe_, true}; ok = outpipes.insert (outpipes_t::value_type (identity, outpipe)).second; zmq_assert (ok); return true; } zeromq3-4.0.4+dfsg.orig/src/io_object.hpp0000644000175000017500000000437712240736636017214 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_IO_OBJECT_HPP_INCLUDED__ #define __ZMQ_IO_OBJECT_HPP_INCLUDED__ #include #include "stdint.hpp" #include "poller.hpp" #include "i_poll_events.hpp" namespace zmq { class io_thread_t; // Simple base class for objects that live in I/O threads. // It makes communication with the poller object easier and // makes defining unneeded event handlers unnecessary. class io_object_t : public i_poll_events { public: io_object_t (zmq::io_thread_t *io_thread_ = NULL); ~io_object_t (); // When migrating an object from one I/O thread to another, first // unplug it, then migrate it, then plug it to the new thread. void plug (zmq::io_thread_t *io_thread_); void unplug (); protected: typedef poller_t::handle_t handle_t; // Methods to access underlying poller object. handle_t add_fd (fd_t fd_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void add_timer (int timout_, int id_); void cancel_timer (int id_); // i_poll_events interface implementation. void in_event (); void out_event (); void timer_event (int id_); private: poller_t *poller; io_object_t (const io_object_t&); const io_object_t &operator = (const io_object_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/push.cpp0000644000175000017500000000273712240736636016227 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "push.hpp" #include "pipe.hpp" #include "err.hpp" #include "msg.hpp" zmq::push_t::push_t (class ctx_t *parent_, uint32_t tid_, int sid_) : socket_base_t (parent_, tid_, sid_) { options.type = ZMQ_PUSH; } zmq::push_t::~push_t () { } void zmq::push_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { // subscribe_to_all_ is unused (void)subscribe_to_all_; zmq_assert (pipe_); lb.attach (pipe_); } void zmq::push_t::xwrite_activated (pipe_t *pipe_) { lb.activated (pipe_); } void zmq::push_t::xpipe_terminated (pipe_t *pipe_) { lb.pipe_terminated (pipe_); } int zmq::push_t::xsend (msg_t *msg_) { return lb.send (msg_); } bool zmq::push_t::xhas_out () { return lb.has_out (); } zeromq3-4.0.4+dfsg.orig/src/pub.cpp0000644000175000017500000000217212240736636016027 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "pub.hpp" #include "msg.hpp" zmq::pub_t::pub_t (class ctx_t *parent_, uint32_t tid_, int sid_) : xpub_t (parent_, tid_, sid_) { options.type = ZMQ_PUB; } zmq::pub_t::~pub_t () { } int zmq::pub_t::xrecv (class msg_t *) { // Messages cannot be received from PUB socket. errno = ENOTSUP; return -1; } bool zmq::pub_t::xhas_in () { return false; } zeromq3-4.0.4+dfsg.orig/src/dist.cpp0000755000175000017500000001201012240736636016177 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "dist.hpp" #include "pipe.hpp" #include "err.hpp" #include "msg.hpp" #include "likely.hpp" zmq::dist_t::dist_t () : matching (0), active (0), eligible (0), more (false) { } zmq::dist_t::~dist_t () { zmq_assert (pipes.empty ()); } void zmq::dist_t::attach (pipe_t *pipe_) { // If we are in the middle of sending a message, we'll add new pipe // into the list of eligible pipes. Otherwise we add it to the list // of active pipes. if (more) { pipes.push_back (pipe_); pipes.swap (eligible, pipes.size () - 1); eligible++; } else { pipes.push_back (pipe_); pipes.swap (active, pipes.size () - 1); active++; eligible++; } } void zmq::dist_t::match (pipe_t *pipe_) { // If pipe is already matching do nothing. if (pipes.index (pipe_) < matching) return; // If the pipe isn't eligible, ignore it. if (pipes.index (pipe_) >= eligible) return; // Mark the pipe as matching. pipes.swap (pipes.index (pipe_), matching); matching++; } void zmq::dist_t::unmatch () { matching = 0; } void zmq::dist_t::pipe_terminated (pipe_t *pipe_) { // Remove the pipe from the list; adjust number of matching, active and/or // eligible pipes accordingly. if (pipes.index (pipe_) < matching) { pipes.swap (pipes.index (pipe_), matching - 1); matching--; } if (pipes.index (pipe_) < active) { pipes.swap (pipes.index (pipe_), active - 1); active--; } if (pipes.index (pipe_) < eligible) { pipes.swap (pipes.index (pipe_), eligible - 1); eligible--; } pipes.erase (pipe_); } void zmq::dist_t::activated (pipe_t *pipe_) { // Move the pipe from passive to eligible state. pipes.swap (pipes.index (pipe_), eligible); eligible++; // If there's no message being sent at the moment, move it to // the active state. if (!more) { pipes.swap (eligible - 1, active); active++; } } int zmq::dist_t::send_to_all (msg_t *msg_) { matching = active; return send_to_matching (msg_); } int zmq::dist_t::send_to_matching (msg_t *msg_) { // Is this end of a multipart message? bool msg_more = msg_->flags () & msg_t::more ? true : false; // Push the message to matching pipes. distribute (msg_); // If mutlipart message is fully sent, activate all the eligible pipes. if (!msg_more) active = eligible; more = msg_more; return 0; } void zmq::dist_t::distribute (msg_t *msg_) { // If there are no matching pipes available, simply drop the message. if (matching == 0) { int rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); return; } if (msg_->is_vsm ()) { for (pipes_t::size_type i = 0; i < matching; ++i) if(!write (pipes [i], msg_)) --i; // Retry last write because index will have been swapped int rc = msg_->close(); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); return; } // Add matching-1 references to the message. We already hold one reference, // that's why -1. msg_->add_refs ((int) matching - 1); // Push copy of the message to each matching pipe. int failed = 0; for (pipes_t::size_type i = 0; i < matching; ++i) if (!write (pipes [i], msg_)) { ++failed; --i; // Retry last write because index will have been swapped } if (unlikely (failed)) msg_->rm_refs (failed); // Detach the original message from the data buffer. Note that we don't // close the message. That's because we've already used all the references. int rc = msg_->init (); errno_assert (rc == 0); } bool zmq::dist_t::has_out () { return true; } bool zmq::dist_t::write (pipe_t *pipe_, msg_t *msg_) { if (!pipe_->write (msg_)) { pipes.swap (pipes.index (pipe_), matching - 1); matching--; pipes.swap (pipes.index (pipe_), active - 1); active--; pipes.swap (active, eligible - 1); eligible--; return false; } if (!(msg_->flags () & msg_t::more)) pipe_->flush (); return true; } zeromq3-4.0.4+dfsg.orig/src/stream_engine.hpp0000644000175000017500000001300112307426216020051 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_STREAM_ENGINE_HPP_INCLUDED__ #define __ZMQ_STREAM_ENGINE_HPP_INCLUDED__ #include #include "fd.hpp" #include "i_engine.hpp" #include "io_object.hpp" #include "i_encoder.hpp" #include "i_decoder.hpp" #include "options.hpp" #include "socket_base.hpp" #include "../include/zmq.h" namespace zmq { // Protocol revisions enum { ZMTP_1_0 = 0, ZMTP_2_0 = 1 }; class io_thread_t; class msg_t; class session_base_t; class mechanism_t; // This engine handles any socket with SOCK_STREAM semantics, // e.g. TCP socket or an UNIX domain socket. class stream_engine_t : public io_object_t, public i_engine { public: stream_engine_t (fd_t fd_, const options_t &options_, const std::string &endpoint); ~stream_engine_t (); // i_engine interface implementation. void plug (zmq::io_thread_t *io_thread_, zmq::session_base_t *session_); void terminate (); void restart_input (); void restart_output (); void zap_msg_available (); // i_poll_events interface implementation. void in_event (); void out_event (); private: // Unplug the engine from the session. void unplug (); // Function to handle network disconnections. void error (); // Receives the greeting message from the peer. int receive_greeting (); // Detects the protocol used by the peer. bool handshake (); // Writes data to the socket. Returns the number of bytes actually // written (even zero is to be considered to be a success). In case // of error or orderly shutdown by the other peer -1 is returned. int write (const void *data_, size_t size_); // Reads data from the socket (up to 'size' bytes). // Returns the number of bytes actually read or -1 on error. // Zero indicates the peer has closed the connection. int read (void *data_, size_t size_); int read_identity (msg_t *msg_); int write_identity (msg_t *msg_); int next_handshake_command (msg_t *msg); int process_handshake_command (msg_t *msg); int pull_msg_from_session (msg_t *msg_); int push_msg_to_session (msg_t *msg); int pull_and_encode (msg_t *msg_); int decode_and_push (msg_t *msg_); int push_one_then_decode_and_push (msg_t *msg_); void mechanism_ready (); int write_subscription_msg (msg_t *msg_); size_t add_property (unsigned char *ptr, const char *name, const void *value, size_t value_len); // Underlying socket. fd_t s; // True iff this is server's engine. bool as_server; msg_t tx_msg; handle_t handle; unsigned char *inpos; size_t insize; i_decoder *decoder; unsigned char *outpos; size_t outsize; i_encoder *encoder; // When true, we are still trying to determine whether // the peer is using versioned protocol, and if so, which // version. When false, normal message flow has started. bool handshaking; static const size_t signature_size = 10; // Size of ZMTP/1.0 and ZMTP/2.0 greeting message static const size_t v2_greeting_size = 12; // Size of ZMTP/3.0 greeting message static const size_t v3_greeting_size = 64; // Expected greeting size. size_t greeting_size; // Greeting received from, and sent to peer unsigned char greeting_recv [v3_greeting_size]; unsigned char greeting_send [v3_greeting_size]; // Size of greeting received so far unsigned int greeting_bytes_read; // The session this engine is attached to. zmq::session_base_t *session; options_t options; // String representation of endpoint std::string endpoint; bool plugged; int (stream_engine_t::*read_msg) (msg_t *msg_); int (stream_engine_t::*write_msg) (msg_t *msg_); bool io_error; // Indicates whether the engine is to inject a phantom // subscription message into the incoming stream. // Needed to support old peers. bool subscription_required; mechanism_t *mechanism; // True iff the engine couldn't consume the last decoded message. bool input_stopped; // True iff the engine doesn't have any message to encode. bool output_stopped; // Socket zmq::socket_base_t *socket; std::string peer_address; stream_engine_t (const stream_engine_t&); const stream_engine_t &operator = (const stream_engine_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/devpoll.hpp0000644000175000017500000000521512240736636016714 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_DEVPOLL_HPP_INCLUDED__ #define __ZMQ_DEVPOLL_HPP_INCLUDED__ // poller.hpp decides which polling mechanism to use. #include "poller.hpp" #if defined ZMQ_USE_DEVPOLL #include #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { struct i_poll_events; // Implements socket polling mechanism using the "/dev/poll" interface. class devpoll_t : public poller_base_t { public: typedef fd_t handle_t; devpoll_t (); ~devpoll_t (); // "poller" concept. handle_t add_fd (fd_t fd_, zmq::i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); static int max_fds (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); // File descriptor referring to "/dev/poll" pseudo-device. fd_t devpoll_fd; struct fd_entry_t { short events; zmq::i_poll_events *reactor; bool valid; bool accepted; }; typedef std::vector fd_table_t; fd_table_t fd_table; typedef std::vector pending_list_t; pending_list_t pending_list; // Pollset manipulation function. void devpoll_ctl (fd_t fd_, short events_); // If true, thread is in the process of shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; devpoll_t (const devpoll_t&); const devpoll_t &operator = (const devpoll_t&); }; typedef devpoll_t poller_t; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/socket_base.hpp0000644000175000017500000002066412240736636017536 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SOCKET_BASE_HPP_INCLUDED__ #define __ZMQ_SOCKET_BASE_HPP_INCLUDED__ #include #include #include #include "own.hpp" #include "array.hpp" #include "stdint.hpp" #include "poller.hpp" #include "atomic_counter.hpp" #include "i_poll_events.hpp" #include "mailbox.hpp" #include "stdint.hpp" #include "clock.hpp" #include "pipe.hpp" extern "C" { void zmq_free_event (void *data, void *hint); } namespace zmq { class ctx_t; class msg_t; class pipe_t; class socket_base_t : public own_t, public array_item_t <>, public i_poll_events, public i_pipe_events { friend class reaper_t; public: // Returns false if object is not a socket. bool check_tag (); // Create a socket of a specified type. static socket_base_t *create (int type_, zmq::ctx_t *parent_, uint32_t tid_, int sid_); // Returns the mailbox associated with this socket. mailbox_t *get_mailbox (); // Interrupt blocking call if the socket is stuck in one. // This function can be called from a different thread! void stop (); // Interface for communication with the API layer. int setsockopt (int option_, const void *optval_, size_t optvallen_); int getsockopt (int option_, void *optval_, size_t *optvallen_); int bind (const char *addr_); int connect (const char *addr_); int term_endpoint (const char *addr_); int send (zmq::msg_t *msg_, int flags_); int recv (zmq::msg_t *msg_, int flags_); int close (); // These functions are used by the polling mechanism to determine // which events are to be reported from this socket. bool has_in (); bool has_out (); // Using this function reaper thread ask the socket to regiter with // its poller. void start_reaping (poller_t *poller_); // i_poll_events implementation. This interface is used when socket // is handled by the poller in the reaper thread. void in_event (); void out_event (); void timer_event (int id_); // i_pipe_events interface implementation. void read_activated (pipe_t *pipe_); void write_activated (pipe_t *pipe_); void hiccuped (pipe_t *pipe_); void pipe_terminated (pipe_t *pipe_); void lock(); void unlock(); int monitor (const char *endpoint_, int events_); void event_connected (std::string &addr_, int fd_); void event_connect_delayed (std::string &addr_, int err_); void event_connect_retried (std::string &addr_, int interval_); void event_listening (std::string &addr_, int fd_); void event_bind_failed (std::string &addr_, int err_); void event_accepted (std::string &addr_, int fd_); void event_accept_failed (std::string &addr_, int err_); void event_closed (std::string &addr_, int fd_); void event_close_failed (std::string &addr_, int fd_); void event_disconnected (std::string &addr_, int fd_); protected: socket_base_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_); virtual ~socket_base_t (); // Concrete algorithms for the x- methods are to be defined by // individual socket types. virtual void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_ = false) = 0; // The default implementation assumes there are no specific socket // options for the particular socket type. If not so, overload this // method. virtual int xsetsockopt (int option_, const void *optval_, size_t optvallen_); // The default implementation assumes that send is not supported. virtual bool xhas_out (); virtual int xsend (zmq::msg_t *msg_); // The default implementation assumes that recv in not supported. virtual bool xhas_in (); virtual int xrecv (zmq::msg_t *msg_); // i_pipe_events will be forwarded to these functions. virtual void xread_activated (pipe_t *pipe_); virtual void xwrite_activated (pipe_t *pipe_); virtual void xhiccuped (pipe_t *pipe_); virtual void xpipe_terminated (pipe_t *pipe_) = 0; // Delay actual destruction of the socket. void process_destroy (); // Socket event data dispath void monitor_event (zmq_event_t data_, const std::string& addr_); // Monitor socket cleanup void stop_monitor (); private: // Creates new endpoint ID and adds the endpoint to the map. void add_endpoint (const char *addr_, own_t *endpoint_, pipe_t *pipe); // Map of open endpoints. typedef std::pair endpoint_pipe_t; typedef std::multimap endpoints_t; endpoints_t endpoints; // Map of open inproc endpoints. typedef std::multimap inprocs_t; inprocs_t inprocs; // To be called after processing commands or invoking any command // handlers explicitly. If required, it will deallocate the socket. void check_destroy (); // Moves the flags from the message to local variables, // to be later retrieved by getsockopt. void extract_flags (msg_t *msg_); // Used to check whether the object is a socket. uint32_t tag; // If true, associated context was already terminated. bool ctx_terminated; // If true, object should have been already destroyed. However, // destruction is delayed while we unwind the stack to the point // where it doesn't intersect the object being destroyed. bool destroyed; // Parse URI string. int parse_uri (const char *uri_, std::string &protocol_, std::string &address_); // Check whether transport protocol, as specified in connect or // bind, is available and compatible with the socket type. int check_protocol (const std::string &protocol_); // Register the pipe with this socket. void attach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_ = false); // Processes commands sent to this socket (if any). If timeout is -1, // returns only after at least one command was processed. // If throttle argument is true, commands are processed at most once // in a predefined time period. int process_commands (int timeout_, bool throttle_); // Handlers for incoming commands. void process_stop (); void process_bind (zmq::pipe_t *pipe_); void process_term (int linger_); // Socket's mailbox object. mailbox_t mailbox; // List of attached pipes. typedef array_t pipes_t; pipes_t pipes; // Reaper's poller and handle of this socket within it. poller_t *poller; poller_t::handle_t handle; // Timestamp of when commands were processed the last time. uint64_t last_tsc; // Number of messages received since last command processing. int ticks; // True if the last message received had MORE flag set. bool rcvmore; // Improves efficiency of time measurement. clock_t clock; // Monitor socket; void *monitor_socket; // Bitmask of events being monitored int monitor_events; // Last socket endpoint resolved URI std::string last_endpoint; socket_base_t (const socket_base_t&); const socket_base_t &operator = (const socket_base_t&); mutex_t sync; }; } #endif zeromq3-4.0.4+dfsg.orig/src/stream.hpp0000644000175000017500000000527212240736636016545 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_STREAM_HPP_INCLUDED__ #define __ZMQ_STREAM_HPP_INCLUDED__ #include #include "router.hpp" namespace zmq { class ctx_t; class pipe_t; class stream_t : public socket_base_t { public: stream_t (zmq::ctx_t *parent_, uint32_t tid_, int sid); ~stream_t (); // Overloads of functions from socket_base_t. void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_); int xsend (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_); bool xhas_in (); bool xhas_out (); void xread_activated (zmq::pipe_t *pipe_); void xwrite_activated (zmq::pipe_t *pipe_); void xpipe_terminated (zmq::pipe_t *pipe_); private: // Generate peer's id and update lookup map void identify_peer (pipe_t *pipe_); // Fair queueing object for inbound pipes. fq_t fq; // True iff there is a message held in the pre-fetch buffer. bool prefetched; // If true, the receiver got the message part with // the peer's identity. bool identity_sent; // Holds the prefetched identity. msg_t prefetched_id; // Holds the prefetched message. msg_t prefetched_msg; struct outpipe_t { zmq::pipe_t *pipe; bool active; }; // Outbound pipes indexed by the peer IDs. typedef std::map outpipes_t; outpipes_t outpipes; // The pipe we are currently writing to. zmq::pipe_t *current_out; // If true, more outgoing message parts are expected. bool more_out; // Peer ID are generated. It's a simple increment and wrap-over // algorithm. This value is the next ID to use (if not used already). uint32_t next_peer_id; stream_t (const stream_t&); const stream_t &operator = (const stream_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/encoder.hpp0000644000175000017500000001304312307426216016656 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ENCODER_HPP_INCLUDED__ #define __ZMQ_ENCODER_HPP_INCLUDED__ #if defined(_MSC_VER) #ifndef NOMINMAX #define NOMINMAX #endif #endif #include #include #include #include #include "err.hpp" #include "msg.hpp" #include "i_encoder.hpp" namespace zmq { // Helper base class for encoders. It implements the state machine that // fills the outgoing buffer. Derived classes should implement individual // state machine actions. template class encoder_base_t : public i_encoder { public: inline encoder_base_t (size_t bufsize_) : bufsize (bufsize_), in_progress (NULL) { buf = (unsigned char*) malloc (bufsize_); alloc_assert (buf); } // The destructor doesn't have to be virtual. It is made virtual // just to keep ICC and code checking tools from complaining. inline virtual ~encoder_base_t () { free (buf); } // The function returns a batch of binary data. The data // are filled to a supplied buffer. If no buffer is supplied (data_ // points to NULL) decoder object will provide buffer of its own. inline size_t encode (unsigned char **data_, size_t size_) { unsigned char *buffer = !*data_ ? buf : *data_; size_t buffersize = !*data_ ? bufsize : size_; if (in_progress == NULL) return 0; size_t pos = 0; while (pos < buffersize) { // If there are no more data to return, run the state machine. // If there are still no data, return what we already have // in the buffer. if (!to_write) { if (new_msg_flag) { int rc = in_progress->close (); errno_assert (rc == 0); rc = in_progress->init (); errno_assert (rc == 0); in_progress = NULL; break; } (static_cast (this)->*next) (); } // If there are no data in the buffer yet and we are able to // fill whole buffer in a single go, let's use zero-copy. // There's no disadvantage to it as we cannot stuck multiple // messages into the buffer anyway. Note that subsequent // write(s) are non-blocking, thus each single write writes // at most SO_SNDBUF bytes at once not depending on how large // is the chunk returned from here. // As a consequence, large messages being sent won't block // other engines running in the same I/O thread for excessive // amounts of time. if (!pos && !*data_ && to_write >= buffersize) { *data_ = write_pos; pos = to_write; write_pos = NULL; to_write = 0; return pos; } // Copy data to the buffer. If the buffer is full, return. size_t to_copy = std::min (to_write, buffersize - pos); memcpy (buffer + pos, write_pos, to_copy); pos += to_copy; write_pos += to_copy; to_write -= to_copy; } *data_ = buffer; return pos; } void load_msg (msg_t *msg_) { zmq_assert (in_progress == NULL); in_progress = msg_; (static_cast (this)->*next) (); } protected: // Prototype of state machine action. typedef void (T::*step_t) (); // This function should be called from derived class to write the data // to the buffer and schedule next state machine action. inline void next_step (void *write_pos_, size_t to_write_, step_t next_, bool new_msg_flag_) { write_pos = (unsigned char*) write_pos_; to_write = to_write_; next = next_; new_msg_flag = new_msg_flag_; } private: // Where to get the data to write from. unsigned char *write_pos; // How much data to write before next step should be executed. size_t to_write; // Next step. If set to NULL, it means that associated data stream // is dead. step_t next; bool new_msg_flag; // The buffer for encoded data. size_t bufsize; unsigned char *buf; encoder_base_t (const encoder_base_t&); void operator = (const encoder_base_t&); protected: msg_t *in_progress; }; } #endif zeromq3-4.0.4+dfsg.orig/src/sub.hpp0000644000175000017500000000251312240736636016036 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SUB_HPP_INCLUDED__ #define __ZMQ_SUB_HPP_INCLUDED__ #include "xsub.hpp" namespace zmq { class ctx_t; class msg_t; class io_thread_t; class socket_base_t; class sub_t : public xsub_t { public: sub_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_); ~sub_t (); protected: int xsetsockopt (int option_, const void *optval_, size_t optvallen_); int xsend (zmq::msg_t *msg_); bool xhas_out (); private: sub_t (const sub_t&); const sub_t &operator = (const sub_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/raw_decoder.hpp0000644000175000017500000000321212240736636017520 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_RAW_DECODER_HPP_INCLUDED__ #define __ZMQ_RAW_DECODER_HPP_INCLUDED__ #include "err.hpp" #include "msg.hpp" #include "i_decoder.hpp" #include "stdint.hpp" namespace zmq { // Decoder for 0MQ v1 framing protocol. Converts data stream into messages. class raw_decoder_t : public i_decoder { public: raw_decoder_t (size_t bufsize_); virtual ~raw_decoder_t (); // i_decoder interface. virtual void get_buffer (unsigned char **data_, size_t *size_); virtual int decode (const unsigned char *data_, size_t size_, size_t &processed); virtual msg_t *msg () { return &in_progress; } private: msg_t in_progress; const int64_t bufsize; unsigned char *buffer; raw_decoder_t (const raw_decoder_t&); void operator = (const raw_decoder_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/tcp.cpp0000755000175000017500000001065212307426216016026 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "ip.hpp" #include "tcp.hpp" #include "err.hpp" #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #include #endif #if defined ZMQ_HAVE_OPENVMS #include #endif void zmq::tune_tcp_socket (fd_t s_) { // Disable Nagle's algorithm. We are doing data batching on 0MQ level, // so using Nagle wouldn't improve throughput in anyway, but it would // hurt latency. int nodelay = 1; int rc = setsockopt (s_, IPPROTO_TCP, TCP_NODELAY, (char*) &nodelay, sizeof (int)); #ifdef ZMQ_HAVE_WINDOWS wsa_assert (rc != SOCKET_ERROR); #else errno_assert (rc == 0); #endif #ifdef ZMQ_HAVE_OPENVMS // Disable delayed acknowledgements as they hurt latency is serious manner. int nodelack = 1; rc = setsockopt (s_, IPPROTO_TCP, TCP_NODELACK, (char*) &nodelack, sizeof (int)); errno_assert (rc != SOCKET_ERROR); #endif } void zmq::set_tcp_send_buffer (fd_t sockfd_, int bufsize_) { const int rc = setsockopt (sockfd_, SOL_SOCKET, SO_SNDBUF, (char*) &bufsize_, sizeof bufsize_); #ifdef ZMQ_HAVE_WINDOWS wsa_assert (rc != SOCKET_ERROR); #else errno_assert (rc == 0); #endif } void zmq::set_tcp_receive_buffer (fd_t sockfd_, int bufsize_) { const int rc = setsockopt (sockfd_, SOL_SOCKET, SO_RCVBUF, (char*) &bufsize_, sizeof bufsize_); #ifdef ZMQ_HAVE_WINDOWS wsa_assert (rc != SOCKET_ERROR); #else errno_assert (rc == 0); #endif } void zmq::tune_tcp_keepalives (fd_t s_, int keepalive_, int keepalive_cnt_, int keepalive_idle_, int keepalive_intvl_) { // These options are used only under certain #ifdefs below. (void)keepalive_; (void)keepalive_cnt_; (void)keepalive_idle_; (void)keepalive_intvl_; // If none of the #ifdefs apply, then s_ is unused. (void)s_; // Tuning TCP keep-alives if platform allows it // All values = -1 means skip and leave it for OS #ifdef ZMQ_HAVE_WINDOWS tcp_keepalive keepalive_opts; keepalive_opts.onoff = keepalive_; keepalive_opts.keepalivetime = keepalive_idle_ != -1 ? keepalive_idle_ * 1000 : 7200000; keepalive_opts.keepaliveinterval = keepalive_intvl_ != -1 ? keepalive_intvl_ * 1000 : 1000; DWORD num_bytes_returned; int rc = WSAIoctl(s_, SIO_KEEPALIVE_VALS, &keepalive_opts, sizeof(keepalive_opts), NULL, 0, &num_bytes_returned, NULL, NULL); wsa_assert (rc != SOCKET_ERROR); #else #ifdef ZMQ_HAVE_SO_KEEPALIVE if (keepalive_ != -1) { int rc = setsockopt (s_, SOL_SOCKET, SO_KEEPALIVE, (char*) &keepalive_, sizeof (int)); errno_assert (rc == 0); #ifdef ZMQ_HAVE_TCP_KEEPCNT if (keepalive_cnt_ != -1) { int rc = setsockopt (s_, IPPROTO_TCP, TCP_KEEPCNT, &keepalive_cnt_, sizeof (int)); errno_assert (rc == 0); } #endif // ZMQ_HAVE_TCP_KEEPCNT #ifdef ZMQ_HAVE_TCP_KEEPIDLE if (keepalive_idle_ != -1) { int rc = setsockopt (s_, IPPROTO_TCP, TCP_KEEPIDLE, &keepalive_idle_, sizeof (int)); errno_assert (rc == 0); } #else // ZMQ_HAVE_TCP_KEEPIDLE #ifdef ZMQ_HAVE_TCP_KEEPALIVE if (keepalive_idle_ != -1) { int rc = setsockopt (s_, IPPROTO_TCP, TCP_KEEPALIVE, &keepalive_idle_, sizeof (int)); errno_assert (rc == 0); } #endif // ZMQ_HAVE_TCP_KEEPALIVE #endif // ZMQ_HAVE_TCP_KEEPIDLE #ifdef ZMQ_HAVE_TCP_KEEPINTVL if (keepalive_intvl_ != -1) { int rc = setsockopt (s_, IPPROTO_TCP, TCP_KEEPINTVL, &keepalive_intvl_, sizeof (int)); errno_assert (rc == 0); } #endif // ZMQ_HAVE_TCP_KEEPINTVL } #endif // ZMQ_HAVE_SO_KEEPALIVE #endif // ZMQ_HAVE_WINDOWS } zeromq3-4.0.4+dfsg.orig/src/ctx.hpp0000644000175000017500000001471212240736636016047 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_CTX_HPP_INCLUDED__ #define __ZMQ_CTX_HPP_INCLUDED__ #include #include #include #include #include "mailbox.hpp" #include "array.hpp" #include "config.hpp" #include "mutex.hpp" #include "stdint.hpp" #include "options.hpp" #include "atomic_counter.hpp" namespace zmq { class object_t; class io_thread_t; class socket_base_t; class reaper_t; class pipe_t; // Information associated with inproc endpoint. Note that endpoint options // are registered as well so that the peer can access them without a need // for synchronisation, handshaking or similar. struct endpoint_t { socket_base_t *socket; options_t options; }; struct pending_connection_t { endpoint_t endpoint; pipe_t* connect_pipe; pipe_t* bind_pipe; }; // Context object encapsulates all the global state associated with // the library. class ctx_t { public: // Create the context object. ctx_t (); // Returns false if object is not a context. bool check_tag (); // This function is called when user invokes zmq_term. If there are // no more sockets open it'll cause all the infrastructure to be shut // down. If there are open sockets still, the deallocation happens // after the last one is closed. int terminate (); // This function starts the terminate process by unblocking any blocking // operations currently in progress and stopping any more socket activity // (except zmq_close). // This function is non-blocking. // terminate must still be called afterwards. // This function is optional, terminate will unblock any current // operations as well. int shutdown(); // Set and get context properties. int set (int option_, int optval_); int get (int option_); // Create and destroy a socket. zmq::socket_base_t *create_socket (int type_); void destroy_socket (zmq::socket_base_t *socket_); // Send command to the destination thread. void send_command (uint32_t tid_, const command_t &command_); // Returns the I/O thread that is the least busy at the moment. // Affinity specifies which I/O threads are eligible (0 = all). // Returns NULL if no I/O thread is available. zmq::io_thread_t *choose_io_thread (uint64_t affinity_); // Returns reaper thread object. zmq::object_t *get_reaper (); // Management of inproc endpoints. int register_endpoint (const char *addr_, endpoint_t &endpoint_); void unregister_endpoints (zmq::socket_base_t *socket_); endpoint_t find_endpoint (const char *addr_); void pend_connection (const char *addr_, pending_connection_t &pending_connection_); void connect_pending (const char *addr_, zmq::socket_base_t *bind_socket_); enum { term_tid = 0, reaper_tid = 1 }; ~ctx_t (); private: // Used to check whether the object is a context. uint32_t tag; // Sockets belonging to this context. We need the list so that // we can notify the sockets when zmq_term() is called. The sockets // will return ETERM then. typedef array_t sockets_t; sockets_t sockets; // List of unused thread slots. typedef std::vector empty_slots_t; empty_slots_t empty_slots; // If true, zmq_init has been called but no socket has been created // yet. Launching of I/O threads is delayed. bool starting; // If true, zmq_term was already called. bool terminating; // Synchronisation of accesses to global slot-related data: // sockets, empty_slots, terminating. It also synchronises // access to zombie sockets as such (as opposed to slots) and provides // a memory barrier to ensure that all CPU cores see the same data. mutex_t slot_sync; // The reaper thread. zmq::reaper_t *reaper; // I/O threads. typedef std::vector io_threads_t; io_threads_t io_threads; // Array of pointers to mailboxes for both application and I/O threads. uint32_t slot_count; mailbox_t **slots; // Mailbox for zmq_term thread. mailbox_t term_mailbox; // List of inproc endpoints within this context. typedef std::map endpoints_t; endpoints_t endpoints; // List of inproc connection endpoints pending a bind typedef std::multimap pending_connections_t; pending_connections_t pending_connections; // Synchronisation of access to the list of inproc endpoints. mutex_t endpoints_sync; // Maximum socket ID. static atomic_counter_t max_socket_id; // Maximum number of sockets that can be opened at the same time. int max_sockets; // Number of I/O threads to launch. int io_thread_count; // Is IPv6 enabled on this context? bool ipv6; // Synchronisation of access to context options. mutex_t opt_sync; ctx_t (const ctx_t&); const ctx_t &operator = (const ctx_t&); #ifdef HAVE_FORK // the process that created this context. Used to detect forking. pid_t pid; #endif enum side { connect_side, bind_side }; void connect_inproc_sockets(zmq::socket_base_t *bind_socket_, options_t& bind_options, pending_connection_t &pending_connection_, side side_); }; } #endif zeromq3-4.0.4+dfsg.orig/src/pull.hpp0000644000175000017500000000315612240736636016225 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PULL_HPP_INCLUDED__ #define __ZMQ_PULL_HPP_INCLUDED__ #include "socket_base.hpp" #include "session_base.hpp" #include "fq.hpp" namespace zmq { class ctx_t; class pipe_t; class msg_t; class io_thread_t; class pull_t : public socket_base_t { public: pull_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_); ~pull_t (); protected: // Overloads of functions from socket_base_t. void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_); int xrecv (zmq::msg_t *msg_); bool xhas_in (); void xread_activated (zmq::pipe_t *pipe_); void xpipe_terminated (zmq::pipe_t *pipe_); private: // Fair queueing object for inbound pipes. fq_t fq; pull_t (const pull_t&); const pull_t &operator = (const pull_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/session_base.cpp0000644000175000017500000003433712240736636017726 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "session_base.hpp" #include "i_engine.hpp" #include "err.hpp" #include "pipe.hpp" #include "likely.hpp" #include "tcp_connecter.hpp" #include "ipc_connecter.hpp" #include "pgm_sender.hpp" #include "pgm_receiver.hpp" #include "address.hpp" #include "ctx.hpp" #include "req.hpp" zmq::session_base_t *zmq::session_base_t::create (class io_thread_t *io_thread_, bool connect_, class socket_base_t *socket_, const options_t &options_, const address_t *addr_) { session_base_t *s = NULL; switch (options_.type) { case ZMQ_REQ: s = new (std::nothrow) req_session_t (io_thread_, connect_, socket_, options_, addr_); break; case ZMQ_DEALER: case ZMQ_REP: case ZMQ_ROUTER: case ZMQ_PUB: case ZMQ_XPUB: case ZMQ_SUB: case ZMQ_XSUB: case ZMQ_PUSH: case ZMQ_PULL: case ZMQ_PAIR: case ZMQ_STREAM: s = new (std::nothrow) session_base_t (io_thread_, connect_, socket_, options_, addr_); break; default: errno = EINVAL; return NULL; } alloc_assert (s); return s; } zmq::session_base_t::session_base_t (class io_thread_t *io_thread_, bool connect_, class socket_base_t *socket_, const options_t &options_, const address_t *addr_) : own_t (io_thread_, options_), io_object_t (io_thread_), connect (connect_), pipe (NULL), zap_pipe (NULL), incomplete_in (false), pending (false), engine (NULL), socket (socket_), io_thread (io_thread_), has_linger_timer (false), addr (addr_) { } zmq::session_base_t::~session_base_t () { zmq_assert (!pipe); zmq_assert (!zap_pipe); // If there's still a pending linger timer, remove it. if (has_linger_timer) { cancel_timer (linger_timer_id); has_linger_timer = false; } // Close the engine. if (engine) engine->terminate (); delete addr; } void zmq::session_base_t::attach_pipe (pipe_t *pipe_) { zmq_assert (!is_terminating ()); zmq_assert (!pipe); zmq_assert (pipe_); pipe = pipe_; pipe->set_event_sink (this); } int zmq::session_base_t::pull_msg (msg_t *msg_) { if (!pipe || !pipe->read (msg_)) { errno = EAGAIN; return -1; } incomplete_in = msg_->flags () & msg_t::more ? true : false; return 0; } int zmq::session_base_t::push_msg (msg_t *msg_) { if (pipe && pipe->write (msg_)) { int rc = msg_->init (); errno_assert (rc == 0); return 0; } errno = EAGAIN; return -1; } int zmq::session_base_t::read_zap_msg (msg_t *msg_) { if (zap_pipe == NULL) { errno = ENOTCONN; return -1; } if (!zap_pipe->read (msg_)) { errno = EAGAIN; return -1; } return 0; } int zmq::session_base_t::write_zap_msg (msg_t *msg_) { if (zap_pipe == NULL) { errno = ENOTCONN; return -1; } const bool ok = zap_pipe->write (msg_); zmq_assert (ok); if ((msg_->flags () & msg_t::more) == 0) zap_pipe->flush (); const int rc = msg_->init (); errno_assert (rc == 0); return 0; } void zmq::session_base_t::reset () { } void zmq::session_base_t::flush () { if (pipe) pipe->flush (); } void zmq::session_base_t::clean_pipes () { if (pipe) { // Get rid of half-processed messages in the out pipe. Flush any // unflushed messages upstream. pipe->rollback (); pipe->flush (); // Remove any half-read message from the in pipe. while (incomplete_in) { msg_t msg; int rc = msg.init (); errno_assert (rc == 0); rc = pull_msg (&msg); errno_assert (rc == 0); rc = msg.close (); errno_assert (rc == 0); } } } void zmq::session_base_t::pipe_terminated (pipe_t *pipe_) { // Drop the reference to the deallocated pipe if required. zmq_assert (pipe_ == pipe || pipe_ == zap_pipe || terminating_pipes.count (pipe_) == 1); if (pipe_ == pipe) // If this is our current pipe, remove it pipe = NULL; else if (pipe_ == zap_pipe) { zap_pipe = NULL; } else // Remove the pipe from the detached pipes set terminating_pipes.erase (pipe_); if (!is_terminating () && options.raw_sock) { if (engine) { engine->terminate (); engine = NULL; } terminate (); } // If we are waiting for pending messages to be sent, at this point // we are sure that there will be no more messages and we can proceed // with termination safely. if (pending && !pipe && !zap_pipe && terminating_pipes.empty ()) proceed_with_term (); } void zmq::session_base_t::read_activated (pipe_t *pipe_) { // Skip activating if we're detaching this pipe if (unlikely(pipe_ != pipe && pipe_ != zap_pipe)) { zmq_assert (terminating_pipes.count (pipe_) == 1); return; } if (unlikely (engine == NULL)) { pipe->check_read (); return; } if (likely (pipe_ == pipe)) engine->restart_output (); else engine->zap_msg_available (); } void zmq::session_base_t::write_activated (pipe_t *pipe_) { // Skip activating if we're detaching this pipe if (pipe != pipe_) { zmq_assert (terminating_pipes.count (pipe_) == 1); return; } if (engine) engine->restart_input (); } void zmq::session_base_t::hiccuped (pipe_t *) { // Hiccups are always sent from session to socket, not the other // way round. zmq_assert (false); } zmq::socket_base_t *zmq::session_base_t::get_socket () { return socket; } void zmq::session_base_t::process_plug () { if (connect) start_connecting (false); } int zmq::session_base_t::zap_connect () { zmq_assert (zap_pipe == NULL); endpoint_t peer = find_endpoint ("inproc://zeromq.zap.01"); if (peer.socket == NULL) { errno = ECONNREFUSED; return -1; } if (peer.options.type != ZMQ_REP && peer.options.type != ZMQ_ROUTER) { errno = ECONNREFUSED; return -1; } // Create a bi-directional pipe that will connect // session with zap socket. object_t *parents [2] = {this, peer.socket}; pipe_t *new_pipes [2] = {NULL, NULL}; int hwms [2] = {0, 0}; bool conflates [2] = {false, false}; int rc = pipepair (parents, new_pipes, hwms, conflates); errno_assert (rc == 0); // Attach local end of the pipe to this socket object. zap_pipe = new_pipes [0]; zap_pipe->set_nodelay (); zap_pipe->set_event_sink (this); new_pipes [1]->set_nodelay (); send_bind (peer.socket, new_pipes [1], false); // Send empty identity if required by the peer. if (peer.options.recv_identity) { msg_t id; rc = id.init (); errno_assert (rc == 0); id.set_flags (msg_t::identity); bool ok = zap_pipe->write (&id); zmq_assert (ok); zap_pipe->flush (); } return 0; } void zmq::session_base_t::process_attach (i_engine *engine_) { zmq_assert (engine_ != NULL); // Create the pipe if it does not exist yet. if (!pipe && !is_terminating ()) { object_t *parents [2] = {this, socket}; pipe_t *pipes [2] = {NULL, NULL}; bool conflate = options.conflate && (options.type == ZMQ_DEALER || options.type == ZMQ_PULL || options.type == ZMQ_PUSH || options.type == ZMQ_PUB || options.type == ZMQ_SUB); int hwms [2] = {conflate? -1 : options.rcvhwm, conflate? -1 : options.sndhwm}; bool conflates [2] = {conflate, conflate}; int rc = pipepair (parents, pipes, hwms, conflates); errno_assert (rc == 0); // Plug the local end of the pipe. pipes [0]->set_event_sink (this); // Remember the local end of the pipe. zmq_assert (!pipe); pipe = pipes [0]; // Ask socket to plug into the remote end of the pipe. send_bind (socket, pipes [1]); } // Plug in the engine. zmq_assert (!engine); engine = engine_; engine->plug (io_thread, this); } void zmq::session_base_t::detach () { // Engine is dead. Let's forget about it. engine = NULL; // Remove any half-done messages from the pipes. clean_pipes (); // Send the event to the derived class. detached (); // Just in case there's only a delimiter in the pipe. if (pipe) pipe->check_read (); if (zap_pipe) zap_pipe->check_read (); } void zmq::session_base_t::process_term (int linger_) { zmq_assert (!pending); // If the termination of the pipe happens before the term command is // delivered there's nothing much to do. We can proceed with the // standard termination immediately. if (!pipe && !zap_pipe) { proceed_with_term (); return; } pending = true; if (pipe != NULL) { // If there's finite linger value, delay the termination. // If linger is infinite (negative) we don't even have to set // the timer. if (linger_ > 0) { zmq_assert (!has_linger_timer); add_timer (linger_, linger_timer_id); has_linger_timer = true; } // Start pipe termination process. Delay the termination till all messages // are processed in case the linger time is non-zero. pipe->terminate (linger_ != 0); // TODO: Should this go into pipe_t::terminate ? // In case there's no engine and there's only delimiter in the // pipe it wouldn't be ever read. Thus we check for it explicitly. pipe->check_read (); } if (zap_pipe != NULL) zap_pipe->terminate (false); } void zmq::session_base_t::proceed_with_term () { // The pending phase has just ended. pending = false; // Continue with standard termination. own_t::process_term (0); } void zmq::session_base_t::timer_event (int id_) { // Linger period expired. We can proceed with termination even though // there are still pending messages to be sent. zmq_assert (id_ == linger_timer_id); has_linger_timer = false; // Ask pipe to terminate even though there may be pending messages in it. zmq_assert (pipe); pipe->terminate (false); } void zmq::session_base_t::detached () { // Transient session self-destructs after peer disconnects. if (!connect) { terminate (); return; } // For delayed connect situations, terminate the pipe // and reestablish later on if (pipe && options.immediate == 1 && addr->protocol != "pgm" && addr->protocol != "epgm") { pipe->hiccup (); pipe->terminate (false); terminating_pipes.insert (pipe); pipe = NULL; } reset (); // Reconnect. if (options.reconnect_ivl != -1) start_connecting (true); // For subscriber sockets we hiccup the inbound pipe, which will cause // the socket object to resend all the subscriptions. if (pipe && (options.type == ZMQ_SUB || options.type == ZMQ_XSUB)) pipe->hiccup (); } void zmq::session_base_t::start_connecting (bool wait_) { zmq_assert (connect); // Choose I/O thread to run connecter in. Given that we are already // running in an I/O thread, there must be at least one available. io_thread_t *io_thread = choose_io_thread (options.affinity); zmq_assert (io_thread); // Create the connecter object. if (addr->protocol == "tcp") { tcp_connecter_t *connecter = new (std::nothrow) tcp_connecter_t ( io_thread, this, options, addr, wait_); alloc_assert (connecter); launch_child (connecter); return; } #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS if (addr->protocol == "ipc") { ipc_connecter_t *connecter = new (std::nothrow) ipc_connecter_t ( io_thread, this, options, addr, wait_); alloc_assert (connecter); launch_child (connecter); return; } #endif #ifdef ZMQ_HAVE_OPENPGM // Both PGM and EPGM transports are using the same infrastructure. if (addr->protocol == "pgm" || addr->protocol == "epgm") { zmq_assert (options.type == ZMQ_PUB || options.type == ZMQ_XPUB || options.type == ZMQ_SUB || options.type == ZMQ_XSUB); // For EPGM transport with UDP encapsulation of PGM is used. bool const udp_encapsulation = addr->protocol == "epgm"; // At this point we'll create message pipes to the session straight // away. There's no point in delaying it as no concept of 'connect' // exists with PGM anyway. if (options.type == ZMQ_PUB || options.type == ZMQ_XPUB) { // PGM sender. pgm_sender_t *pgm_sender = new (std::nothrow) pgm_sender_t ( io_thread, options); alloc_assert (pgm_sender); int rc = pgm_sender->init (udp_encapsulation, addr->address.c_str ()); errno_assert (rc == 0); send_attach (this, pgm_sender); } else { // PGM receiver. pgm_receiver_t *pgm_receiver = new (std::nothrow) pgm_receiver_t ( io_thread, options); alloc_assert (pgm_receiver); int rc = pgm_receiver->init (udp_encapsulation, addr->address.c_str ()); errno_assert (rc == 0); send_attach (this, pgm_receiver); } return; } #endif zmq_assert (false); } zeromq3-4.0.4+dfsg.orig/src/address.cpp0000644000175000017500000000405712240736636016672 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "address.hpp" #include "err.hpp" #include "tcp_address.hpp" #include "ipc_address.hpp" #include #include zmq::address_t::address_t ( const std::string &protocol_, const std::string &address_) : protocol (protocol_), address (address_) { memset (&resolved, 0, sizeof (resolved)); } zmq::address_t::~address_t () { if (protocol == "tcp") { if (resolved.tcp_addr) { delete resolved.tcp_addr; resolved.tcp_addr = 0; } } #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS else if (protocol == "ipc") { if (resolved.ipc_addr) { delete resolved.ipc_addr; resolved.ipc_addr = 0; } } #endif } int zmq::address_t::to_string (std::string &addr_) const { if (protocol == "tcp") { if (resolved.tcp_addr) return resolved.tcp_addr->to_string(addr_); } #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS else if (protocol == "ipc") { if (resolved.ipc_addr) return resolved.ipc_addr->to_string(addr_); } #endif if (!protocol.empty () && !address.empty ()) { std::stringstream s; s << protocol << "://" << address; addr_ = s.str (); return 0; } addr_.clear (); return -1; } zeromq3-4.0.4+dfsg.orig/src/ypipe_conflate.hpp0000644000175000017500000000735112240736636020253 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_YPIPE_CONFLATE_HPP_INCLUDED__ #define __ZMQ_YPIPE_CONFLATE_HPP_INCLUDED__ #include "platform.hpp" #include "dbuffer.hpp" #include "ypipe_base.hpp" namespace zmq { // Adapter for dbuffer, to plug it in instead of a queue for the sake // of implementing the conflate socket option, which, if set, makes // the receiving side to discard all incoming messages but the last one. // // reader_awake flag is needed here to mimic ypipe delicate behaviour // around the reader being asleep (see 'c' pointer being NULL in ypipe.hpp) template class ypipe_conflate_t : public ypipe_base_t { public: // Initialises the pipe. inline ypipe_conflate_t () : reader_awake(false) { } // The destructor doesn't have to be virtual. It is mad virtual // just to keep ICC and code checking tools from complaining. inline virtual ~ypipe_conflate_t () { } // Following function (write) deliberately copies uninitialised data // when used with zmq_msg. Initialising the VSM body for // non-VSM messages won't be good for performance. #ifdef ZMQ_HAVE_OPENVMS #pragma message save #pragma message disable(UNINIT) #endif inline void write (const T &value_, bool incomplete_) { (void)incomplete_; dbuffer.write (value_); } #ifdef ZMQ_HAVE_OPENVMS #pragma message restore #endif // There are no incomplete items for conflate ypipe inline bool unwrite (T *value_) { return false; } // Flush is no-op for conflate ypipe. Reader asleep behaviour // is as of the usual ypipe. // Returns false if the reader thread is sleeping. In that case, // caller is obliged to wake the reader up before using the pipe again. inline bool flush () { return reader_awake; } // Check whether item is available for reading. inline bool check_read () { bool res = dbuffer.check_read (); if (!res) reader_awake = false; return res; } // Reads an item from the pipe. Returns false if there is no value. // available. inline bool read (T *value_) { if (!check_read ()) return false; return dbuffer.read (value_); } // Applies the function fn to the first elemenent in the pipe // and returns the value returned by the fn. // The pipe mustn't be empty or the function crashes. inline bool probe (bool (*fn)(T &)) { return dbuffer.probe (fn); } protected: dbuffer_t dbuffer; bool reader_awake; // Disable copying of ypipe object. ypipe_conflate_t (const ypipe_conflate_t&); const ypipe_conflate_t &operator = (const ypipe_conflate_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/signaler.hpp0000644000175000017500000000442212240736636017052 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SIGNALER_HPP_INCLUDED__ #define __ZMQ_SIGNALER_HPP_INCLUDED__ #ifdef HAVE_FORK #include #endif #include "fd.hpp" namespace zmq { // This is a cross-platform equivalent to signal_fd. However, as opposed // to signal_fd there can be at most one signal in the signaler at any // given moment. Attempt to send a signal before receiving the previous // one will result in undefined behaviour. class signaler_t { public: signaler_t (); ~signaler_t (); fd_t get_fd (); void send (); int wait (int timeout_); void recv (); #ifdef HAVE_FORK // close the file descriptors in a forked child process so that they // do not interfere with the context in the parent process. void forked(); #endif private: // Creates a pair of filedescriptors that will be used // to pass the signals. static int make_fdpair (fd_t *r_, fd_t *w_); // Underlying write & read file descriptor // Will be -1 if we exceeded number of available handles fd_t w; fd_t r; // Disable copying of signaler_t object. signaler_t (const signaler_t&); const signaler_t &operator = (const signaler_t&); #ifdef HAVE_FORK // the process that created this context. Used to detect forking. pid_t pid; // idempotent close of file descriptors that is safe to use by destructor // and forked(). void close_internal(); #endif }; } #endif zeromq3-4.0.4+dfsg.orig/src/ipc_address.hpp0000644000175000017500000000314712240736636017531 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_IPC_ADDRESS_HPP_INCLUDED__ #define __ZMQ_IPC_ADDRESS_HPP_INCLUDED__ #include #include "platform.hpp" #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS #include #include namespace zmq { class ipc_address_t { public: ipc_address_t (); ipc_address_t (const sockaddr *sa, socklen_t sa_len); ~ipc_address_t (); // This function sets up the address for UNIX domain transport. int resolve (const char* path_); // The opposite to resolve() int to_string (std::string &addr_); const sockaddr *addr () const; socklen_t addrlen () const; private: struct sockaddr_un address; ipc_address_t (const ipc_address_t&); const ipc_address_t &operator = (const ipc_address_t&); }; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/i_poll_events.hpp0000644000175000017500000000256112240736636020112 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_I_POLL_EVENTS_HPP_INCLUDED__ #define __ZMQ_I_POLL_EVENTS_HPP_INCLUDED__ namespace zmq { // Virtual interface to be exposed by object that want to be notified // about events on file descriptors. struct i_poll_events { virtual ~i_poll_events () {} // Called by I/O thread when file descriptor is ready for reading. virtual void in_event () = 0; // Called by I/O thread when file descriptor is ready for writing. virtual void out_event () = 0; // Called when timer expires. virtual void timer_event (int id_) = 0; }; } #endif zeromq3-4.0.4+dfsg.orig/src/ipc_listener.cpp0000644000175000017500000001272312240736636017724 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "ipc_listener.hpp" #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS #include #include #include "stream_engine.hpp" #include "ipc_address.hpp" #include "io_thread.hpp" #include "session_base.hpp" #include "config.hpp" #include "err.hpp" #include "ip.hpp" #include "socket_base.hpp" #include #include #include #include zmq::ipc_listener_t::ipc_listener_t (io_thread_t *io_thread_, socket_base_t *socket_, const options_t &options_) : own_t (io_thread_, options_), io_object_t (io_thread_), has_file (false), s (retired_fd), socket (socket_) { } zmq::ipc_listener_t::~ipc_listener_t () { zmq_assert (s == retired_fd); } void zmq::ipc_listener_t::process_plug () { // Start polling for incoming connections. handle = add_fd (s); set_pollin (handle); } void zmq::ipc_listener_t::process_term (int linger_) { rm_fd (handle); close (); own_t::process_term (linger_); } void zmq::ipc_listener_t::in_event () { fd_t fd = accept (); // If connection was reset by the peer in the meantime, just ignore it. // TODO: Handle specific errors like ENFILE/EMFILE etc. if (fd == retired_fd) { socket->event_accept_failed (endpoint, zmq_errno()); return; } // Create the engine object for this connection. stream_engine_t *engine = new (std::nothrow) stream_engine_t (fd, options, endpoint); alloc_assert (engine); // Choose I/O thread to run connecter in. Given that we are already // running in an I/O thread, there must be at least one available. io_thread_t *io_thread = choose_io_thread (options.affinity); zmq_assert (io_thread); // Create and launch a session object. session_base_t *session = session_base_t::create (io_thread, false, socket, options, NULL); errno_assert (session); session->inc_seqnum (); launch_child (session); send_attach (session, engine, false); socket->event_accepted (endpoint, fd); } int zmq::ipc_listener_t::get_address (std::string &addr_) { struct sockaddr_storage ss; #ifdef ZMQ_HAVE_HPUX int sl = sizeof (ss); #else socklen_t sl = sizeof (ss); #endif int rc = getsockname (s, (sockaddr *) &ss, &sl); if (rc != 0) { addr_.clear (); return rc; } ipc_address_t addr ((struct sockaddr *) &ss, sl); return addr.to_string (addr_); } int zmq::ipc_listener_t::set_address (const char *addr_) { // Create addr on stack for auto-cleanup std::string addr (addr_); // Allow wildcard file if (addr[0] == '*') { char *tmpstr = tempnam (NULL, NULL); addr.assign (tmpstr); free (tmpstr); } // Get rid of the file associated with the UNIX domain socket that // may have been left behind by the previous run of the application. ::unlink (addr.c_str()); filename.clear (); // Initialise the address structure. ipc_address_t address; int rc = address.resolve (addr.c_str()); if (rc != 0) return -1; // Create a listening socket. s = open_socket (AF_UNIX, SOCK_STREAM, 0); if (s == -1) return -1; address.to_string (endpoint); // Bind the socket to the file path. rc = bind (s, address.addr (), address.addrlen ()); if (rc != 0) goto error; filename.assign (addr.c_str()); has_file = true; // Listen for incoming connections. rc = listen (s, options.backlog); if (rc != 0) goto error; socket->event_listening (endpoint, s); return 0; error: int err = errno; close (); errno = err; return -1; } int zmq::ipc_listener_t::close () { zmq_assert (s != retired_fd); int rc = ::close (s); errno_assert (rc == 0); s = retired_fd; // If there's an underlying UNIX domain socket, get rid of the file it // is associated with. if (has_file && !filename.empty ()) { rc = ::unlink(filename.c_str ()); if (rc != 0) { socket->event_close_failed (endpoint, zmq_errno()); return -1; } } socket->event_closed (endpoint, s); return 0; } zmq::fd_t zmq::ipc_listener_t::accept () { // Accept one connection and deal with different failure modes. // The situation where connection cannot be accepted due to insufficient // resources is considered valid and treated by ignoring the connection. zmq_assert (s != retired_fd); fd_t sock = ::accept (s, NULL, NULL); if (sock == -1) { errno_assert (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR || errno == ECONNABORTED || errno == EPROTO || errno == ENFILE); return retired_fd; } return sock; } #endif zeromq3-4.0.4+dfsg.orig/src/reaper.hpp0000644000175000017500000000424312240736636016525 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_REAPER_HPP_INCLUDED__ #define __ZMQ_REAPER_HPP_INCLUDED__ #include "object.hpp" #include "mailbox.hpp" #include "poller.hpp" #include "i_poll_events.hpp" namespace zmq { class ctx_t; class socket_base_t; class reaper_t : public object_t, public i_poll_events { public: reaper_t (zmq::ctx_t *ctx_, uint32_t tid_); ~reaper_t (); mailbox_t *get_mailbox (); void start (); void stop (); // i_poll_events implementation. void in_event (); void out_event (); void timer_event (int id_); private: // Command handlers. void process_stop (); void process_reap (zmq::socket_base_t *socket_); void process_reaped (); // Reaper thread accesses incoming commands via this mailbox. mailbox_t mailbox; // Handle associated with mailbox' file descriptor. poller_t::handle_t mailbox_handle; // I/O multiplexing is performed using a poller object. poller_t *poller; // Number of sockets being reaped at the moment. int sockets; // If true, we were already asked to terminate. bool terminating; reaper_t (const reaper_t&); const reaper_t &operator = (const reaper_t&); #ifdef HAVE_FORK // the process that created this context. Used to detect forking. pid_t pid; #endif }; } #endif zeromq3-4.0.4+dfsg.orig/src/pgm_receiver.cpp0000644000175000017500000001740012240736636017710 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #include #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "pgm_receiver.hpp" #include "session_base.hpp" #include "v1_decoder.hpp" #include "stdint.hpp" #include "wire.hpp" #include "err.hpp" zmq::pgm_receiver_t::pgm_receiver_t (class io_thread_t *parent_, const options_t &options_) : io_object_t (parent_), has_rx_timer (false), pgm_socket (true, options_), options (options_), session (NULL), active_tsi (NULL), insize (0) { } zmq::pgm_receiver_t::~pgm_receiver_t () { // Destructor should not be called before unplug. zmq_assert (peers.empty ()); } int zmq::pgm_receiver_t::init (bool udp_encapsulation_, const char *network_) { return pgm_socket.init (udp_encapsulation_, network_); } void zmq::pgm_receiver_t::plug (io_thread_t *io_thread_, session_base_t *session_) { // Retrieve PGM fds and start polling. fd_t socket_fd = retired_fd; fd_t waiting_pipe_fd = retired_fd; pgm_socket.get_receiver_fds (&socket_fd, &waiting_pipe_fd); socket_handle = add_fd (socket_fd); pipe_handle = add_fd (waiting_pipe_fd); set_pollin (pipe_handle); set_pollin (socket_handle); session = session_; // If there are any subscriptions already queued in the session, drop them. drop_subscriptions (); } void zmq::pgm_receiver_t::unplug () { // Delete decoders. for (peers_t::iterator it = peers.begin (); it != peers.end (); ++it) { if (it->second.decoder != NULL) delete it->second.decoder; } peers.clear (); active_tsi = NULL; if (has_rx_timer) { cancel_timer (rx_timer_id); has_rx_timer = false; } rm_fd (socket_handle); rm_fd (pipe_handle); session = NULL; } void zmq::pgm_receiver_t::terminate () { unplug (); delete this; } void zmq::pgm_receiver_t::restart_output () { drop_subscriptions (); } void zmq::pgm_receiver_t::restart_input () { zmq_assert (session != NULL); zmq_assert (active_tsi != NULL); const peers_t::iterator it = peers.find (*active_tsi); zmq_assert (it != peers.end ()); zmq_assert (it->second.joined); // Push the pending message into the session. int rc = session->push_msg (it->second.decoder->msg ()); errno_assert (rc == 0); if (insize > 0) { rc = process_input (it->second.decoder); if (rc == -1) { // HWM reached; we will try later. if (errno == EAGAIN) { session->flush (); return; } // Data error. Delete message decoder, mark the // peer as not joined and drop remaining data. it->second.joined = false; delete it->second.decoder; it->second.decoder = NULL; insize = 0; } } // Resume polling. set_pollin (pipe_handle); set_pollin (socket_handle); active_tsi = NULL; in_event (); } void zmq::pgm_receiver_t::in_event () { // Read data from the underlying pgm_socket. const pgm_tsi_t *tsi = NULL; if (has_rx_timer) { cancel_timer (rx_timer_id); has_rx_timer = false; } // TODO: This loop can effectively block other engines in the same I/O // thread in the case of high load. while (true) { // Get new batch of data. // Note the workaround made not to break strict-aliasing rules. void *tmp = NULL; ssize_t received = pgm_socket.receive (&tmp, &tsi); inpos = (unsigned char*) tmp; // No data to process. This may happen if the packet received is // neither ODATA nor ODATA. if (received == 0) { if (errno == ENOMEM || errno == EBUSY) { const long timeout = pgm_socket.get_rx_timeout (); add_timer (timeout, rx_timer_id); has_rx_timer = true; } break; } // Find the peer based on its TSI. peers_t::iterator it = peers.find (*tsi); // Data loss. Delete decoder and mark the peer as disjoint. if (received == -1) { if (it != peers.end ()) { it->second.joined = false; if (it->second.decoder != NULL) { delete it->second.decoder; it->second.decoder = NULL; } } break; } // New peer. Add it to the list of know but unjoint peers. if (it == peers.end ()) { peer_info_t peer_info = {false, NULL}; it = peers.insert (peers_t::value_type (*tsi, peer_info)).first; } insize = static_cast (received); // Read the offset of the fist message in the current packet. zmq_assert (insize >= sizeof (uint16_t)); uint16_t offset = get_uint16 (inpos); inpos += sizeof (uint16_t); insize -= sizeof (uint16_t); // Join the stream if needed. if (!it->second.joined) { // There is no beginning of the message in current packet. // Ignore the data. if (offset == 0xffff) continue; zmq_assert (offset <= insize); zmq_assert (it->second.decoder == NULL); // We have to move data to the begining of the first message. inpos += offset; insize -= offset; // Mark the stream as joined. it->second.joined = true; // Create and connect decoder for the peer. it->second.decoder = new (std::nothrow) v1_decoder_t (0, options.maxmsgsize); alloc_assert (it->second.decoder); } int rc = process_input (it->second.decoder); if (rc == -1) { if (errno == EAGAIN) { active_tsi = tsi; // Stop polling. reset_pollin (pipe_handle); reset_pollin (socket_handle); break; } it->second.joined = false; delete it->second.decoder; it->second.decoder = NULL; insize = 0; } } // Flush any messages decoder may have produced. session->flush (); } int zmq::pgm_receiver_t::process_input (v1_decoder_t *decoder) { zmq_assert (session != NULL); while (insize > 0) { size_t n = 0; int rc = decoder->decode (inpos, insize, n); if (rc == -1) return -1; inpos += n; insize -= n; if (rc == 0) break; rc = session->push_msg (decoder->msg ()); if (rc == -1) { errno_assert (errno == EAGAIN); return -1; } } return 0; } void zmq::pgm_receiver_t::timer_event (int token) { zmq_assert (token == rx_timer_id); // Timer cancels on return by poller_base. has_rx_timer = false; in_event (); } void zmq::pgm_receiver_t::drop_subscriptions () { msg_t msg; msg.init (); while (session->pull_msg (&msg)) msg.close (); } #endif zeromq3-4.0.4+dfsg.orig/src/clock.hpp0000644000175000017500000000312612240736636016341 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_CLOCK_HPP_INCLUDED__ #define __ZMQ_CLOCK_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { class clock_t { public: clock_t (); ~clock_t (); // CPU's timestamp counter. Returns 0 if it's not available. static uint64_t rdtsc (); // High precision timestamp. static uint64_t now_us (); // Low precision timestamp. In tight loops generating it can be // 10 to 100 times faster than the high precision timestamp. uint64_t now_ms (); private: // TSC timestamp of when last time measurement was made. uint64_t last_tsc; // Physical time corresponding to the TSC above (in milliseconds). uint64_t last_time; clock_t (const clock_t&); const clock_t &operator = (const clock_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/thread.hpp0000644000175000017500000000423412240736636016516 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_THREAD_HPP_INCLUDED__ #define __ZMQ_THREAD_HPP_INCLUDED__ #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #endif namespace zmq { typedef void (thread_fn) (void*); // Class encapsulating OS thread. Thread initiation/termination is done // using special functions rather than in constructor/destructor so that // thread isn't created during object construction by accident, causing // newly created thread to access half-initialised object. Same applies // to the destruction process: Thread should be terminated before object // destruction begins, otherwise it can access half-destructed object. class thread_t { public: inline thread_t () { } // Creates OS thread. 'tfn' is main thread function. It'll be passed // 'arg' as an argument. void start (thread_fn *tfn_, void *arg_); // Waits for thread termination. void stop (); // These are internal members. They should be private, however then // they would not be accessible from the main C routine of the thread. thread_fn *tfn; void *arg; private: #ifdef ZMQ_HAVE_WINDOWS HANDLE descriptor; #else pthread_t descriptor; #endif thread_t (const thread_t&); const thread_t &operator = (const thread_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/i_encoder.hpp0000644000175000017500000000273412307426216017173 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_I_ENCODER_HPP_INCLUDED__ #define __ZMQ_I_ENCODER_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { // Forward declaration class msg_t; // Interface to be implemented by message encoder. struct i_encoder { virtual ~i_encoder () {} // The function returns a batch of binary data. The data // are filled to a supplied buffer. If no buffer is supplied (data_ // is NULL) encoder will provide buffer of its own. // Function returns 0 when a new message is required. virtual size_t encode (unsigned char **data_, size_t size) = 0; // Load a new message into encoder. virtual void load_msg (msg_t *msg_) = 0; }; } #endif zeromq3-4.0.4+dfsg.orig/src/pipe.cpp0000644000175000017500000003157112307426216016175 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "pipe.hpp" #include "err.hpp" #include "ypipe.hpp" #include "ypipe_conflate.hpp" int zmq::pipepair (class object_t *parents_ [2], class pipe_t* pipes_ [2], int hwms_ [2], bool conflate_ [2]) { // Creates two pipe objects. These objects are connected by two ypipes, // each to pass messages in one direction. typedef ypipe_t upipe_normal_t; typedef ypipe_conflate_t upipe_conflate_t; pipe_t::upipe_t *upipe1; if(conflate_ [0]) upipe1 = new (std::nothrow) upipe_conflate_t (); else upipe1 = new (std::nothrow) upipe_normal_t (); alloc_assert (upipe1); pipe_t::upipe_t *upipe2; if(conflate_ [1]) upipe2 = new (std::nothrow) upipe_conflate_t (); else upipe2 = new (std::nothrow) upipe_normal_t (); alloc_assert (upipe2); pipes_ [0] = new (std::nothrow) pipe_t (parents_ [0], upipe1, upipe2, hwms_ [1], hwms_ [0], conflate_ [0]); alloc_assert (pipes_ [0]); pipes_ [1] = new (std::nothrow) pipe_t (parents_ [1], upipe2, upipe1, hwms_ [0], hwms_ [1], conflate_ [1]); alloc_assert (pipes_ [1]); pipes_ [0]->set_peer (pipes_ [1]); pipes_ [1]->set_peer (pipes_ [0]); return 0; } zmq::pipe_t::pipe_t (object_t *parent_, upipe_t *inpipe_, upipe_t *outpipe_, int inhwm_, int outhwm_, bool conflate_) : object_t (parent_), inpipe (inpipe_), outpipe (outpipe_), in_active (true), out_active (true), hwm (outhwm_), lwm (compute_lwm (inhwm_)), msgs_read (0), msgs_written (0), peers_msgs_read (0), peer (NULL), sink (NULL), state (active), delay (true), conflate (conflate_) { } zmq::pipe_t::~pipe_t () { } void zmq::pipe_t::set_peer (pipe_t *peer_) { // Peer can be set once only. zmq_assert (!peer); peer = peer_; } void zmq::pipe_t::set_event_sink (i_pipe_events *sink_) { // Sink can be set once only. zmq_assert (!sink); sink = sink_; } void zmq::pipe_t::set_identity (const blob_t &identity_) { identity = identity_; } zmq::blob_t zmq::pipe_t::get_identity () { return identity; } bool zmq::pipe_t::check_read () { if (unlikely (!in_active)) return false; if (unlikely (state != active && state != waiting_for_delimiter)) return false; // Check if there's an item in the pipe. if (!inpipe->check_read ()) { in_active = false; return false; } // If the next item in the pipe is message delimiter, // initiate termination process. if (inpipe->probe (is_delimiter)) { msg_t msg; bool ok = inpipe->read (&msg); zmq_assert (ok); process_delimiter (); return false; } return true; } bool zmq::pipe_t::read (msg_t *msg_) { if (unlikely (!in_active)) return false; if (unlikely (state != active && state != waiting_for_delimiter)) return false; if (!inpipe->read (msg_)) { in_active = false; return false; } // If delimiter was read, start termination process of the pipe. if (msg_->is_delimiter ()) { process_delimiter (); return false; } if (!(msg_->flags () & msg_t::more)) msgs_read++; if (lwm > 0 && msgs_read % lwm == 0) send_activate_write (peer, msgs_read); return true; } bool zmq::pipe_t::check_write () { if (unlikely (!out_active || state != active)) return false; bool full = hwm > 0 && msgs_written - peers_msgs_read == uint64_t (hwm); if (unlikely (full)) { out_active = false; return false; } return true; } bool zmq::pipe_t::write (msg_t *msg_) { if (unlikely (!check_write ())) return false; bool more = msg_->flags () & msg_t::more ? true : false; outpipe->write (*msg_, more); if (!more) msgs_written++; return true; } void zmq::pipe_t::rollback () { // Remove incomplete message from the outbound pipe. msg_t msg; if (outpipe) { while (outpipe->unwrite (&msg)) { zmq_assert (msg.flags () & msg_t::more); int rc = msg.close (); errno_assert (rc == 0); } } } void zmq::pipe_t::flush () { // The peer does not exist anymore at this point. if (state == term_ack_sent) return; if (outpipe && !outpipe->flush ()) send_activate_read (peer); } void zmq::pipe_t::process_activate_read () { if (!in_active && (state == active || state == waiting_for_delimiter)) { in_active = true; sink->read_activated (this); } } void zmq::pipe_t::process_activate_write (uint64_t msgs_read_) { // Remember the peers's message sequence number. peers_msgs_read = msgs_read_; if (!out_active && state == active) { out_active = true; sink->write_activated (this); } } void zmq::pipe_t::process_hiccup (void *pipe_) { // Destroy old outpipe. Note that the read end of the pipe was already // migrated to this thread. zmq_assert (outpipe); outpipe->flush (); msg_t msg; while (outpipe->read (&msg)) { int rc = msg.close (); errno_assert (rc == 0); } delete outpipe; // Plug in the new outpipe. zmq_assert (pipe_); outpipe = (upipe_t*) pipe_; out_active = true; // If appropriate, notify the user about the hiccup. if (state == active) sink->hiccuped (this); } void zmq::pipe_t::process_pipe_term () { // This is the simple case of peer-induced termination. If there are no // more pending messages to read, or if the pipe was configured to drop // pending messages, we can move directly to the term_ack_sent state. // Otherwise we'll hang up in waiting_for_delimiter state till all // pending messages are read. if (state == active) { if (!delay) { state = term_ack_sent; outpipe = NULL; send_pipe_term_ack (peer); } else state = waiting_for_delimiter; return; } // Delimiter happened to arrive before the term command. Now we have the // term command as well, so we can move straight to term_ack_sent state. if (state == delimiter_received) { state = term_ack_sent; outpipe = NULL; send_pipe_term_ack (peer); return; } // This is the case where both ends of the pipe are closed in parallel. // We simply reply to the request by ack and continue waiting for our // own ack. if (state == term_req_sent1) { state = term_req_sent2; outpipe = NULL; send_pipe_term_ack (peer); return; } // pipe_term is invalid in other states. zmq_assert (false); } void zmq::pipe_t::process_pipe_term_ack () { // Notify the user that all the references to the pipe should be dropped. zmq_assert (sink); sink->pipe_terminated (this); // In term_ack_sent and term_req_sent2 states there's nothing to do. // Simply deallocate the pipe. In term_req_sent1 state we have to ack // the peer before deallocating this side of the pipe. // All the other states are invalid. if (state == term_req_sent1) { outpipe = NULL; send_pipe_term_ack (peer); } else zmq_assert (state == term_ack_sent || state == term_req_sent2); // We'll deallocate the inbound pipe, the peer will deallocate the outbound // pipe (which is an inbound pipe from its point of view). // First, delete all the unread messages in the pipe. We have to do it by // hand because msg_t doesn't have automatic destructor. Then deallocate // the ypipe itself. if (!conflate) { msg_t msg; while (inpipe->read (&msg)) { int rc = msg.close (); errno_assert (rc == 0); } } delete inpipe; // Deallocate the pipe object delete this; } void zmq::pipe_t::set_nodelay () { this->delay = false; } void zmq::pipe_t::terminate (bool delay_) { // Overload the value specified at pipe creation. delay = delay_; // If terminate was already called, we can ignore the duplicit invocation. if (state == term_req_sent1 || state == term_req_sent2) return; // If the pipe is in the final phase of async termination, it's going to // closed anyway. No need to do anything special here. else if (state == term_ack_sent) return; // The simple sync termination case. Ask the peer to terminate and wait // for the ack. else if (state == active) { send_pipe_term (peer); state = term_req_sent1; } // There are still pending messages available, but the user calls // 'terminate'. We can act as if all the pending messages were read. else if (state == waiting_for_delimiter && !delay) { outpipe = NULL; send_pipe_term_ack (peer); state = term_ack_sent; } // If there are pending messages still availabe, do nothing. else if (state == waiting_for_delimiter) { } // We've already got delimiter, but not term command yet. We can ignore // the delimiter and ack synchronously terminate as if we were in // active state. else if (state == delimiter_received) { send_pipe_term (peer); state = term_req_sent1; } // There are no other states. else zmq_assert (false); // Stop outbound flow of messages. out_active = false; if (outpipe) { // Drop any unfinished outbound messages. rollback (); // Write the delimiter into the pipe. Note that watermarks are not // checked; thus the delimiter can be written even when the pipe is full. msg_t msg; msg.init_delimiter (); outpipe->write (msg, false); flush (); } } bool zmq::pipe_t::is_delimiter (msg_t &msg_) { return msg_.is_delimiter (); } int zmq::pipe_t::compute_lwm (int hwm_) { // Compute the low water mark. Following point should be taken // into consideration: // // 1. LWM has to be less than HWM. // 2. LWM cannot be set to very low value (such as zero) as after filling // the queue it would start to refill only after all the messages are // read from it and thus unnecessarily hold the progress back. // 3. LWM cannot be set to very high value (such as HWM-1) as it would // result in lock-step filling of the queue - if a single message is // read from a full queue, writer thread is resumed to write exactly one // message to the queue and go back to sleep immediately. This would // result in low performance. // // Given the 3. it would be good to keep HWM and LWM as far apart as // possible to reduce the thread switching overhead to almost zero, // say HWM-LWM should be max_wm_delta. // // That done, we still we have to account for the cases where // HWM < max_wm_delta thus driving LWM to negative numbers. // Let's make LWM 1/2 of HWM in such cases. int result = (hwm_ > max_wm_delta * 2) ? hwm_ - max_wm_delta : (hwm_ + 1) / 2; return result; } void zmq::pipe_t::process_delimiter () { zmq_assert (state == active || state == waiting_for_delimiter); if (state == active) state = delimiter_received; else { outpipe = NULL; send_pipe_term_ack (peer); state = term_ack_sent; } } void zmq::pipe_t::hiccup () { // If termination is already under way do nothing. if (state != active) return; // We'll drop the pointer to the inpipe. From now on, the peer is // responsible for deallocating it. inpipe = NULL; // Create new inpipe. if (conflate) inpipe = new (std::nothrow) ypipe_conflate_t (); else inpipe = new (std::nothrow) ypipe_t (); alloc_assert (inpipe); in_active = true; // Notify the peer about the hiccup. send_hiccup (peer, (void*) inpipe); } void zmq::pipe_t::set_hwms (int inhwm_, int outhwm_) { lwm = compute_lwm (inhwm_); hwm = outhwm_; } zeromq3-4.0.4+dfsg.orig/src/blob.hpp0000644000175000017500000000716612240736636016174 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_BLOB_HPP_INCLUDED__ #define __ZMQ_BLOB_HPP_INCLUDED__ #include #include // Borrowed from id3lib_strings.h: // They seem to be doing something for MSC, but since I only have gcc, I'll just do that // Assuming this is uneccessary on GCC 4 // #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000)) #if (defined(__GNUC__) && (__GNUC__ >= 3) && (__GNUC__ <= 4)) namespace std { template<> struct char_traits { typedef unsigned char char_type; // Unsigned as wint_t in unsigned. typedef unsigned long int_type; typedef streampos pos_type; typedef streamoff off_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (!eq(__s1[__i], __s2[__i])) return lt(__s1[__i], __s2[__i]) ? -1 : 1; return 0; } static size_t length(const char_type* __s) { const char_type* __p = __s; while (__p) ++__p; return (__p - __s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (const char_type* __p = __s; size_t(__p - __s) < __n; ++__p) if (*__p == __a) return __p; return 0; } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return (char_type*) memmove(__s1, __s2, __n * sizeof(char_type)); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return (char_type*) memcpy(__s1, __s2, __n * sizeof(char_type)); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { for (char_type* __p = __s; __p < __s + __n; ++__p) assign(*__p, __a); return __s; } static char_type to_char_type(const int_type& __c) { return char_type(__c); } static int_type to_int_type(const char_type& __c) { return int_type(__c); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static int_type eof() { return static_cast(-1); } static int_type not_eof(const int_type& __c) { return eq_int_type(__c, eof()) ? int_type(0) : __c; } }; } // namespace std #endif // GCC version 3 namespace zmq { // Object to hold dynamically allocated opaque binary data. typedef std::basic_string blob_t; } #endif zeromq3-4.0.4+dfsg.orig/src/lb.hpp0000644000175000017500000000432312240736636015643 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_LB_HPP_INCLUDED__ #define __ZMQ_LB_HPP_INCLUDED__ #include "array.hpp" #include "pipe.hpp" namespace zmq { // This class manages a set of outbound pipes. On send it load balances // messages fairly among the pipes. class lb_t { public: lb_t (); ~lb_t (); void attach (pipe_t *pipe_); void activated (pipe_t *pipe_); void pipe_terminated (pipe_t *pipe_); int send (msg_t *msg_); // Sends a message and stores the pipe that was used in pipe_. // It is possible for this function to return success but keep pipe_ // unset if the rest of a multipart message to a terminated pipe is // being dropped. For the first frame, this will never happen. int sendpipe (msg_t *msg_, pipe_t **pipe_); bool has_out (); private: // List of outbound pipes. typedef array_t pipes_t; pipes_t pipes; // Number of active pipes. All the active pipes are located at the // beginning of the pipes array. pipes_t::size_type active; // Points to the last pipe that the most recent message was sent to. pipes_t::size_type current; // True if last we are in the middle of a multipart message. bool more; // True if we are dropping current message. bool dropping; lb_t (const lb_t&); const lb_t &operator = (const lb_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/libzmq.pc.in0000644000175000017500000000030012240736636016753 0ustar ghedoghedoprefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libzmq Description: 0MQ c++ library Version: @VERSION@ Libs: -L${libdir} -lzmq Cflags: -I${includedir} zeromq3-4.0.4+dfsg.orig/src/decoder.hpp0000644000175000017500000001411112240736636016647 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_DECODER_HPP_INCLUDED__ #define __ZMQ_DECODER_HPP_INCLUDED__ #include #include #include #include #include "err.hpp" #include "msg.hpp" #include "i_decoder.hpp" #include "stdint.hpp" namespace zmq { // Helper base class for decoders that know the amount of data to read // in advance at any moment. Knowing the amount in advance is a property // of the protocol used. 0MQ framing protocol is based size-prefixed // paradigm, whixh qualifies it to be parsed by this class. // On the other hand, XML-based transports (like XMPP or SOAP) don't allow // for knowing the size of data to read in advance and should use different // decoding algorithms. // // This class implements the state machine that parses the incoming buffer. // Derived class should implement individual state machine actions. template class decoder_base_t : public i_decoder { public: inline decoder_base_t (size_t bufsize_) : next (NULL), read_pos (NULL), to_read (0), bufsize (bufsize_) { buf = (unsigned char*) malloc (bufsize_); alloc_assert (buf); } // The destructor doesn't have to be virtual. It is mad virtual // just to keep ICC and code checking tools from complaining. inline virtual ~decoder_base_t () { free (buf); } // Returns a buffer to be filled with binary data. inline void get_buffer (unsigned char **data_, size_t *size_) { // If we are expected to read large message, we'll opt for zero- // copy, i.e. we'll ask caller to fill the data directly to the // message. Note that subsequent read(s) are non-blocking, thus // each single read reads at most SO_RCVBUF bytes at once not // depending on how large is the chunk returned from here. // As a consequence, large messages being received won't block // other engines running in the same I/O thread for excessive // amounts of time. if (to_read >= bufsize) { *data_ = read_pos; *size_ = to_read; return; } *data_ = buf; *size_ = bufsize; } // Processes the data in the buffer previously allocated using // get_buffer function. size_ argument specifies nemuber of bytes // actually filled into the buffer. Function returns 1 when the // whole message was decoded or 0 when more data is required. // On error, -1 is returned and errno set accordingly. // Number of bytes processed is returned in byts_used_. inline int decode (const unsigned char *data_, size_t size_, size_t &bytes_used_) { bytes_used_ = 0; // In case of zero-copy simply adjust the pointers, no copying // is required. Also, run the state machine in case all the data // were processed. if (data_ == read_pos) { zmq_assert (size_ <= to_read); read_pos += size_; to_read -= size_; bytes_used_ = size_; while (!to_read) { const int rc = (static_cast (this)->*next) (); if (rc != 0) return rc; } return 0; } while (bytes_used_ < size_) { // Copy the data from buffer to the message. const size_t to_copy = std::min (to_read, size_ - bytes_used_); memcpy (read_pos, data_ + bytes_used_, to_copy); read_pos += to_copy; to_read -= to_copy; bytes_used_ += to_copy; // Try to get more space in the message to fill in. // If none is available, return. while (to_read == 0) { const int rc = (static_cast (this)->*next) (); if (rc != 0) return rc; } } return 0; } protected: // Prototype of state machine action. Action should return false if // it is unable to push the data to the system. typedef int (T::*step_t) (); // This function should be called from derived class to read data // from the buffer and schedule next state machine action. inline void next_step (void *read_pos_, size_t to_read_, step_t next_) { read_pos = (unsigned char*) read_pos_; to_read = to_read_; next = next_; } private: // Next step. If set to NULL, it means that associated data stream // is dead. Note that there can be still data in the process in such // case. step_t next; // Where to store the read data. unsigned char *read_pos; // How much data to read before taking next step. size_t to_read; // The duffer for data to decode. size_t bufsize; unsigned char *buf; decoder_base_t (const decoder_base_t&); const decoder_base_t &operator = (const decoder_base_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/pair.cpp0000644000175000017500000000532212240736636016174 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "pair.hpp" #include "err.hpp" #include "pipe.hpp" #include "msg.hpp" zmq::pair_t::pair_t (class ctx_t *parent_, uint32_t tid_, int sid_) : socket_base_t (parent_, tid_, sid_), pipe (NULL) { options.type = ZMQ_PAIR; } zmq::pair_t::~pair_t () { zmq_assert (!pipe); } void zmq::pair_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { // subscribe_to_all_ is unused (void)subscribe_to_all_; zmq_assert (pipe_ != NULL); // ZMQ_PAIR socket can only be connected to a single peer. // The socket rejects any further connection requests. if (pipe == NULL) pipe = pipe_; else pipe_->terminate (false); } void zmq::pair_t::xpipe_terminated (pipe_t *pipe_) { if (pipe_ == pipe) pipe = NULL; } void zmq::pair_t::xread_activated (pipe_t *) { // There's just one pipe. No lists of active and inactive pipes. // There's nothing to do here. } void zmq::pair_t::xwrite_activated (pipe_t *) { // There's just one pipe. No lists of active and inactive pipes. // There's nothing to do here. } int zmq::pair_t::xsend (msg_t *msg_) { if (!pipe || !pipe->write (msg_)) { errno = EAGAIN; return -1; } if (!(msg_->flags () & msg_t::more)) pipe->flush (); // Detach the original message from the data buffer. int rc = msg_->init (); errno_assert (rc == 0); return 0; } int zmq::pair_t::xrecv (msg_t *msg_) { // Deallocate old content of the message. int rc = msg_->close (); errno_assert (rc == 0); if (!pipe || !pipe->read (msg_)) { // Initialise the output parameter to be a 0-byte message. rc = msg_->init (); errno_assert (rc == 0); errno = EAGAIN; return -1; } return 0; } bool zmq::pair_t::xhas_in () { if (!pipe) return false; return pipe->check_read (); } bool zmq::pair_t::xhas_out () { if (!pipe) return false; return pipe->check_write (); } zeromq3-4.0.4+dfsg.orig/src/ypipe_base.hpp0000644000175000017500000000260412240736636017366 0ustar ghedoghedo /* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_YPIPE_BASE_HPP_INCLUDED__ #define __ZMQ_YPIPE_BASE_HPP_INCLUDED__ namespace zmq { // ypipe_base abstracts ypipe and ypipe_conflate specific // classes, one is selected according to a the conflate // socket option template class ypipe_base_t { public: virtual ~ypipe_base_t () {} virtual void write (const T &value_, bool incomplete_) = 0; virtual bool unwrite (T *value_) = 0; virtual bool flush () = 0; virtual bool check_read () = 0; virtual bool read (T *value_) = 0; virtual bool probe (bool (*fn)(T &)) = 0; }; } #endif zeromq3-4.0.4+dfsg.orig/src/dealer.cpp0000644000175000017500000000540412240736636016476 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "dealer.hpp" #include "err.hpp" #include "msg.hpp" zmq::dealer_t::dealer_t (class ctx_t *parent_, uint32_t tid_, int sid_) : socket_base_t (parent_, tid_, sid_), probe_router (false) { options.type = ZMQ_DEALER; } zmq::dealer_t::~dealer_t () { } void zmq::dealer_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { // subscribe_to_all_ is unused (void) subscribe_to_all_; zmq_assert (pipe_); if (probe_router) { msg_t probe_msg_; int rc = probe_msg_.init (); errno_assert (rc == 0); rc = pipe_->write (&probe_msg_); // zmq_assert (rc) is not applicable here, since it is not a bug. pipe_->flush (); rc = probe_msg_.close (); errno_assert (rc == 0); } fq.attach (pipe_); lb.attach (pipe_); } int zmq::dealer_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { bool is_int = (optvallen_ == sizeof (int)); int value = is_int? *((int *) optval_): 0; switch (option_) { case ZMQ_PROBE_ROUTER: if (is_int && value >= 0) { probe_router = (value != 0); return 0; } break; default: break; } errno = EINVAL; return -1; } int zmq::dealer_t::xsend (msg_t *msg_) { return sendpipe (msg_, NULL); } int zmq::dealer_t::xrecv (msg_t *msg_) { return recvpipe (msg_, NULL); } bool zmq::dealer_t::xhas_in () { return fq.has_in (); } bool zmq::dealer_t::xhas_out () { return lb.has_out (); } void zmq::dealer_t::xread_activated (pipe_t *pipe_) { fq.activated (pipe_); } void zmq::dealer_t::xwrite_activated (pipe_t *pipe_) { lb.activated (pipe_); } void zmq::dealer_t::xpipe_terminated (pipe_t *pipe_) { fq.pipe_terminated (pipe_); lb.pipe_terminated (pipe_); } int zmq::dealer_t::sendpipe (msg_t *msg_, pipe_t **pipe_) { return lb.sendpipe (msg_, pipe_); } int zmq::dealer_t::recvpipe (msg_t *msg_, pipe_t **pipe_) { return fq.recvpipe (msg_, pipe_); } zeromq3-4.0.4+dfsg.orig/src/signaler.cpp0000644000175000017500000003355112251014562017037 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_FORCE_SELECT #define ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #elif defined ZMQ_FORCE_POLL #define ZMQ_SIGNALER_WAIT_BASED_ON_POLL #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ defined ZMQ_HAVE_NETBSD #define ZMQ_SIGNALER_WAIT_BASED_ON_POLL #elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS ||\ defined ZMQ_HAVE_CYGWIN #define ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #endif // On AIX, poll.h has to be included before zmq.h to get consistent // definition of pollfd structure (AIX uses 'reqevents' and 'retnevents' // instead of 'events' and 'revents' and defines macros to map from POSIX-y // names to AIX-specific names). #if defined ZMQ_SIGNALER_WAIT_BASED_ON_POLL #include #elif defined ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #elif defined ZMQ_HAVE_HPUX #include #include #include #elif defined ZMQ_HAVE_OPENVMS #include #include #else #include #endif #endif #include "signaler.hpp" #include "likely.hpp" #include "stdint.hpp" #include "config.hpp" #include "err.hpp" #include "fd.hpp" #include "ip.hpp" #if defined ZMQ_HAVE_EVENTFD #include #endif #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #include #endif zmq::signaler_t::signaler_t () { // Create the socketpair for signaling. if (make_fdpair (&r, &w) == 0) { unblock_socket (w); unblock_socket (r); } #ifdef HAVE_FORK pid = getpid(); #endif } zmq::signaler_t::~signaler_t () { #if defined ZMQ_HAVE_EVENTFD int rc = close (r); errno_assert (rc == 0); #elif defined ZMQ_HAVE_WINDOWS struct linger so_linger = { 1, 0 }; int rc = setsockopt (w, SOL_SOCKET, SO_LINGER, (char *)&so_linger, sizeof (so_linger)); wsa_assert (rc != SOCKET_ERROR); rc = closesocket (w); wsa_assert (rc != SOCKET_ERROR); rc = closesocket (r); wsa_assert (rc != SOCKET_ERROR); #else int rc = close (w); errno_assert (rc == 0); rc = close (r); errno_assert (rc == 0); #endif } zmq::fd_t zmq::signaler_t::get_fd () { return r; } void zmq::signaler_t::send () { #if HAVE_FORK if (unlikely(pid != getpid())) { //printf("Child process %d signaler_t::send returning without sending #1\n", getpid()); return; // do not send anything in forked child context } #endif #if defined ZMQ_HAVE_EVENTFD const uint64_t inc = 1; ssize_t sz = write (w, &inc, sizeof (inc)); errno_assert (sz == sizeof (inc)); #elif defined ZMQ_HAVE_WINDOWS unsigned char dummy = 0; int nbytes = ::send (w, (char*) &dummy, sizeof (dummy), 0); wsa_assert (nbytes != SOCKET_ERROR); zmq_assert (nbytes == sizeof (dummy)); #else unsigned char dummy = 0; while (true) { ssize_t nbytes = ::send (w, &dummy, sizeof (dummy), 0); if (unlikely (nbytes == -1 && errno == EINTR)) continue; #if HAVE_FORK if (unlikely(pid != getpid())) { //printf("Child process %d signaler_t::send returning without sending #2\n", getpid()); errno = EINTR; break; } #endif zmq_assert (nbytes == sizeof (dummy)); break; } #endif } int zmq::signaler_t::wait (int timeout_) { #ifdef HAVE_FORK if (unlikely(pid != getpid())) { // we have forked and the file descriptor is closed. Emulate an interupt // response. //printf("Child process %d signaler_t::wait returning simulating interrupt #1\n", getpid()); errno = EINTR; return -1; } #endif #ifdef ZMQ_SIGNALER_WAIT_BASED_ON_POLL struct pollfd pfd; pfd.fd = r; pfd.events = POLLIN; int rc = poll (&pfd, 1, timeout_); if (unlikely (rc < 0)) { errno_assert (errno == EINTR); return -1; } else if (unlikely (rc == 0)) { errno = EAGAIN; return -1; } #ifdef HAVE_FORK if (unlikely(pid != getpid())) { // we have forked and the file descriptor is closed. Emulate an interupt // response. //printf("Child process %d signaler_t::wait returning simulating interrupt #2\n", getpid()); errno = EINTR; return -1; } #endif zmq_assert (rc == 1); zmq_assert (pfd.revents & POLLIN); return 0; #elif defined ZMQ_SIGNALER_WAIT_BASED_ON_SELECT fd_set fds; FD_ZERO (&fds); FD_SET (r, &fds); struct timeval timeout; if (timeout_ >= 0) { timeout.tv_sec = timeout_ / 1000; timeout.tv_usec = timeout_ % 1000 * 1000; } #ifdef ZMQ_HAVE_WINDOWS int rc = select (0, &fds, NULL, NULL, timeout_ >= 0 ? &timeout : NULL); wsa_assert (rc != SOCKET_ERROR); #else int rc = select (r + 1, &fds, NULL, NULL, timeout_ >= 0 ? &timeout : NULL); if (unlikely (rc < 0)) { errno_assert (errno == EINTR); return -1; } #endif if (unlikely (rc == 0)) { errno = EAGAIN; return -1; } zmq_assert (rc == 1); return 0; #else #error #endif } void zmq::signaler_t::recv () { // Attempt to read a signal. #if defined ZMQ_HAVE_EVENTFD uint64_t dummy; ssize_t sz = read (r, &dummy, sizeof (dummy)); errno_assert (sz == sizeof (dummy)); // If we accidentally grabbed the next signal along with the current // one, return it back to the eventfd object. if (unlikely (dummy == 2)) { const uint64_t inc = 1; ssize_t sz2 = write (w, &inc, sizeof (inc)); errno_assert (sz2 == sizeof (inc)); return; } zmq_assert (dummy == 1); #else unsigned char dummy; #if defined ZMQ_HAVE_WINDOWS int nbytes = ::recv (r, (char*) &dummy, sizeof (dummy), 0); wsa_assert (nbytes != SOCKET_ERROR); #else ssize_t nbytes = ::recv (r, &dummy, sizeof (dummy), 0); errno_assert (nbytes >= 0); #endif zmq_assert (nbytes == sizeof (dummy)); zmq_assert (dummy == 0); #endif } #ifdef HAVE_FORK void zmq::signaler_t::forked() { // Close file descriptors created in the parent and create new pair close (r); close (w); make_fdpair (&r, &w); } #endif // Returns -1 if we could not make the socket pair successfully int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_) { #if defined ZMQ_HAVE_EVENTFD fd_t fd = eventfd (0, 0); if (fd == -1) { errno_assert (errno == ENFILE || errno == EMFILE); *w_ = *r_ = -1; return -1; } else { *w_ = *r_ = fd; return 0; } #elif defined ZMQ_HAVE_WINDOWS # if !defined _WIN32_WCE // Windows CE does not manage security attributes SECURITY_DESCRIPTOR sd; SECURITY_ATTRIBUTES sa; memset (&sd, 0, sizeof (sd)); memset (&sa, 0, sizeof (sa)); InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); SetSecurityDescriptorDacl(&sd, TRUE, 0, FALSE); sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = &sd; # endif // This function has to be in a system-wide critical section so that // two instances of the library don't accidentally create signaler // crossing the process boundary. // We'll use named event object to implement the critical section. // Note that if the event object already exists, the CreateEvent requests // EVENT_ALL_ACCESS access right. If this fails, we try to open // the event object asking for SYNCHRONIZE access only. # if !defined _WIN32_WCE HANDLE sync = CreateEvent (&sa, FALSE, TRUE, TEXT ("Global\\zmq-signaler-port-sync")); # else HANDLE sync = CreateEvent (NULL, FALSE, TRUE, TEXT ("Global\\zmq-signaler-port-sync")); # endif if (sync == NULL && GetLastError () == ERROR_ACCESS_DENIED) sync = OpenEvent (SYNCHRONIZE | EVENT_MODIFY_STATE, FALSE, TEXT ("Global\\zmq-signaler-port-sync")); win_assert (sync != NULL); // Windows has no 'socketpair' function. CreatePipe is no good as pipe // handles cannot be polled on. Here we create the socketpair by hand. *w_ = INVALID_SOCKET; *r_ = INVALID_SOCKET; // Create listening socket. SOCKET listener; listener = open_socket (AF_INET, SOCK_STREAM, 0); wsa_assert (listener != INVALID_SOCKET); // Set SO_REUSEADDR and TCP_NODELAY on listening socket. BOOL so_reuseaddr = 1; int rc = setsockopt (listener, SOL_SOCKET, SO_REUSEADDR, (char *)&so_reuseaddr, sizeof (so_reuseaddr)); wsa_assert (rc != SOCKET_ERROR); BOOL tcp_nodelay = 1; rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELAY, (char *)&tcp_nodelay, sizeof (tcp_nodelay)); wsa_assert (rc != SOCKET_ERROR); // Init sockaddr to signaler port. struct sockaddr_in addr; memset (&addr, 0, sizeof (addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); addr.sin_port = htons (signaler_port); // Create the writer socket. *w_ = open_socket (AF_INET, SOCK_STREAM, 0); wsa_assert (*w_ != INVALID_SOCKET); // Set TCP_NODELAY on writer socket. rc = setsockopt (*w_, IPPROTO_TCP, TCP_NODELAY, (char *)&tcp_nodelay, sizeof (tcp_nodelay)); wsa_assert (rc != SOCKET_ERROR); // Enter the critical section. DWORD dwrc = WaitForSingleObject (sync, INFINITE); zmq_assert (dwrc == WAIT_OBJECT_0); // Bind listening socket to signaler port. rc = bind (listener, (const struct sockaddr*) &addr, sizeof (addr)); // Listen for incoming connections. if (rc != SOCKET_ERROR) rc = listen (listener, 1); // Connect writer to the listener. if (rc != SOCKET_ERROR) rc = connect (*w_, (struct sockaddr*) &addr, sizeof (addr)); // Accept connection from writer. if (rc != SOCKET_ERROR) *r_ = accept (listener, NULL, NULL); // Save errno if error occurred in bind/listen/connect/accept. int saved_errno = 0; if (*r_ == INVALID_SOCKET) saved_errno = WSAGetLastError (); // We don't need the listening socket anymore. Close it. closesocket (listener); // Exit the critical section. BOOL brc = SetEvent (sync); win_assert (brc != 0); // Release the kernel object brc = CloseHandle (sync); win_assert (brc != 0); if (*r_ != INVALID_SOCKET) { # if !defined _WIN32_WCE // On Windows, preventing sockets to be inherited by child processes. brc = SetHandleInformation ((HANDLE) *r_, HANDLE_FLAG_INHERIT, 0); win_assert (brc); # endif return 0; } else { // Cleanup writer if connection failed if (*w_ != INVALID_SOCKET) { rc = closesocket (*w_); wsa_assert (rc != SOCKET_ERROR); *w_ = INVALID_SOCKET; } // Set errno from saved value errno = wsa_error_to_errno (saved_errno); return -1; } #elif defined ZMQ_HAVE_OPENVMS // Whilst OpenVMS supports socketpair - it maps to AF_INET only. Further, // it does not set the socket options TCP_NODELAY and TCP_NODELACK which // can lead to performance problems. // // The bug will be fixed in V5.6 ECO4 and beyond. In the meantime, we'll // create the socket pair manually. struct sockaddr_in lcladdr; memset (&lcladdr, 0, sizeof (lcladdr)); lcladdr.sin_family = AF_INET; lcladdr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); lcladdr.sin_port = 0; int listener = open_socket (AF_INET, SOCK_STREAM, 0); errno_assert (listener != -1); int on = 1; int rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on)); errno_assert (rc != -1); rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELACK, &on, sizeof (on)); errno_assert (rc != -1); rc = bind (listener, (struct sockaddr*) &lcladdr, sizeof (lcladdr)); errno_assert (rc != -1); socklen_t lcladdr_len = sizeof (lcladdr); rc = getsockname (listener, (struct sockaddr*) &lcladdr, &lcladdr_len); errno_assert (rc != -1); rc = listen (listener, 1); errno_assert (rc != -1); *w_ = open_socket (AF_INET, SOCK_STREAM, 0); errno_assert (*w_ != -1); rc = setsockopt (*w_, IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on)); errno_assert (rc != -1); rc = setsockopt (*w_, IPPROTO_TCP, TCP_NODELACK, &on, sizeof (on)); errno_assert (rc != -1); rc = connect (*w_, (struct sockaddr*) &lcladdr, sizeof (lcladdr)); errno_assert (rc != -1); *r_ = accept (listener, NULL, NULL); errno_assert (*r_ != -1); close (listener); return 0; #else // All other implementations support socketpair() int sv [2]; int rc = socketpair (AF_UNIX, SOCK_STREAM, 0, sv); if (rc == -1) { errno_assert (errno == ENFILE || errno == EMFILE); *w_ = *r_ = -1; return -1; } else { *w_ = sv [0]; *r_ = sv [1]; return 0; } #endif } #if defined ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #undef ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #endif #if defined ZMQ_SIGNALER_WAIT_BASED_ON_POLL #undef ZMQ_SIGNALER_WAIT_BASED_ON_POLL #endif zeromq3-4.0.4+dfsg.orig/src/mutex.hpp0000644000175000017500000000621712240736636016414 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_MUTEX_HPP_INCLUDED__ #define __ZMQ_MUTEX_HPP_INCLUDED__ #include "platform.hpp" #include "err.hpp" // Mutex class encapsulates OS mutex in a platform-independent way. #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" namespace zmq { class mutex_t { public: inline mutex_t () { InitializeCriticalSection (&cs); } inline ~mutex_t () { DeleteCriticalSection (&cs); } inline void lock () { EnterCriticalSection (&cs); } inline bool try_lock () { return (TryEnterCriticalSection (&cs)) ? true : false; } inline void unlock () { LeaveCriticalSection (&cs); } private: CRITICAL_SECTION cs; // Disable copy construction and assignment. mutex_t (const mutex_t&); void operator = (const mutex_t&); }; } #else #include namespace zmq { class mutex_t { public: inline mutex_t () { int rc = pthread_mutex_init (&mutex, NULL); posix_assert (rc); } inline ~mutex_t () { int rc = pthread_mutex_destroy (&mutex); posix_assert (rc); } inline void lock () { int rc = pthread_mutex_lock (&mutex); posix_assert (rc); } inline bool try_lock () { int rc = pthread_mutex_trylock (&mutex); if (rc == EBUSY) return false; posix_assert (rc); return true; } inline void unlock () { int rc = pthread_mutex_unlock (&mutex); posix_assert (rc); } private: pthread_mutex_t mutex; // Disable copy construction and assignment. mutex_t (const mutex_t&); const mutex_t &operator = (const mutex_t&); }; } #endif namespace zmq { struct scoped_lock_t { scoped_lock_t (mutex_t& mutex_) : mutex (mutex_) { mutex.lock (); } ~scoped_lock_t () { mutex.unlock (); } private: mutex_t& mutex; // Disable copy construction and assignment. scoped_lock_t (const scoped_lock_t&); const scoped_lock_t &operator = (const scoped_lock_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/select.hpp0000644000175000017500000000577212240736636016536 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SELECT_HPP_INCLUDED__ #define __ZMQ_SELECT_HPP_INCLUDED__ // poller.hpp decides which polling mechanism to use. #include "poller.hpp" #if defined ZMQ_USE_SELECT #include "platform.hpp" #include #include #ifdef ZMQ_HAVE_WINDOWS #include "winsock2.h" #elif defined ZMQ_HAVE_OPENVMS #include #include #else #include #endif #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { struct i_poll_events; // Implements socket polling mechanism using POSIX.1-2001 select() // function. class select_t : public poller_base_t { public: typedef fd_t handle_t; select_t (); ~select_t (); // "poller" concept. handle_t add_fd (fd_t fd_, zmq::i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); static int max_fds (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); struct fd_entry_t { fd_t fd; zmq::i_poll_events *events; }; // Checks if an fd_entry_t is retired. static bool is_retired_fd (const fd_entry_t &entry); // Set of file descriptors that are used to retreive // information for fd_set. typedef std::vector fd_set_t; fd_set_t fds; fd_set source_set_in; fd_set source_set_out; fd_set source_set_err; fd_set readfds; fd_set writefds; fd_set exceptfds; // Maximum file descriptor. fd_t maxfd; // If true, at least one file descriptor has retired. bool retired; // If true, thread is shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; select_t (const select_t&); const select_t &operator = (const select_t&); }; typedef select_t poller_t; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/atomic_counter.hpp0000644000175000017500000001445512240736636020270 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ATOMIC_COUNTER_HPP_INCLUDED__ #define __ZMQ_ATOMIC_COUNTER_HPP_INCLUDED__ #include "stdint.hpp" #include "platform.hpp" #if defined ZMQ_FORCE_MUTEXES #define ZMQ_ATOMIC_COUNTER_MUTEX #elif (defined __i386__ || defined __x86_64__) && defined __GNUC__ #define ZMQ_ATOMIC_COUNTER_X86 #elif defined __ARM_ARCH_7A__ && defined __GNUC__ #define ZMQ_ATOMIC_COUNTER_ARM #elif defined ZMQ_HAVE_WINDOWS #define ZMQ_ATOMIC_COUNTER_WINDOWS #elif (defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_NETBSD) #define ZMQ_ATOMIC_COUNTER_ATOMIC_H #elif defined __tile__ #define ZMQ_ATOMIC_COUNTER_TILE #else #define ZMQ_ATOMIC_COUNTER_MUTEX #endif #if defined ZMQ_ATOMIC_COUNTER_MUTEX #include "mutex.hpp" #elif defined ZMQ_ATOMIC_COUNTER_WINDOWS #include "windows.hpp" #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H #include #elif defined ZMQ_ATOMIC_COUNTER_TILE #include #endif namespace zmq { // This class represents an integer that can be incremented/decremented // in atomic fashion. class atomic_counter_t { public: typedef uint32_t integer_t; inline atomic_counter_t (integer_t value_ = 0) : value (value_) { } inline ~atomic_counter_t () { } // Set counter value (not thread-safe). inline void set (integer_t value_) { value = value_; } // Atomic addition. Returns the old value. inline integer_t add (integer_t increment_) { integer_t old_value; #if defined ZMQ_ATOMIC_COUNTER_WINDOWS old_value = InterlockedExchangeAdd ((LONG*) &value, increment_); #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H integer_t new_value = atomic_add_32_nv (&value, increment_); old_value = new_value - increment_; #elif defined ZMQ_ATOMIC_COUNTER_TILE old_value = arch_atomic_add (&value, increment_); #elif defined ZMQ_ATOMIC_COUNTER_X86 __asm__ volatile ( "lock; xadd %0, %1 \n\t" : "=r" (old_value), "=m" (value) : "0" (increment_), "m" (value) : "cc", "memory"); #elif defined ZMQ_ATOMIC_COUNTER_ARM integer_t flag, tmp; __asm__ volatile ( " dmb sy\n\t" "1: ldrex %0, [%5]\n\t" " add %2, %0, %4\n\t" " strex %1, %2, [%5]\n\t" " teq %1, #0\n\t" " bne 1b\n\t" " dmb sy\n\t" : "=&r"(old_value), "=&r"(flag), "=&r"(tmp), "+Qo"(value) : "Ir"(increment_), "r"(&value) : "cc"); #elif defined ZMQ_ATOMIC_COUNTER_MUTEX sync.lock (); old_value = value; value += increment_; sync.unlock (); #else #error atomic_counter is not implemented for this platform #endif return old_value; } // Atomic subtraction. Returns false if the counter drops to zero. inline bool sub (integer_t decrement) { #if defined ZMQ_ATOMIC_COUNTER_WINDOWS LONG delta = - ((LONG) decrement); integer_t old = InterlockedExchangeAdd ((LONG*) &value, delta); return old - decrement != 0; #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H int32_t delta = - ((int32_t) decrement); integer_t nv = atomic_add_32_nv (&value, delta); return nv != 0; #elif defined ZMQ_ATOMIC_COUNTER_TILE int32_t delta = - ((int32_t) decrement); integer_t nv = arch_atomic_add (&value, delta); return nv != 0; #elif defined ZMQ_ATOMIC_COUNTER_X86 integer_t oldval = -decrement; volatile integer_t *val = &value; __asm__ volatile ("lock; xaddl %0,%1" : "=r" (oldval), "=m" (*val) : "0" (oldval), "m" (*val) : "cc", "memory"); return oldval != decrement; #elif defined ZMQ_ATOMIC_COUNTER_ARM integer_t old_value, flag, tmp; __asm__ volatile ( " dmb sy\n\t" "1: ldrex %0, [%5]\n\t" " sub %2, %0, %4\n\t" " strex %1, %2, [%5]\n\t" " teq %1, #0\n\t" " bne 1b\n\t" " dmb sy\n\t" : "=&r"(old_value), "=&r"(flag), "=&r"(tmp), "+Qo"(value) : "Ir"(decrement), "r"(&value) : "cc"); return old_value - decrement != 0; #elif defined ZMQ_ATOMIC_COUNTER_MUTEX sync.lock (); value -= decrement; bool result = value ? true : false; sync.unlock (); return result; #else #error atomic_counter is not implemented for this platform #endif } inline integer_t get () { return value; } private: volatile integer_t value; #if defined ZMQ_ATOMIC_COUNTER_MUTEX mutex_t sync; #endif atomic_counter_t (const atomic_counter_t&); const atomic_counter_t& operator = (const atomic_counter_t&); }; } // Remove macros local to this file. #if defined ZMQ_ATOMIC_COUNTER_WINDOWS #undef ZMQ_ATOMIC_COUNTER_WINDOWS #endif #if defined ZMQ_ATOMIC_COUNTER_ATOMIC_H #undef ZMQ_ATOMIC_COUNTER_ATOMIC_H #endif #if defined ZMQ_ATOMIC_COUNTER_X86 #undef ZMQ_ATOMIC_COUNTER_X86 #endif #if defined ZMQ_ATOMIC_COUNTER_ARM #undef ZMQ_ATOMIC_COUNTER_ARM #endif #if defined ZMQ_ATOMIC_COUNTER_MUTEX #undef ZMQ_ATOMIC_COUNTER_MUTEX #endif #endif zeromq3-4.0.4+dfsg.orig/src/libzmq.vers0000644000175000017500000000004212307426216016720 0ustar ghedoghedo{ global: zmq_*; local: *; }; zeromq3-4.0.4+dfsg.orig/src/ipc_address.cpp0000644000175000017500000000506112240736636017521 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "ipc_address.hpp" #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS #include "err.hpp" #include #include zmq::ipc_address_t::ipc_address_t () { memset (&address, 0, sizeof (address)); } zmq::ipc_address_t::ipc_address_t (const sockaddr *sa, socklen_t sa_len) { zmq_assert(sa && sa_len > 0); memset (&address, 0, sizeof (address)); if (sa->sa_family == AF_UNIX) { memcpy(&address, sa, sa_len); } } zmq::ipc_address_t::~ipc_address_t () { } int zmq::ipc_address_t::resolve (const char *path_) { if (strlen (path_) >= sizeof (address.sun_path)) { errno = ENAMETOOLONG; return -1; } #if defined ZMQ_HAVE_LINUX if (path_[0] == '@' && !path_[1]) { errno = EINVAL; return -1; } #endif address.sun_family = AF_UNIX; strcpy (address.sun_path, path_); #if defined ZMQ_HAVE_LINUX /* Abstract sockets on Linux start with '\0' */ if (path_[0] == '@') *address.sun_path = '\0'; #endif return 0; } int zmq::ipc_address_t::to_string (std::string &addr_) { if (address.sun_family != AF_UNIX) { addr_.clear (); return -1; } std::stringstream s; #if !defined ZMQ_HAVE_LINUX s << "ipc://" << address.sun_path; #else s << "ipc://"; if (!address.sun_path[0] && address.sun_path[1]) s << "@" << address.sun_path + 1; else s << address.sun_path; #endif addr_ = s.str (); return 0; } const sockaddr *zmq::ipc_address_t::addr () const { return (sockaddr*) &address; } socklen_t zmq::ipc_address_t::addrlen () const { #if defined ZMQ_HAVE_LINUX if (!address.sun_path[0] && address.sun_path[1]) return (socklen_t) strlen(address.sun_path + 1) + sizeof (sa_family_t) + 1; #endif return (socklen_t) sizeof (address); } #endif zeromq3-4.0.4+dfsg.orig/src/v1_encoder.hpp0000644000175000017500000000250012240736636017266 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_V1_ENCODER_HPP_INCLUDED__ #define __ZMQ_V1_ENCODER_HPP_INCLUDED__ #include "encoder.hpp" namespace zmq { // Encoder for ZMTP/1.0 protocol. Converts messages into data batches. class v1_encoder_t : public encoder_base_t { public: v1_encoder_t (size_t bufsize_); ~v1_encoder_t (); private: void size_ready (); void message_ready (); unsigned char tmpbuf [10]; v1_encoder_t (const v1_encoder_t&); const v1_encoder_t &operator = (const v1_encoder_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/random.cpp0000644000175000017500000000260012240736636016515 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #endif #include "random.hpp" #include "stdint.hpp" #include "clock.hpp" void zmq::seed_random () { #if defined ZMQ_HAVE_WINDOWS int pid = (int) GetCurrentProcessId (); #else int pid = (int) getpid (); #endif srand ((unsigned int) (clock_t::now_us () + pid)); } uint32_t zmq::generate_random () { // Compensate for the fact that rand() returns signed integer. uint32_t low = (uint32_t) rand (); uint32_t high = (uint32_t) rand (); high <<= (sizeof (int) * 8 - 1); return high | low; } zeromq3-4.0.4+dfsg.orig/src/epoll.hpp0000644000175000017500000000474312240736636016367 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_EPOLL_HPP_INCLUDED__ #define __ZMQ_EPOLL_HPP_INCLUDED__ // poller.hpp decides which polling mechanism to use. #include "poller.hpp" #if defined ZMQ_USE_EPOLL #include #include #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { struct i_poll_events; // This class implements socket polling mechanism using the Linux-specific // epoll mechanism. class epoll_t : public poller_base_t { public: typedef void* handle_t; epoll_t (); ~epoll_t (); // "poller" concept. handle_t add_fd (fd_t fd_, zmq::i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); static int max_fds (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); // Main epoll file descriptor fd_t epoll_fd; struct poll_entry_t { fd_t fd; epoll_event ev; zmq::i_poll_events *events; }; // List of retired event sources. typedef std::vector retired_t; retired_t retired; // If true, thread is in the process of shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; epoll_t (const epoll_t&); const epoll_t &operator = (const epoll_t&); }; typedef epoll_t poller_t; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/own.hpp0000644000175000017500000001151612240736636016053 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_OWN_HPP_INCLUDED__ #define __ZMQ_OWN_HPP_INCLUDED__ #include #include #include "object.hpp" #include "options.hpp" #include "atomic_counter.hpp" #include "stdint.hpp" namespace zmq { class ctx_t; class io_thread_t; // Base class for objects forming a part of ownership hierarchy. // It handles initialisation and destruction of such objects. class own_t : public object_t { public: // Note that the owner is unspecified in the constructor. // It'll be supplied later on when the object is plugged in. // The object is not living within an I/O thread. It has it's own // thread outside of 0MQ infrastructure. own_t (zmq::ctx_t *parent_, uint32_t tid_); // The object is living within I/O thread. own_t (zmq::io_thread_t *io_thread_, const options_t &options_); // When another owned object wants to send command to this object // it calls this function to let it know it should not shut down // before the command is delivered. void inc_seqnum (); // Use following two functions to wait for arbitrary events before // terminating. Just add number of events to wait for using // register_tem_acks functions. When event occurs, call // remove_term_ack. When number of pending acks reaches zero // object will be deallocated. void register_term_acks (int count_); void unregister_term_ack (); protected: // Launch the supplied object and become its owner. void launch_child (own_t *object_); // Terminate owned object void term_child (own_t *object_); // Ask owner object to terminate this object. It may take a while // while actual termination is started. This function should not be // called more than once. void terminate (); // Returns true if the object is in process of termination. bool is_terminating (); // Derived object destroys own_t. There's no point in allowing // others to invoke the destructor. At the same time, it has to be // virtual so that generic own_t deallocation mechanism destroys // specific type of the owned object correctly. virtual ~own_t (); // Term handler is protocted rather than private so that it can // be intercepted by the derived class. This is useful to add custom // steps to the beginning of the termination process. void process_term (int linger_); // A place to hook in when phyicallal destruction of the object // is to be delayed. virtual void process_destroy (); // Socket options associated with this object. options_t options; private: // Set owner of the object void set_owner (own_t *owner_); // Handlers for incoming commands. void process_own (own_t *object_); void process_term_req (own_t *object_); void process_term_ack (); void process_seqnum (); // Check whether all the peding term acks were delivered. // If so, deallocate this object. void check_term_acks (); // True if termination was already initiated. If so, we can destroy // the object if there are no more child objects or pending term acks. bool terminating; // Sequence number of the last command sent to this object. atomic_counter_t sent_seqnum; // Sequence number of the last command processed by this object. uint64_t processed_seqnum; // Socket owning this object. It's responsible for shutting down // this object. own_t *owner; // List of all objects owned by this socket. We are responsible // for deallocating them before we quit. typedef std::set owned_t; owned_t owned; // Number of events we have to get before we can destroy the object. int term_acks; own_t (const own_t&); const own_t &operator = (const own_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/ip.cpp0000644000175000017500000000776612307426216015661 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "ip.hpp" #include "err.hpp" #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #include #include #endif #if defined ZMQ_HAVE_OPENVMS #include #endif zmq::fd_t zmq::open_socket (int domain_, int type_, int protocol_) { // Setting this option result in sane behaviour when exec() functions // are used. Old sockets are closed and don't block TCP ports etc. #if defined ZMQ_HAVE_SOCK_CLOEXEC type_ |= SOCK_CLOEXEC; #endif fd_t s = socket (domain_, type_, protocol_); #ifdef ZMQ_HAVE_WINDOWS if (s == INVALID_SOCKET) return INVALID_SOCKET; #else if (s == -1) return -1; #endif // If there's no SOCK_CLOEXEC, let's try the second best option. Note that // race condition can cause socket not to be closed (if fork happens // between socket creation and this point). #if !defined ZMQ_HAVE_SOCK_CLOEXEC && defined FD_CLOEXEC int rc = fcntl (s, F_SETFD, FD_CLOEXEC); errno_assert (rc != -1); #endif // On Windows, preventing sockets to be inherited by child processes. #if defined ZMQ_HAVE_WINDOWS && defined HANDLE_FLAG_INHERIT BOOL brc = SetHandleInformation ((HANDLE) s, HANDLE_FLAG_INHERIT, 0); win_assert (brc); #endif return s; } void zmq::unblock_socket (fd_t s_) { #if defined ZMQ_HAVE_WINDOWS u_long nonblock = 1; int rc = ioctlsocket (s_, FIONBIO, &nonblock); wsa_assert (rc != SOCKET_ERROR); #elif defined ZMQ_HAVE_OPENVMS int nonblock = 1; int rc = ioctl (s_, FIONBIO, &nonblock); errno_assert (rc != -1); #else int flags = fcntl (s_, F_GETFL, 0); if (flags == -1) flags = 0; int rc = fcntl (s_, F_SETFL, flags | O_NONBLOCK); errno_assert (rc != -1); #endif } void zmq::enable_ipv4_mapping (fd_t s_) { (void) s_; #ifdef IPV6_V6ONLY #ifdef ZMQ_HAVE_WINDOWS DWORD flag = 0; #else int flag = 0; #endif int rc = setsockopt (s_, IPPROTO_IPV6, IPV6_V6ONLY, (const char*) &flag, sizeof (flag)); #ifdef ZMQ_HAVE_WINDOWS wsa_assert (rc != SOCKET_ERROR); #else errno_assert (rc == 0); #endif #endif } bool zmq::get_peer_ip_address (fd_t sockfd_, std::string &ip_addr_) { int rc; struct sockaddr_storage ss; #if defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_WINDOWS int addrlen = static_cast (sizeof ss); #else socklen_t addrlen = sizeof ss; #endif rc = getpeername (sockfd_, (struct sockaddr*) &ss, &addrlen); #ifdef ZMQ_HAVE_WINDOWS if (rc == SOCKET_ERROR) { wsa_assert (WSAGetLastError () != WSANOTINITIALISED && WSAGetLastError () != WSAEFAULT && WSAGetLastError () != WSAEINPROGRESS && WSAGetLastError () != WSAENOTSOCK); return false; } #else if (rc == -1) { errno_assert (errno != EBADF && errno != EFAULT && errno != EINVAL && errno != ENOTSOCK); return false; } #endif char host [NI_MAXHOST]; rc = getnameinfo ((struct sockaddr*) &ss, addrlen, host, sizeof host, NULL, 0, NI_NUMERICHOST); if (rc != 0) return false; ip_addr_ = host; return true; } zeromq3-4.0.4+dfsg.orig/src/proxy.hpp0000644000175000017500000000174412240736636016433 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PROXY_HPP_INCLUDED__ #define __ZMQ_PROXY_HPP_INCLUDED__ namespace zmq { int proxy ( class socket_base_t *frontend_, class socket_base_t *backend_, class socket_base_t *control_); } #endif zeromq3-4.0.4+dfsg.orig/src/pgm_receiver.hpp0000644000175000017500000000746412240736636017726 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PGM_RECEIVER_HPP_INCLUDED__ #define __ZMQ_PGM_RECEIVER_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include #include #include "io_object.hpp" #include "i_engine.hpp" #include "options.hpp" #include "v1_decoder.hpp" #include "pgm_socket.hpp" namespace zmq { class io_thread_t; class session_base_t; class pgm_receiver_t : public io_object_t, public i_engine { public: pgm_receiver_t (zmq::io_thread_t *parent_, const options_t &options_); ~pgm_receiver_t (); int init (bool udp_encapsulation_, const char *network_); // i_engine interface implementation. void plug (zmq::io_thread_t *io_thread_, zmq::session_base_t *session_); void terminate (); void restart_input (); void restart_output (); void zap_msg_available () {} // i_poll_events interface implementation. void in_event (); void timer_event (int token); private: // Unplug the engine from the session. void unplug (); // Decode received data (inpos, insize) and forward decoded // messages to the session. int process_input (v1_decoder_t *decoder); // PGM is not able to move subscriptions upstream. Thus, drop all // the pending subscriptions. void drop_subscriptions (); // RX timeout timer ID. enum {rx_timer_id = 0xa1}; // RX timer is running. bool has_rx_timer; // If joined is true we are already getting messages from the peer. // It it's false, we are getting data but still we haven't seen // beginning of a message. struct peer_info_t { bool joined; v1_decoder_t *decoder; }; struct tsi_comp { bool operator () (const pgm_tsi_t <si, const pgm_tsi_t &rtsi) const { uint32_t ll[2], rl[2]; memcpy (ll, <si, sizeof (ll)); memcpy (rl, &rtsi, sizeof (rl)); return (ll[0] < rl[0]) || (ll[0] == rl[0] && ll[1] < rl[1]); } }; typedef std::map peers_t; peers_t peers; // PGM socket. pgm_socket_t pgm_socket; // Socket options. options_t options; // Associated session. zmq::session_base_t *session; const pgm_tsi_t *active_tsi; // Number of bytes not consumed by the decoder due to pipe overflow. size_t insize; // Pointer to data still waiting to be processed by the decoder. const unsigned char *inpos; // Poll handle associated with PGM socket. handle_t socket_handle; // Poll handle associated with engine PGM waiting pipe. handle_t pipe_handle; pgm_receiver_t (const pgm_receiver_t&); const pgm_receiver_t &operator = (const pgm_receiver_t&); }; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/pipe.hpp0000644000175000017500000001654212240736636016211 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PIPE_HPP_INCLUDED__ #define __ZMQ_PIPE_HPP_INCLUDED__ #include "msg.hpp" #include "ypipe_base.hpp" #include "config.hpp" #include "object.hpp" #include "stdint.hpp" #include "array.hpp" #include "blob.hpp" namespace zmq { class object_t; class pipe_t; // Create a pipepair for bi-directional transfer of messages. // First HWM is for messages passed from first pipe to the second pipe. // Second HWM is for messages passed from second pipe to the first pipe. // Delay specifies how the pipe behaves when the peer terminates. If true // pipe receives all the pending messages before terminating, otherwise it // terminates straight away. // If conflate is true, only the most recently arrived message could be // read (older messages are discarded) int pipepair (zmq::object_t *parents_ [2], zmq::pipe_t* pipes_ [2], int hwms_ [2], bool conflate_ [2]); struct i_pipe_events { virtual ~i_pipe_events () {} virtual void read_activated (zmq::pipe_t *pipe_) = 0; virtual void write_activated (zmq::pipe_t *pipe_) = 0; virtual void hiccuped (zmq::pipe_t *pipe_) = 0; virtual void pipe_terminated (zmq::pipe_t *pipe_) = 0; }; // Note that pipe can be stored in three different arrays. // The array of inbound pipes (1), the array of outbound pipes (2) and // the generic array of pipes to deallocate (3). class pipe_t : public object_t, public array_item_t <1>, public array_item_t <2>, public array_item_t <3> { // This allows pipepair to create pipe objects. friend int pipepair (zmq::object_t *parents_ [2], zmq::pipe_t* pipes_ [2], int hwms_ [2], bool conflate_ [2]); public: // Specifies the object to send events to. void set_event_sink (i_pipe_events *sink_); // Pipe endpoint can store an opaque ID to be used by its clients. void set_identity (const blob_t &identity_); blob_t get_identity (); // Returns true if there is at least one message to read in the pipe. bool check_read (); // Reads a message to the underlying pipe. bool read (msg_t *msg_); // Checks whether messages can be written to the pipe. If writing // the message would cause high watermark the function returns false. bool check_write (); // Writes a message to the underlying pipe. Returns false if the // message cannot be written because high watermark was reached. bool write (msg_t *msg_); // Remove unfinished parts of the outbound message from the pipe. void rollback (); // Flush the messages downsteam. void flush (); // Temporaraily disconnects the inbound message stream and drops // all the messages on the fly. Causes 'hiccuped' event to be generated // in the peer. void hiccup (); // Ensure the pipe wont block on receiving pipe_term. void set_nodelay (); // Ask pipe to terminate. The termination will happen asynchronously // and user will be notified about actual deallocation by 'terminated' // event. If delay is true, the pending messages will be processed // before actual shutdown. void terminate (bool delay_); // set the high water marks. void set_hwms (int inhwm_, int outhwm_); private: // Type of the underlying lock-free pipe. typedef ypipe_base_t upipe_t; // Command handlers. void process_activate_read (); void process_activate_write (uint64_t msgs_read_); void process_hiccup (void *pipe_); void process_pipe_term (); void process_pipe_term_ack (); // Handler for delimiter read from the pipe. void process_delimiter (); // Constructor is private. Pipe can only be created using // pipepair function. pipe_t (object_t *parent_, upipe_t *inpipe_, upipe_t *outpipe_, int inhwm_, int outhwm_, bool conflate_); // Pipepair uses this function to let us know about // the peer pipe object. void set_peer (pipe_t *pipe_); // Destructor is private. Pipe objects destroy themselves. ~pipe_t (); // Underlying pipes for both directions. upipe_t *inpipe; upipe_t *outpipe; // Can the pipe be read from / written to? bool in_active; bool out_active; // High watermark for the outbound pipe. int hwm; // Low watermark for the inbound pipe. int lwm; // Number of messages read and written so far. uint64_t msgs_read; uint64_t msgs_written; // Last received peer's msgs_read. The actual number in the peer // can be higher at the moment. uint64_t peers_msgs_read; // The pipe object on the other side of the pipepair. pipe_t *peer; // Sink to send events to. i_pipe_events *sink; // States of the pipe endpoint: // active: common state before any termination begins, // delimiter_received: delimiter was read from pipe before // term command was received, // waiting_fo_delimiter: term command was already received // from the peer but there are still pending messages to read, // term_ack_sent: all pending messages were already read and // all we are waiting for is ack from the peer, // term_req_sent1: 'terminate' was explicitly called by the user, // term_req_sent2: user called 'terminate' and then we've got // term command from the peer as well. enum { active, delimiter_received, waiting_for_delimiter, term_ack_sent, term_req_sent1, term_req_sent2 } state; // If true, we receive all the pending inbound messages before // terminating. If false, we terminate immediately when the peer // asks us to. bool delay; // Identity of the writer. Used uniquely by the reader side. blob_t identity; // Returns true if the message is delimiter; false otherwise. static bool is_delimiter (msg_t &msg_); // Computes appropriate low watermark from the given high watermark. static int compute_lwm (int hwm_); bool conflate; // Disable copying. pipe_t (const pipe_t&); const pipe_t &operator = (const pipe_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/msg.hpp0000644000175000017500000001216612240736636016040 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_MSG_HPP_INCLUDE__ #define __ZMQ_MSG_HPP_INCLUDE__ #include #include #include "config.hpp" #include "atomic_counter.hpp" // Signature for free function to deallocate the message content. // Note that it has to be declared as "C" so that it is the same as // zmq_free_fn defined in zmq.h. extern "C" { typedef void (msg_free_fn) (void *data, void *hint); } namespace zmq { // Note that this structure needs to be explicitly constructed // (init functions) and destructed (close function). class msg_t { public: // Message flags. enum { more = 1, // Followed by more parts command = 2, // Command frame (see ZMTP spec) identity = 64, shared = 128 }; bool check (); int init (); int init_size (size_t size_); int init_data (void *data_, size_t size_, msg_free_fn *ffn_, void *hint_); int init_delimiter (); int close (); int move (msg_t &src_); int copy (msg_t &src_); void *data (); size_t size (); unsigned char flags (); void set_flags (unsigned char flags_); void reset_flags (unsigned char flags_); bool is_identity () const; bool is_delimiter (); bool is_vsm (); bool is_cmsg (); // After calling this function you can copy the message in POD-style // refs_ times. No need to call copy. void add_refs (int refs_); // Removes references previously added by add_refs. If the number of // references drops to 0, the message is closed and false is returned. bool rm_refs (int refs_); private: // Size in bytes of the largest message that is still copied around // rather than being reference-counted. enum {max_vsm_size = 29}; // Shared message buffer. Message data are either allocated in one // continuous block along with this structure - thus avoiding one // malloc/free pair or they are stored in used-supplied memory. // In the latter case, ffn member stores pointer to the function to be // used to deallocate the data. If the buffer is actually shared (there // are at least 2 references to it) refcount member contains number of // references. struct content_t { void *data; size_t size; msg_free_fn *ffn; void *hint; zmq::atomic_counter_t refcnt; }; // Different message types. enum type_t { type_min = 101, // VSM messages store the content in the message itself type_vsm = 101, // LMSG messages store the content in malloc-ed memory type_lmsg = 102, // Delimiter messages are used in envelopes type_delimiter = 103, // CMSG messages point to constant data type_cmsg = 104, type_max = 104 }; // Note that fields shared between different message types are not // moved to tha parent class (msg_t). This way we ger tighter packing // of the data. Shared fields can be accessed via 'base' member of // the union. union { struct { unsigned char unused [max_vsm_size + 1]; unsigned char type; unsigned char flags; } base; struct { unsigned char data [max_vsm_size]; unsigned char size; unsigned char type; unsigned char flags; } vsm; struct { content_t *content; unsigned char unused [max_vsm_size + 1 - sizeof (content_t*)]; unsigned char type; unsigned char flags; } lmsg; struct { void* data; size_t size; unsigned char unused [max_vsm_size + 1 - sizeof (void*) - sizeof (size_t)]; unsigned char type; unsigned char flags; } cmsg; struct { unsigned char unused [max_vsm_size + 1]; unsigned char type; unsigned char flags; } delimiter; } u; }; } #endif zeromq3-4.0.4+dfsg.orig/src/xsub.cpp0000644000175000017500000001456412240736636016232 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "xsub.hpp" #include "err.hpp" zmq::xsub_t::xsub_t (class ctx_t *parent_, uint32_t tid_, int sid_) : socket_base_t (parent_, tid_, sid_), has_message (false), more (false) { options.type = ZMQ_XSUB; // When socket is being closed down we don't want to wait till pending // subscription commands are sent to the wire. options.linger = 0; int rc = message.init (); errno_assert (rc == 0); } zmq::xsub_t::~xsub_t () { int rc = message.close (); errno_assert (rc == 0); } void zmq::xsub_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { // subscribe_to_all_ is unused (void) subscribe_to_all_; zmq_assert (pipe_); fq.attach (pipe_); dist.attach (pipe_); // Send all the cached subscriptions to the new upstream peer. subscriptions.apply (send_subscription, pipe_); pipe_->flush (); } void zmq::xsub_t::xread_activated (pipe_t *pipe_) { fq.activated (pipe_); } void zmq::xsub_t::xwrite_activated (pipe_t *pipe_) { dist.activated (pipe_); } void zmq::xsub_t::xpipe_terminated (pipe_t *pipe_) { fq.pipe_terminated (pipe_); dist.pipe_terminated (pipe_); } void zmq::xsub_t::xhiccuped (pipe_t *pipe_) { // Send all the cached subscriptions to the hiccuped pipe. subscriptions.apply (send_subscription, pipe_); pipe_->flush (); } int zmq::xsub_t::xsend (msg_t *msg_) { size_t size = msg_->size (); unsigned char *data = (unsigned char *) msg_->data (); if (size > 0 && *data == 1) { // Process subscribe message // This used to filter out duplicate subscriptions, // however this is alread done on the XPUB side and // doing it here as well breaks ZMQ_XPUB_VERBOSE // when there are forwarding devices involved. subscriptions.add (data + 1, size - 1); return dist.send_to_all (msg_); } else if (size > 0 && *data == 0) { // Process unsubscribe message if (subscriptions.rm (data + 1, size - 1)) return dist.send_to_all (msg_); } else // User message sent upstream to XPUB socket return dist.send_to_all (msg_); int rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); return 0; } bool zmq::xsub_t::xhas_out () { // Subscription can be added/removed anytime. return true; } int zmq::xsub_t::xrecv (msg_t *msg_) { // If there's already a message prepared by a previous call to zmq_poll, // return it straight ahead. if (has_message) { int rc = msg_->move (message); errno_assert (rc == 0); has_message = false; more = msg_->flags () & msg_t::more ? true : false; return 0; } // TODO: This can result in infinite loop in the case of continuous // stream of non-matching messages which breaks the non-blocking recv // semantics. while (true) { // Get a message using fair queueing algorithm. int rc = fq.recv (msg_); // If there's no message available, return immediately. // The same when error occurs. if (rc != 0) return -1; // Check whether the message matches at least one subscription. // Non-initial parts of the message are passed if (more || !options.filter || match (msg_)) { more = msg_->flags () & msg_t::more ? true : false; return 0; } // Message doesn't match. Pop any remaining parts of the message // from the pipe. while (msg_->flags () & msg_t::more) { rc = fq.recv (msg_); errno_assert (rc == 0); } } } bool zmq::xsub_t::xhas_in () { // There are subsequent parts of the partly-read message available. if (more) return true; // If there's already a message prepared by a previous call to zmq_poll, // return straight ahead. if (has_message) return true; // TODO: This can result in infinite loop in the case of continuous // stream of non-matching messages. while (true) { // Get a message using fair queueing algorithm. int rc = fq.recv (&message); // If there's no message available, return immediately. // The same when error occurs. if (rc != 0) { errno_assert (errno == EAGAIN); return false; } // Check whether the message matches at least one subscription. if (!options.filter || match (&message)) { has_message = true; return true; } // Message doesn't match. Pop any remaining parts of the message // from the pipe. while (message.flags () & msg_t::more) { rc = fq.recv (&message); errno_assert (rc == 0); } } } bool zmq::xsub_t::match (msg_t *msg_) { return subscriptions.check ((unsigned char*) msg_->data (), msg_->size ()); } void zmq::xsub_t::send_subscription (unsigned char *data_, size_t size_, void *arg_) { pipe_t *pipe = (pipe_t*) arg_; // Create the subsctription message. msg_t msg; int rc = msg.init_size (size_ + 1); errno_assert (rc == 0); unsigned char *data = (unsigned char*) msg.data (); data [0] = 1; memcpy (data + 1, data_, size_); // Send it to the pipe. bool sent = pipe->write (&msg); // If we reached the SNDHWM, and thus cannot send the subscription, drop // the subscription message instead. This matches the behaviour of // zmq_setsockopt(ZMQ_SUBSCRIBE, ...), which also drops subscriptions // when the SNDHWM is reached. if (!sent) msg.close (); } zeromq3-4.0.4+dfsg.orig/src/v1_encoder.cpp0000644000175000017500000000406612240736636017272 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "encoder.hpp" #include "v1_encoder.hpp" #include "likely.hpp" #include "wire.hpp" zmq::v1_encoder_t::v1_encoder_t (size_t bufsize_) : encoder_base_t (bufsize_) { // Write 0 bytes to the batch and go to message_ready state. next_step (NULL, 0, &v1_encoder_t::message_ready, true); } zmq::v1_encoder_t::~v1_encoder_t () { } void zmq::v1_encoder_t::size_ready () { // Write message body into the buffer. next_step (in_progress->data (), in_progress->size (), &v1_encoder_t::message_ready, true); } void zmq::v1_encoder_t::message_ready () { // Get the message size. size_t size = in_progress->size (); // Account for the 'flags' byte. size++; // For messages less than 255 bytes long, write one byte of message size. // For longer messages write 0xff escape character followed by 8-byte // message size. In both cases 'flags' field follows. if (size < 255) { tmpbuf [0] = (unsigned char) size; tmpbuf [1] = (in_progress->flags () & msg_t::more); next_step (tmpbuf, 2, &v1_encoder_t::size_ready, false); } else { tmpbuf [0] = 0xff; put_uint64 (tmpbuf + 1, size); tmpbuf [9] = (in_progress->flags () & msg_t::more); next_step (tmpbuf, 10, &v1_encoder_t::size_ready, false); } } zeromq3-4.0.4+dfsg.orig/src/rep.hpp0000644000175000017500000000323112240736636016031 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_REP_HPP_INCLUDED__ #define __ZMQ_REP_HPP_INCLUDED__ #include "router.hpp" namespace zmq { class ctx_t; class msg_t; class io_thread_t; class socket_base_t; class rep_t : public router_t { public: rep_t (zmq::ctx_t *parent_, uint32_t tid_, int sid); ~rep_t (); // Overloads of functions from socket_base_t. int xsend (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_); bool xhas_in (); bool xhas_out (); private: // If true, we are in process of sending the reply. If false we are // in process of receiving a request. bool sending_reply; // If true, we are starting to receive a request. The beginning // of the request is the backtrace stack. bool request_begins; rep_t (const rep_t&); const rep_t &operator = (const rep_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/pgm_sender.cpp0000644000175000017500000001423612240736636017370 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include #include "io_thread.hpp" #include "pgm_sender.hpp" #include "session_base.hpp" #include "err.hpp" #include "wire.hpp" #include "stdint.hpp" zmq::pgm_sender_t::pgm_sender_t (io_thread_t *parent_, const options_t &options_) : io_object_t (parent_), has_tx_timer (false), has_rx_timer (false), session (NULL), encoder (0), more_flag (false), pgm_socket (false, options_), options (options_), out_buffer (NULL), out_buffer_size (0), write_size (0) { int rc = msg.init (); errno_assert (rc == 0); } int zmq::pgm_sender_t::init (bool udp_encapsulation_, const char *network_) { int rc = pgm_socket.init (udp_encapsulation_, network_); if (rc != 0) return rc; out_buffer_size = pgm_socket.get_max_tsdu_size (); out_buffer = (unsigned char*) malloc (out_buffer_size); alloc_assert (out_buffer); return rc; } void zmq::pgm_sender_t::plug (io_thread_t *io_thread_, session_base_t *session_) { // Alocate 2 fds for PGM socket. fd_t downlink_socket_fd = retired_fd; fd_t uplink_socket_fd = retired_fd; fd_t rdata_notify_fd = retired_fd; fd_t pending_notify_fd = retired_fd; session = session_; // Fill fds from PGM transport and add them to the poller. pgm_socket.get_sender_fds (&downlink_socket_fd, &uplink_socket_fd, &rdata_notify_fd, &pending_notify_fd); handle = add_fd (downlink_socket_fd); uplink_handle = add_fd (uplink_socket_fd); rdata_notify_handle = add_fd (rdata_notify_fd); pending_notify_handle = add_fd (pending_notify_fd); // Set POLLIN. We wont never want to stop polling for uplink = we never // want to stop porocess NAKs. set_pollin (uplink_handle); set_pollin (rdata_notify_handle); set_pollin (pending_notify_handle); // Set POLLOUT for downlink_socket_handle. set_pollout (handle); } void zmq::pgm_sender_t::unplug () { if (has_rx_timer) { cancel_timer (rx_timer_id); has_rx_timer = false; } if (has_tx_timer) { cancel_timer (tx_timer_id); has_tx_timer = false; } rm_fd (handle); rm_fd (uplink_handle); rm_fd (rdata_notify_handle); rm_fd (pending_notify_handle); session = NULL; } void zmq::pgm_sender_t::terminate () { unplug (); delete this; } void zmq::pgm_sender_t::restart_output () { set_pollout (handle); out_event (); } void zmq::pgm_sender_t::restart_input () { zmq_assert (false); } zmq::pgm_sender_t::~pgm_sender_t () { int rc = msg.close (); errno_assert (rc == 0); if (out_buffer) { free (out_buffer); out_buffer = NULL; } } void zmq::pgm_sender_t::in_event () { if (has_rx_timer) { cancel_timer (rx_timer_id); has_rx_timer = false; } // In-event on sender side means NAK or SPMR receiving from some peer. pgm_socket.process_upstream (); if (errno == ENOMEM || errno == EBUSY) { const long timeout = pgm_socket.get_rx_timeout (); add_timer (timeout, rx_timer_id); has_rx_timer = true; } } void zmq::pgm_sender_t::out_event () { // POLLOUT event from send socket. If write buffer is empty, // try to read new data from the encoder. if (write_size == 0) { // First two bytes (sizeof uint16_t) are used to store message // offset in following steps. Note that by passing our buffer to // the get data function we prevent it from returning its own buffer. unsigned char *bf = out_buffer + sizeof (uint16_t); size_t bfsz = out_buffer_size - sizeof (uint16_t); uint16_t offset = 0xffff; size_t bytes = encoder.encode (&bf, bfsz); while (bytes < bfsz) { if (!more_flag && offset == 0xffff) offset = static_cast (bytes); int rc = session->pull_msg (&msg); if (rc == -1) break; more_flag = msg.flags () & msg_t::more; encoder.load_msg (&msg); bf = out_buffer + sizeof (uint16_t) + bytes; bytes += encoder.encode (&bf, bfsz - bytes); } // If there are no data to write stop polling for output. if (bytes == 0) { reset_pollout (handle); return; } write_size = sizeof (uint16_t) + bytes; // Put offset information in the buffer. put_uint16 (out_buffer, offset); } if (has_tx_timer) { cancel_timer (tx_timer_id); has_tx_timer = false; } // Send the data. size_t nbytes = pgm_socket.send (out_buffer, write_size); // We can write either all data or 0 which means rate limit reached. if (nbytes == write_size) write_size = 0; else { zmq_assert (nbytes == 0); if (errno == ENOMEM) { const long timeout = pgm_socket.get_tx_timeout (); add_timer (timeout, tx_timer_id); has_tx_timer = true; } else errno_assert (errno == EBUSY); } } void zmq::pgm_sender_t::timer_event (int token) { // Timer cancels on return by poller_base. if (token == rx_timer_id) { has_rx_timer = false; in_event (); } else if (token == tx_timer_id) { has_tx_timer = false; out_event (); } else zmq_assert (false); } #endif zeromq3-4.0.4+dfsg.orig/src/tcp_listener.hpp0000644000175000017500000000474312240736636017747 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TCP_LISTENER_HPP_INCLUDED__ #define __ZMQ_TCP_LISTENER_HPP_INCLUDED__ #include "fd.hpp" #include "own.hpp" #include "stdint.hpp" #include "io_object.hpp" #include "tcp_address.hpp" #include "../include/zmq.h" namespace zmq { class io_thread_t; class socket_base_t; class tcp_listener_t : public own_t, public io_object_t { public: tcp_listener_t (zmq::io_thread_t *io_thread_, zmq::socket_base_t *socket_, const options_t &options_); ~tcp_listener_t (); // Set address to listen on. int set_address (const char *addr_); // Get the bound address for use with wildcard int get_address (std::string &addr_); private: // Handlers for incoming commands. void process_plug (); void process_term (int linger_); // Handlers for I/O events. void in_event (); // Close the listening socket. void close (); // Accept the new connection. Returns the file descriptor of the // newly created connection. The function may return retired_fd // if the connection was dropped while waiting in the listen backlog // or was denied because of accept filters. fd_t accept (); // Address to listen on. tcp_address_t address; // Underlying socket. fd_t s; // Handle corresponding to the listening socket. handle_t handle; // Socket the listerner belongs to. zmq::socket_base_t *socket; // String representation of endpoint to bind to std::string endpoint; tcp_listener_t (const tcp_listener_t&); const tcp_listener_t &operator = (const tcp_listener_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/kqueue.hpp0000644000175000017500000000554412240736636016553 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_KQUEUE_HPP_INCLUDED__ #define __ZMQ_KQUEUE_HPP_INCLUDED__ // poller.hpp decides which polling mechanism to use. #include "poller.hpp" #if defined ZMQ_USE_KQUEUE #include #include #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { struct i_poll_events; // Implements socket polling mechanism using the BSD-specific // kqueue interface. class kqueue_t : public poller_base_t { public: typedef void* handle_t; kqueue_t (); ~kqueue_t (); // "poller" concept. handle_t add_fd (fd_t fd_, zmq::i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); static int max_fds (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); // File descriptor referring to the kernel event queue. fd_t kqueue_fd; // Adds the event to the kqueue. void kevent_add (fd_t fd_, short filter_, void *udata_); // Deletes the event from the kqueue. void kevent_delete (fd_t fd_, short filter_); struct poll_entry_t { fd_t fd; bool flag_pollin; bool flag_pollout; zmq::i_poll_events *reactor; }; // List of retired event sources. typedef std::vector retired_t; retired_t retired; // If true, thread is in the process of shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; kqueue_t (const kqueue_t&); const kqueue_t &operator = (const kqueue_t&); #ifdef HAVE_FORK // the process that created this context. Used to detect forking. pid_t pid; #endif }; typedef kqueue_t poller_t; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/v1_decoder.cpp0000644000175000017500000001063412240736636017256 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "decoder.hpp" #include "v1_decoder.hpp" #include "likely.hpp" #include "wire.hpp" #include "err.hpp" zmq::v1_decoder_t::v1_decoder_t (size_t bufsize_, int64_t maxmsgsize_) : decoder_base_t (bufsize_), maxmsgsize (maxmsgsize_) { int rc = in_progress.init (); errno_assert (rc == 0); // At the beginning, read one byte and go to one_byte_size_ready state. next_step (tmpbuf, 1, &v1_decoder_t::one_byte_size_ready); } zmq::v1_decoder_t::~v1_decoder_t () { int rc = in_progress.close (); errno_assert (rc == 0); } int zmq::v1_decoder_t::one_byte_size_ready () { // First byte of size is read. If it is 0xff read 8-byte size. // Otherwise allocate the buffer for message data and read the // message data into it. if (*tmpbuf == 0xff) next_step (tmpbuf, 8, &v1_decoder_t::eight_byte_size_ready); else { // There has to be at least one byte (the flags) in the message). if (!*tmpbuf) { errno = EPROTO; return -1; } if (maxmsgsize >= 0 && (int64_t) (*tmpbuf - 1) > maxmsgsize) { errno = EMSGSIZE; return -1; } // in_progress is initialised at this point so in theory we should // close it before calling zmq_msg_init_size, however, it's a 0-byte // message and thus we can treat it as uninitialised... int rc = in_progress.init_size (*tmpbuf - 1); if (rc != 0) { errno_assert (errno == ENOMEM); rc = in_progress.init (); errno_assert (rc == 0); errno = ENOMEM; return -1; } next_step (tmpbuf, 1, &v1_decoder_t::flags_ready); } return 0; } int zmq::v1_decoder_t::eight_byte_size_ready () { // 8-byte payload length is read. Allocate the buffer // for message body and read the message data into it. const uint64_t payload_length = get_uint64 (tmpbuf); // There has to be at least one byte (the flags) in the message). if (payload_length == 0) { errno = EPROTO; return -1; } // Message size must not exceed the maximum allowed size. if (maxmsgsize >= 0 && payload_length - 1 > (uint64_t) maxmsgsize) { errno = EMSGSIZE; return -1; } // Message size must fit within range of size_t data type. if (payload_length - 1 > std::numeric_limits ::max ()) { errno = EMSGSIZE; return -1; } const size_t msg_size = static_cast (payload_length - 1); // in_progress is initialised at this point so in theory we should // close it before calling init_size, however, it's a 0-byte // message and thus we can treat it as uninitialised... int rc = in_progress.init_size (msg_size); if (rc != 0) { errno_assert (errno == ENOMEM); rc = in_progress.init (); errno_assert (rc == 0); errno = ENOMEM; return -1; } next_step (tmpbuf, 1, &v1_decoder_t::flags_ready); return 0; } int zmq::v1_decoder_t::flags_ready () { // Store the flags from the wire into the message structure. in_progress.set_flags (tmpbuf [0] & msg_t::more); next_step (in_progress.data (), in_progress.size (), &v1_decoder_t::message_ready); return 0; } int zmq::v1_decoder_t::message_ready () { // Message is completely read. Push it further and start reading // new message. (in_progress is a 0-byte message after this point.) next_step (tmpbuf, 1, &v1_decoder_t::one_byte_size_ready); return 1; } zeromq3-4.0.4+dfsg.orig/src/tcp_connecter.cpp0000644000175000017500000002106212240736636020066 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "tcp_connecter.hpp" #include "stream_engine.hpp" #include "io_thread.hpp" #include "platform.hpp" #include "random.hpp" #include "err.hpp" #include "ip.hpp" #include "tcp.hpp" #include "address.hpp" #include "tcp_address.hpp" #include "session_base.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #include #include #include #include #ifdef ZMQ_HAVE_OPENVMS #include #endif #endif zmq::tcp_connecter_t::tcp_connecter_t (class io_thread_t *io_thread_, class session_base_t *session_, const options_t &options_, const address_t *addr_, bool delayed_start_) : own_t (io_thread_, options_), io_object_t (io_thread_), addr (addr_), s (retired_fd), handle_valid (false), delayed_start (delayed_start_), timer_started (false), session (session_), current_reconnect_ivl(options.reconnect_ivl) { zmq_assert (addr); zmq_assert (addr->protocol == "tcp"); addr->to_string (endpoint); socket = session-> get_socket(); } zmq::tcp_connecter_t::~tcp_connecter_t () { zmq_assert (!timer_started); zmq_assert (!handle_valid); zmq_assert (s == retired_fd); } void zmq::tcp_connecter_t::process_plug () { if (delayed_start) add_reconnect_timer (); else start_connecting (); } void zmq::tcp_connecter_t::process_term (int linger_) { if (timer_started) { cancel_timer (reconnect_timer_id); timer_started = false; } if (handle_valid) { rm_fd (handle); handle_valid = false; } if (s != retired_fd) close (); own_t::process_term (linger_); } void zmq::tcp_connecter_t::in_event () { // We are not polling for incoming data, so we are actually called // because of error here. However, we can get error on out event as well // on some platforms, so we'll simply handle both events in the same way. out_event (); } void zmq::tcp_connecter_t::out_event () { fd_t fd = connect (); rm_fd (handle); handle_valid = false; // Handle the error condition by attempt to reconnect. if (fd == retired_fd) { close (); add_reconnect_timer(); return; } tune_tcp_socket (fd); tune_tcp_keepalives (fd, options.tcp_keepalive, options.tcp_keepalive_cnt, options.tcp_keepalive_idle, options.tcp_keepalive_intvl); // Create the engine object for this connection. stream_engine_t *engine = new (std::nothrow) stream_engine_t (fd, options, endpoint); alloc_assert (engine); // Attach the engine to the corresponding session object. send_attach (session, engine); // Shut the connecter down. terminate (); socket->event_connected (endpoint, fd); } void zmq::tcp_connecter_t::timer_event (int id_) { zmq_assert (id_ == reconnect_timer_id); timer_started = false; start_connecting (); } void zmq::tcp_connecter_t::start_connecting () { // Open the connecting socket. int rc = open (); // Connect may succeed in synchronous manner. if (rc == 0) { handle = add_fd (s); handle_valid = true; out_event (); } // Connection establishment may be delayed. Poll for its completion. else if (rc == -1 && errno == EINPROGRESS) { handle = add_fd (s); handle_valid = true; set_pollout (handle); socket->event_connect_delayed (endpoint, zmq_errno()); } // Handle any other error condition by eventual reconnect. else { if (s != retired_fd) close (); add_reconnect_timer (); } } void zmq::tcp_connecter_t::add_reconnect_timer() { int rc_ivl = get_new_reconnect_ivl(); add_timer (rc_ivl, reconnect_timer_id); socket->event_connect_retried (endpoint, rc_ivl); timer_started = true; } int zmq::tcp_connecter_t::get_new_reconnect_ivl () { // The new interval is the current interval + random value. int this_interval = current_reconnect_ivl + (generate_random () % options.reconnect_ivl); // Only change the current reconnect interval if the maximum reconnect // interval was set and if it's larger than the reconnect interval. if (options.reconnect_ivl_max > 0 && options.reconnect_ivl_max > options.reconnect_ivl) { // Calculate the next interval current_reconnect_ivl = current_reconnect_ivl * 2; if(current_reconnect_ivl >= options.reconnect_ivl_max) { current_reconnect_ivl = options.reconnect_ivl_max; } } return this_interval; } int zmq::tcp_connecter_t::open () { zmq_assert (s == retired_fd); // Create the socket. s = open_socket (addr->resolved.tcp_addr->family (), SOCK_STREAM, IPPROTO_TCP); #ifdef ZMQ_HAVE_WINDOWS if (s == INVALID_SOCKET) { errno = wsa_error_to_errno (WSAGetLastError ()); return -1; } #else if (s == -1) return -1; #endif // On some systems, IPv4 mapping in IPv6 sockets is disabled by default. // Switch it on in such cases. if (addr->resolved.tcp_addr->family () == AF_INET6) enable_ipv4_mapping (s); // Set the socket to non-blocking mode so that we get async connect(). unblock_socket (s); // Set the socket buffer limits for the underlying socket. if (options.sndbuf != 0) set_tcp_send_buffer (s, options.sndbuf); if (options.rcvbuf != 0) set_tcp_receive_buffer (s, options.rcvbuf); // Connect to the remote peer. int rc = ::connect ( s, addr->resolved.tcp_addr->addr (), addr->resolved.tcp_addr->addrlen ()); // Connect was successfull immediately. if (rc == 0) return 0; // Translate error codes indicating asynchronous connect has been // launched to a uniform EINPROGRESS. #ifdef ZMQ_HAVE_WINDOWS const int error_code = WSAGetLastError (); if (error_code == WSAEINPROGRESS || error_code == WSAEWOULDBLOCK) errno = EINPROGRESS; else errno = wsa_error_to_errno (error_code); #else if (errno == EINTR) errno = EINPROGRESS; #endif return -1; } zmq::fd_t zmq::tcp_connecter_t::connect () { // Async connect has finished. Check whether an error occurred int err = 0; #if defined ZMQ_HAVE_HPUX int len = sizeof (err); #else socklen_t len = sizeof (err); #endif int rc = getsockopt (s, SOL_SOCKET, SO_ERROR, (char*) &err, &len); // Assert if the error was caused by 0MQ bug. // Networking problems are OK. No need to assert. #ifdef ZMQ_HAVE_WINDOWS zmq_assert (rc == 0); if (err != 0) { if (err == WSAECONNREFUSED || err == WSAETIMEDOUT || err == WSAECONNABORTED || err == WSAEHOSTUNREACH || err == WSAENETUNREACH || err == WSAENETDOWN || err == WSAEINVAL) return retired_fd; wsa_assert_no (err); } #else // Following code should handle both Berkeley-derived socket // implementations and Solaris. if (rc == -1) err = errno; if (err != 0) { errno = err; errno_assert ( errno == ECONNREFUSED || errno == ECONNRESET || errno == ETIMEDOUT || errno == EHOSTUNREACH || errno == ENETUNREACH || errno == ENETDOWN || errno == EINVAL); return retired_fd; } #endif // Return the newly connected socket. fd_t result = s; s = retired_fd; return result; } void zmq::tcp_connecter_t::close () { zmq_assert (s != retired_fd); #ifdef ZMQ_HAVE_WINDOWS int rc = closesocket (s); wsa_assert (rc != SOCKET_ERROR); #else int rc = ::close (s); errno_assert (rc == 0); #endif socket->event_closed (endpoint, s); s = retired_fd; } zeromq3-4.0.4+dfsg.orig/src/pair.hpp0000644000175000017500000000322412240736636016200 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PAIR_HPP_INCLUDED__ #define __ZMQ_PAIR_HPP_INCLUDED__ #include "socket_base.hpp" #include "session_base.hpp" namespace zmq { class ctx_t; class msg_t; class pipe_t; class io_thread_t; class pair_t : public socket_base_t { public: pair_t (zmq::ctx_t *parent_, uint32_t tid_, int sid); ~pair_t (); // Overloads of functions from socket_base_t. void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_); int xsend (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_); bool xhas_in (); bool xhas_out (); void xread_activated (zmq::pipe_t *pipe_); void xwrite_activated (zmq::pipe_t *pipe_); void xpipe_terminated (zmq::pipe_t *pipe_); private: zmq::pipe_t *pipe; pair_t (const pair_t&); const pair_t &operator = (const pair_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/zmq_utils.cpp0000644000175000017500000001354112240736636017272 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #include "clock.hpp" #include "err.hpp" #include "thread.hpp" #include #include "../include/zmq_utils.h" #if !defined ZMQ_HAVE_WINDOWS #include #else #include "windows.hpp" #endif #ifdef HAVE_LIBSODIUM # include #endif void zmq_sleep (int seconds_) { #if defined ZMQ_HAVE_WINDOWS Sleep (seconds_ * 1000); #else sleep (seconds_); #endif } void *zmq_stopwatch_start () { uint64_t *watch = (uint64_t*) malloc (sizeof (uint64_t)); alloc_assert (watch); *watch = zmq::clock_t::now_us (); return (void*) watch; } unsigned long zmq_stopwatch_stop (void *watch_) { uint64_t end = zmq::clock_t::now_us (); uint64_t start = *(uint64_t*) watch_; free (watch_); return (unsigned long) (end - start); } void *zmq_threadstart(zmq_thread_fn* func, void* arg) { zmq::thread_t* thread = new zmq::thread_t; thread->start(func, arg); return thread; } void zmq_threadclose(void* thread) { zmq::thread_t* pThread = static_cast(thread); pThread->stop(); delete pThread; } // Z85 codec, taken from 0MQ RFC project, implements RFC32 Z85 encoding // Maps base 256 to base 85 static char encoder [85 + 1] = { "0123456789" "abcdefghij" "klmnopqrst" "uvwxyzABCD" "EFGHIJKLMN" "OPQRSTUVWX" "YZ.-:+=^!/" "*?&<>()[]{" "}@%$#" }; // Maps base 85 to base 256 // We chop off lower 32 and higher 128 ranges static uint8_t decoder [96] = { 0x00, 0x44, 0x00, 0x54, 0x53, 0x52, 0x48, 0x00, 0x4B, 0x4C, 0x46, 0x41, 0x00, 0x3F, 0x3E, 0x45, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x40, 0x00, 0x49, 0x42, 0x4A, 0x47, 0x51, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x4D, 0x00, 0x4E, 0x43, 0x00, 0x00, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x4F, 0x00, 0x50, 0x00, 0x00 }; // -------------------------------------------------------------------------- // Encode a binary frame as a string; destination string MUST be at least // size * 5 / 4 bytes long plus 1 byte for the null terminator. Returns // dest. Size must be a multiple of 4. // Returns NULL and sets errno = EINVAL for invalid input. char *zmq_z85_encode (char *dest, uint8_t *data, size_t size) { if (size % 4 != 0) { errno = EINVAL; return NULL; } unsigned int char_nbr = 0; unsigned int byte_nbr = 0; uint32_t value = 0; while (byte_nbr < size) { // Accumulate value in base 256 (binary) value = value * 256 + data [byte_nbr++]; if (byte_nbr % 4 == 0) { // Output value in base 85 unsigned int divisor = 85 * 85 * 85 * 85; while (divisor) { dest [char_nbr++] = encoder [value / divisor % 85]; divisor /= 85; } value = 0; } } assert (char_nbr == size * 5 / 4); dest [char_nbr] = 0; return dest; } // -------------------------------------------------------------------------- // Decode an encoded string into a binary frame; dest must be at least // strlen (string) * 4 / 5 bytes long. Returns dest. strlen (string) // must be a multiple of 5. // Returns NULL and sets errno = EINVAL for invalid input. uint8_t *zmq_z85_decode (uint8_t *dest, char *string) { if (strlen (string) % 5 != 0) { errno = EINVAL; return NULL; } unsigned int byte_nbr = 0; unsigned int char_nbr = 0; unsigned int string_len = strlen (string); uint32_t value = 0; while (char_nbr < string_len) { // Accumulate value in base 85 value = value * 85 + decoder [(uint8_t) string [char_nbr++] - 32]; if (char_nbr % 5 == 0) { // Output value in base 256 unsigned int divisor = 256 * 256 * 256; while (divisor) { dest [byte_nbr++] = value / divisor % 256; divisor /= 256; } value = 0; } } assert (byte_nbr == strlen (string) * 4 / 5); return dest; } // -------------------------------------------------------------------------- // Generate a public/private keypair with libsodium. // Generated keys will be 40 byte z85-encoded strings. // Returns 0 on success, -1 on failure, setting errno. // Sets errno = ENOTSUP in the absence of libsodium. int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key) { #ifdef HAVE_LIBSODIUM # if crypto_box_PUBLICKEYBYTES != 32 \ || crypto_box_SECRETKEYBYTES != 32 # error "libsodium not built correctly" # endif uint8_t public_key [32]; uint8_t secret_key [32]; int rc = crypto_box_keypair (public_key, secret_key); // Is there a sensible errno to set here? if (rc) return rc; zmq_z85_encode (z85_public_key, public_key, 32); zmq_z85_encode (z85_secret_key, secret_key, 32); return 0; #else // requires libsodium errno = ENOTSUP; return -1; #endif } zeromq3-4.0.4+dfsg.orig/src/v2_decoder.hpp0000644000175000017500000000312412240736636017260 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_V2_DECODER_HPP_INCLUDED__ #define __ZMQ_V2_DECODER_HPP_INCLUDED__ #include "decoder.hpp" namespace zmq { // Decoder for ZMTP/2.x framing protocol. Converts data stream into messages. class v2_decoder_t : public decoder_base_t { public: v2_decoder_t (size_t bufsize_, int64_t maxmsgsize_); virtual ~v2_decoder_t (); // i_decoder interface. virtual msg_t *msg () { return &in_progress; } private: int flags_ready (); int one_byte_size_ready (); int eight_byte_size_ready (); int message_ready (); unsigned char tmpbuf [8]; unsigned char msg_flags; msg_t in_progress; const int64_t maxmsgsize; v2_decoder_t (const v2_decoder_t&); void operator = (const v2_decoder_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/pgm_socket.hpp0000644000175000017500000000700512240736636017401 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __PGM_SOCKET_HPP_INCLUDED__ #define __PGM_SOCKET_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #define __PGM_WININT_H__ #endif #include #ifdef ZMQ_HAVE_OSX #include #endif #include "fd.hpp" #include "options.hpp" namespace zmq { // Encapsulates PGM socket. class pgm_socket_t { public: // If receiver_ is true PGM transport is not generating SPM packets. pgm_socket_t (bool receiver_, const options_t &options_); // Closes the transport. ~pgm_socket_t (); // Initialize PGM network structures (GSI, GSRs). int init (bool udp_encapsulation_, const char *network_); // Resolve PGM socket address. static int init_address(const char *network_, struct pgm_addrinfo_t **addr, uint16_t *port_number); // Get receiver fds and store them into user allocated memory. void get_receiver_fds (fd_t *receive_fd_, fd_t *waiting_pipe_fd_); // Get sender and receiver fds and store it to user allocated // memory. Receive fd is used to process NAKs from peers. void get_sender_fds (fd_t *send_fd_, fd_t *receive_fd_, fd_t *rdata_notify_fd_, fd_t *pending_notify_fd_); // Send data as one APDU, transmit window owned memory. size_t send (unsigned char *data_, size_t data_len_); // Returns max tsdu size without fragmentation. size_t get_max_tsdu_size (); // Receive data from pgm socket. ssize_t receive (void **data_, const pgm_tsi_t **tsi_); long get_rx_timeout (); long get_tx_timeout (); // POLLIN on sender side should mean NAK or SPMR receiving. // process_upstream function is used to handle such a situation. void process_upstream (); private: // Compute size of the buffer based on rate and recovery interval. int compute_sqns (int tpdu_); // OpenPGM transport. pgm_sock_t* sock; int last_rx_status, last_tx_status; // Associated socket options. options_t options; // true when pgm_socket should create receiving side. bool receiver; // Array of pgm_msgv_t structures to store received data // from the socket (pgm_transport_recvmsgv). pgm_msgv_t *pgm_msgv; // Size of pgm_msgv array. size_t pgm_msgv_len; // How many bytes were read from pgm socket. size_t nbytes_rec; // How many bytes were processed from last pgm socket read. size_t nbytes_processed; // How many messages from pgm_msgv were already sent up. size_t pgm_msgv_processed; }; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/plain_mechanism.cpp0000644000175000017500000003147212240736636020375 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include #include #include "msg.hpp" #include "session_base.hpp" #include "err.hpp" #include "plain_mechanism.hpp" #include "wire.hpp" zmq::plain_mechanism_t::plain_mechanism_t (session_base_t *session_, const std::string &peer_address_, const options_t &options_) : mechanism_t (options_), session (session_), peer_address (peer_address_), expecting_zap_reply (false), state (options.as_server? waiting_for_hello: sending_hello) { } zmq::plain_mechanism_t::~plain_mechanism_t () { } int zmq::plain_mechanism_t::next_handshake_command (msg_t *msg_) { int rc = 0; switch (state) { case sending_hello: rc = produce_hello (msg_); if (rc == 0) state = waiting_for_welcome; break; case sending_welcome: rc = produce_welcome (msg_); if (rc == 0) state = waiting_for_initiate; break; case sending_initiate: rc = produce_initiate (msg_); if (rc == 0) state = waiting_for_ready; break; case sending_ready: rc = produce_ready (msg_); if (rc == 0) state = ready; break; default: errno = EAGAIN; rc = -1; } return rc; } int zmq::plain_mechanism_t::process_handshake_command (msg_t *msg_) { int rc = 0; switch (state) { case waiting_for_hello: rc = process_hello (msg_); if (rc == 0) state = expecting_zap_reply? waiting_for_zap_reply: sending_welcome; break; case waiting_for_welcome: rc = process_welcome (msg_); if (rc == 0) state = sending_initiate; break; case waiting_for_initiate: rc = process_initiate (msg_); if (rc == 0) state = sending_ready; break; case waiting_for_ready: rc = process_ready (msg_); if (rc == 0) state = ready; break; default: errno = EPROTO; rc = -1; break; } if (rc == 0) { rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); } return rc; } bool zmq::plain_mechanism_t::is_handshake_complete () const { return state == ready; } int zmq::plain_mechanism_t::zap_msg_available () { if (state != waiting_for_zap_reply) { errno = EFSM; return -1; } const int rc = receive_and_process_zap_reply (); if (rc == 0) state = sending_welcome; return rc; } int zmq::plain_mechanism_t::produce_hello (msg_t *msg_) const { const std::string username = options.plain_username; zmq_assert (username.length () < 256); const std::string password = options.plain_password; zmq_assert (password.length () < 256); const size_t command_size = 6 + 1 + username.length () + 1 + password.length (); const int rc = msg_->init_size (command_size); errno_assert (rc == 0); unsigned char *ptr = static_cast (msg_->data ()); memcpy (ptr, "\x05HELLO", 6); ptr += 6; *ptr++ = static_cast (username.length ()); memcpy (ptr, username.c_str (), username.length ()); ptr += username.length (); *ptr++ = static_cast (password.length ()); memcpy (ptr, password.c_str (), password.length ()); ptr += password.length (); return 0; } int zmq::plain_mechanism_t::process_hello (msg_t *msg_) { const unsigned char *ptr = static_cast (msg_->data ()); size_t bytes_left = msg_->size (); if (bytes_left < 6 || memcmp (ptr, "\x05HELLO", 6)) { errno = EPROTO; return -1; } ptr += 6; bytes_left -= 6; if (bytes_left < 1) { errno = EPROTO; return -1; } const size_t username_length = static_cast (*ptr++); bytes_left -= 1; if (bytes_left < username_length) { errno = EPROTO; return -1; } const std::string username = std::string ((char *) ptr, username_length); ptr += username_length; bytes_left -= username_length; if (bytes_left < 1) { errno = EPROTO; return -1; } const size_t password_length = static_cast (*ptr++); bytes_left -= 1; if (bytes_left < password_length) { errno = EPROTO; return -1; } const std::string password = std::string ((char *) ptr, password_length); ptr += password_length; bytes_left -= password_length; if (bytes_left > 0) { errno = EPROTO; return -1; } // Use ZAP protocol (RFC 27) to authenticate the user. int rc = session->zap_connect (); if (rc == 0) { send_zap_request (username, password); rc = receive_and_process_zap_reply (); if (rc != 0) { if (errno != EAGAIN) return -1; expecting_zap_reply = true; } } return 0; } int zmq::plain_mechanism_t::produce_welcome (msg_t *msg_) const { const int rc = msg_->init_size (8); errno_assert (rc == 0); memcpy (msg_->data (), "\x07WELCOME", 8); return 0; } int zmq::plain_mechanism_t::process_welcome (msg_t *msg_) { const unsigned char *ptr = static_cast (msg_->data ()); size_t bytes_left = msg_->size (); if (bytes_left != 8 || memcmp (ptr, "\x07WELCOME", 8)) { errno = EPROTO; return -1; } return 0; } int zmq::plain_mechanism_t::produce_initiate (msg_t *msg_) const { unsigned char * const command_buffer = (unsigned char *) malloc (512); alloc_assert (command_buffer); unsigned char *ptr = command_buffer; // Add mechanism string memcpy (ptr, "\x08INITIATE", 9); ptr += 9; // Add socket type property const char *socket_type = socket_type_string (options.type); ptr += add_property (ptr, "Socket-Type", socket_type, strlen (socket_type)); // Add identity property if (options.type == ZMQ_REQ || options.type == ZMQ_DEALER || options.type == ZMQ_ROUTER) { ptr += add_property (ptr, "Identity", options.identity, options.identity_size); } const size_t command_size = ptr - command_buffer; const int rc = msg_->init_size (command_size); errno_assert (rc == 0); memcpy (msg_->data (), command_buffer, command_size); free (command_buffer); return 0; } int zmq::plain_mechanism_t::process_initiate (msg_t *msg_) { const unsigned char *ptr = static_cast (msg_->data ()); size_t bytes_left = msg_->size (); if (bytes_left < 9 || memcmp (ptr, "\x08INITIATE", 9)) { errno = EPROTO; return -1; } ptr += 9; bytes_left -= 9; return parse_metadata (ptr, bytes_left); } int zmq::plain_mechanism_t::produce_ready (msg_t *msg_) const { unsigned char * const command_buffer = (unsigned char *) malloc (512); alloc_assert (command_buffer); unsigned char *ptr = command_buffer; // Add command name memcpy (ptr, "\x05READY", 6); ptr += 6; // Add socket type property const char *socket_type = socket_type_string (options.type); ptr += add_property (ptr, "Socket-Type", socket_type, strlen (socket_type)); // Add identity property if (options.type == ZMQ_REQ || options.type == ZMQ_DEALER || options.type == ZMQ_ROUTER) { ptr += add_property (ptr, "Identity", options.identity, options.identity_size); } const size_t command_size = ptr - command_buffer; const int rc = msg_->init_size (command_size); errno_assert (rc == 0); memcpy (msg_->data (), command_buffer, command_size); free (command_buffer); return 0; } int zmq::plain_mechanism_t::process_ready (msg_t *msg_) { const unsigned char *ptr = static_cast (msg_->data ()); size_t bytes_left = msg_->size (); if (bytes_left < 6 || memcmp (ptr, "\x05READY", 6)) { errno = EPROTO; return -1; } ptr += 6; bytes_left -= 6; return parse_metadata (ptr, bytes_left); } void zmq::plain_mechanism_t::send_zap_request (const std::string &username, const std::string &password) { int rc; msg_t msg; // Address delimiter frame rc = msg.init (); errno_assert (rc == 0); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Version frame rc = msg.init_size (3); errno_assert (rc == 0); memcpy (msg.data (), "1.0", 3); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Request id frame rc = msg.init_size (1); errno_assert (rc == 0); memcpy (msg.data (), "1", 1); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Domain frame rc = msg.init_size (options.zap_domain.length ()); errno_assert (rc == 0); memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ()); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Address frame rc = msg.init_size (peer_address.length ()); errno_assert (rc == 0); memcpy (msg.data (), peer_address.c_str (), peer_address.length ()); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Identity frame rc = msg.init_size (options.identity_size); errno_assert (rc == 0); memcpy (msg.data (), options.identity, options.identity_size); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Mechanism frame rc = msg.init_size (5); errno_assert (rc == 0); memcpy (msg.data (), "PLAIN", 5); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Username frame rc = msg.init_size (username.length ()); errno_assert (rc == 0); memcpy (msg.data (), username.c_str (), username.length ()); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Password frame rc = msg.init_size (password.length ()); errno_assert (rc == 0); memcpy (msg.data (), password.c_str (), password.length ()); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); } int zmq::plain_mechanism_t::receive_and_process_zap_reply () { int rc = 0; msg_t msg [7]; // ZAP reply consists of 7 frames // Initialize all reply frames for (int i = 0; i < 7; i++) { rc = msg [i].init (); errno_assert (rc == 0); } for (int i = 0; i < 7; i++) { rc = session->read_zap_msg (&msg [i]); if (rc == -1) break; if ((msg [i].flags () & msg_t::more) == (i < 6? 0: msg_t::more)) { errno = EPROTO; rc = -1; break; } } if (rc != 0) goto error; // Address delimiter frame if (msg [0].size () > 0) { rc = -1; errno = EPROTO; goto error; } // Version frame if (msg [1].size () != 3 || memcmp (msg [1].data (), "1.0", 3)) { rc = -1; errno = EPROTO; goto error; } // Request id frame if (msg [2].size () != 1 || memcmp (msg [2].data (), "1", 1)) { rc = -1; errno = EPROTO; goto error; } // Status code frame if (msg [3].size () != 3 || memcmp (msg [3].data (), "200", 3)) { rc = -1; errno = EACCES; goto error; } // Process metadata frame rc = parse_metadata (static_cast (msg [6].data ()), msg [6].size ()); error: for (int i = 0; i < 7; i++) { const int rc2 = msg [i].close (); errno_assert (rc2 == 0); } return rc; } zeromq3-4.0.4+dfsg.orig/src/v1_decoder.hpp0000644000175000017500000000277712240736636017274 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_V1_DECODER_HPP_INCLUDED__ #define __ZMQ_V1_DECODER_HPP_INCLUDED__ #include "decoder.hpp" namespace zmq { // Decoder for ZMTP/1.0 protocol. Converts data batches into messages. class v1_decoder_t : public decoder_base_t { public: v1_decoder_t (size_t bufsize_, int64_t maxmsgsize_); ~v1_decoder_t (); virtual msg_t *msg () { return &in_progress; } private: int one_byte_size_ready (); int eight_byte_size_ready (); int flags_ready (); int message_ready (); unsigned char tmpbuf [8]; msg_t in_progress; int64_t maxmsgsize; v1_decoder_t (const v1_decoder_t&); void operator = (const v1_decoder_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/proxy.cpp0000644000175000017500000001147112240736636016424 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "platform.hpp" #include "proxy.hpp" #include "likely.hpp" #if defined ZMQ_FORCE_SELECT #define ZMQ_POLL_BASED_ON_SELECT #elif defined ZMQ_FORCE_POLL #define ZMQ_POLL_BASED_ON_POLL #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ defined ZMQ_HAVE_NETBSD #define ZMQ_POLL_BASED_ON_POLL #elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS ||\ defined ZMQ_HAVE_CYGWIN #define ZMQ_POLL_BASED_ON_SELECT #endif // On AIX platform, poll.h has to be included first to get consistent // definition of pollfd structure (AIX uses 'reqevents' and 'retnevents' // instead of 'events' and 'revents' and defines macros to map from POSIX-y // names to AIX-specific names). #if defined ZMQ_POLL_BASED_ON_POLL #include #endif // These headers end up pulling in zmq.h somewhere in their include // dependency chain #include "socket_base.hpp" #include "err.hpp" // zmq.h must be included *after* poll.h for AIX to build properly #include "../include/zmq.h" int zmq::proxy ( class socket_base_t *frontend_, class socket_base_t *backend_, class socket_base_t *capture_) { msg_t msg; int rc = msg.init (); if (rc != 0) return -1; // The algorithm below assumes ratio of requests and replies processed // under full load to be 1:1. int more; size_t moresz; zmq_pollitem_t items [] = { { frontend_, 0, ZMQ_POLLIN, 0 }, { backend_, 0, ZMQ_POLLIN, 0 } }; while (true) { // Wait while there are either requests or replies to process. rc = zmq_poll (&items [0], 2, -1); if (unlikely (rc < 0)) return -1; // Process a request if (items [0].revents & ZMQ_POLLIN) { while (true) { rc = frontend_->recv (&msg, 0); if (unlikely (rc < 0)) return -1; moresz = sizeof more; rc = frontend_->getsockopt (ZMQ_RCVMORE, &more, &moresz); if (unlikely (rc < 0)) return -1; // Copy message to capture socket if any if (capture_) { msg_t ctrl; rc = ctrl.init (); if (unlikely (rc < 0)) return -1; rc = ctrl.copy (msg); if (unlikely (rc < 0)) return -1; rc = capture_->send (&ctrl, more? ZMQ_SNDMORE: 0); if (unlikely (rc < 0)) return -1; } rc = backend_->send (&msg, more? ZMQ_SNDMORE: 0); if (unlikely (rc < 0)) return -1; if (more == 0) break; } } // Process a reply if (items [1].revents & ZMQ_POLLIN) { while (true) { rc = backend_->recv (&msg, 0); if (unlikely (rc < 0)) return -1; moresz = sizeof more; rc = backend_->getsockopt (ZMQ_RCVMORE, &more, &moresz); if (unlikely (rc < 0)) return -1; // Copy message to capture socket if any if (capture_) { msg_t ctrl; rc = ctrl.init (); if (unlikely (rc < 0)) return -1; rc = ctrl.copy (msg); if (unlikely (rc < 0)) return -1; rc = capture_->send (&ctrl, more? ZMQ_SNDMORE: 0); if (unlikely (rc < 0)) return -1; } rc = frontend_->send (&msg, more? ZMQ_SNDMORE: 0); if (unlikely (rc < 0)) return -1; if (more == 0) break; } } } return 0; } zeromq3-4.0.4+dfsg.orig/src/platform.hpp.in0000644000175000017500000001531312307430717017473 0ustar ghedoghedo/* src/platform.hpp.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `freeifaddrs' function. */ #undef HAVE_FREEIFADDRS /* Define to 1 if you have the `gethrtime' function. */ #undef HAVE_GETHRTIME /* Define to 1 if you have the `getifaddrs' function. */ #undef HAVE_GETIFADDRS /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_IFADDRS_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */ #undef HAVE_LIBIPHLPAPI /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the `rpcrt4' library (-lrpcrt4). */ #undef HAVE_LIBRPCRT4 /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the `sodium' library (-lsodium). */ #undef HAVE_LIBSODIUM /* Define to 1 if you have the `ws2_32' library (-lws2_32). */ #undef HAVE_LIBWS2_32 /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_TCP_H /* Define to 1 if you have the `perror' function. */ #undef HAVE_PERROR /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EVENTFD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UIO_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Force to use mutexes */ #undef ZMQ_FORCE_MUTEXES /* Have AIX OS */ #undef ZMQ_HAVE_AIX /* Have Android OS */ #undef ZMQ_HAVE_ANDROID /* Have Cygwin */ #undef ZMQ_HAVE_CYGWIN /* Have eventfd extension. */ #undef ZMQ_HAVE_EVENTFD /* Have FreeBSD OS */ #undef ZMQ_HAVE_FREEBSD /* Have HPUX OS */ #undef ZMQ_HAVE_HPUX /* Have ifaddrs.h header. */ #undef ZMQ_HAVE_IFADDRS /* Have Linux OS */ #undef ZMQ_HAVE_LINUX /* Have MinGW32 */ #undef ZMQ_HAVE_MINGW32 /* Have NetBSD OS */ #undef ZMQ_HAVE_NETBSD /* Have OpenBSD OS */ #undef ZMQ_HAVE_OPENBSD /* Have OpenPGM extension */ #undef ZMQ_HAVE_OPENPGM /* Have DarwinOSX OS */ #undef ZMQ_HAVE_OSX /* Have QNX Neutrino OS */ #undef ZMQ_HAVE_QNXNTO /* Whether SOCK_CLOEXEC is defined and functioning. */ #undef ZMQ_HAVE_SOCK_CLOEXEC /* Have Solaris OS */ #undef ZMQ_HAVE_SOLARIS /* Whether SO_KEEPALIVE is supported. */ #undef ZMQ_HAVE_SO_KEEPALIVE /* Whether TCP_KEEPALIVE is supported. */ #undef ZMQ_HAVE_TCP_KEEPALIVE /* Whether TCP_KEEPCNT is supported. */ #undef ZMQ_HAVE_TCP_KEEPCNT /* Whether TCP_KEEPIDLE is supported. */ #undef ZMQ_HAVE_TCP_KEEPIDLE /* Whether TCP_KEEPINTVL is supported. */ #undef ZMQ_HAVE_TCP_KEEPINTVL /* Have uio.h header. */ #undef ZMQ_HAVE_UIO /* Have Windows OS */ #undef ZMQ_HAVE_WINDOWS /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #undef volatile zeromq3-4.0.4+dfsg.orig/src/i_engine.hpp0000644000175000017500000000325512240736636017026 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_I_ENGINE_HPP_INCLUDED__ #define __ZMQ_I_ENGINE_HPP_INCLUDED__ namespace zmq { class io_thread_t; // Abstract interface to be implemented by various engines. struct i_engine { virtual ~i_engine () {} // Plug the engine to the session. virtual void plug (zmq::io_thread_t *io_thread_, class session_base_t *session_) = 0; // Terminate and deallocate the engine. Note that 'detached' // events are not fired on termination. virtual void terminate () = 0; // This method is called by the session to signalise that more // messages can be written to the pipe. virtual void restart_input () = 0; // This method is called by the session to signalise that there // are messages to send available. virtual void restart_output () = 0; virtual void zap_msg_available () = 0; }; } #endif zeromq3-4.0.4+dfsg.orig/src/reaper.cpp0000644000175000017500000000547712240736636016532 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "reaper.hpp" #include "socket_base.hpp" #include "err.hpp" zmq::reaper_t::reaper_t (class ctx_t *ctx_, uint32_t tid_) : object_t (ctx_, tid_), sockets (0), terminating (false) { poller = new (std::nothrow) poller_t; alloc_assert (poller); mailbox_handle = poller->add_fd (mailbox.get_fd (), this); poller->set_pollin (mailbox_handle); #ifdef HAVE_FORK pid = getpid(); #endif } zmq::reaper_t::~reaper_t () { delete poller; } zmq::mailbox_t *zmq::reaper_t::get_mailbox () { return &mailbox; } void zmq::reaper_t::start () { // Start the thread. poller->start (); } void zmq::reaper_t::stop () { send_stop (); } void zmq::reaper_t::in_event () { while (true) { #ifdef HAVE_FORK if (unlikely(pid != getpid())) { //printf("zmq::reaper_t::in_event return in child process %d\n", (int)getpid()); return; } #endif // Get the next command. If there is none, exit. command_t cmd; int rc = mailbox.recv (&cmd, 0); if (rc != 0 && errno == EINTR) continue; if (rc != 0 && errno == EAGAIN) break; errno_assert (rc == 0); // Process the command. cmd.destination->process_command (cmd); } } void zmq::reaper_t::out_event () { zmq_assert (false); } void zmq::reaper_t::timer_event (int) { zmq_assert (false); } void zmq::reaper_t::process_stop () { terminating = true; // If there are no sockets being reaped finish immediately. if (!sockets) { send_done (); poller->rm_fd (mailbox_handle); poller->stop (); } } void zmq::reaper_t::process_reap (socket_base_t *socket_) { // Add the socket to the poller. socket_->start_reaping (poller); ++sockets; } void zmq::reaper_t::process_reaped () { --sockets; // If reaped was already asked to terminate and there are no more sockets, // finish immediately. if (!sockets && terminating) { send_done (); poller->rm_fd (mailbox_handle); poller->stop (); } } zeromq3-4.0.4+dfsg.orig/src/pub.hpp0000644000175000017500000000246012240736636016034 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PUB_HPP_INCLUDED__ #define __ZMQ_PUB_HPP_INCLUDED__ #include "xpub.hpp" namespace zmq { class ctx_t; class io_thread_t; class socket_base_t; class msg_t; class pub_t : public xpub_t { public: pub_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_); ~pub_t (); // Implementations of virtual functions from socket_base_t. int xrecv (zmq::msg_t *msg_); bool xhas_in (); private: pub_t (const pub_t&); const pub_t &operator = (const pub_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/clock.cpp0000644000175000017500000001317012307426216016326 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "clock.hpp" #include "platform.hpp" #include "likely.hpp" #include "config.hpp" #include "err.hpp" #include "mutex.hpp" #include #if defined _MSC_VER #if defined _WIN32_WCE #include #else #include #endif #endif #if !defined ZMQ_HAVE_WINDOWS #include #endif #if defined HAVE_CLOCK_GETTIME || defined HAVE_GETHRTIME #include #endif #ifdef ZMQ_HAVE_WINDOWS typedef ULONGLONG (*f_compatible_get_tick_count64)(); static zmq::mutex_t compatible_get_tick_count64_mutex; ULONGLONG compatible_get_tick_count64() { compatible_get_tick_count64_mutex.lock(); static DWORD s_wrap = 0; static DWORD s_last_tick = 0; const DWORD current_tick = ::GetTickCount(); if (current_tick < s_last_tick) ++s_wrap; s_last_tick = current_tick; const ULONGLONG result = (static_cast(s_wrap) << 32) + static_cast(current_tick); compatible_get_tick_count64_mutex.unlock(); return result; } f_compatible_get_tick_count64 init_compatible_get_tick_count64() { f_compatible_get_tick_count64 func = NULL; HMODULE module = ::LoadLibraryA("Kernel32.dll"); if (module != NULL) func = reinterpret_cast(::GetProcAddress(module, "GetTickCount64")); if (func == NULL) func = compatible_get_tick_count64; return func; } static f_compatible_get_tick_count64 my_get_tick_count64 = init_compatible_get_tick_count64(); #endif zmq::clock_t::clock_t () : last_tsc (rdtsc ()), #ifdef ZMQ_HAVE_WINDOWS last_time (static_cast((*my_get_tick_count64)())) #else last_time (now_us () / 1000) #endif { } zmq::clock_t::~clock_t () { } uint64_t zmq::clock_t::now_us () { #if defined ZMQ_HAVE_WINDOWS // Get the high resolution counter's accuracy. LARGE_INTEGER ticksPerSecond; QueryPerformanceFrequency (&ticksPerSecond); // What time is it? LARGE_INTEGER tick; QueryPerformanceCounter (&tick); // Convert the tick number into the number of seconds // since the system was started. double ticks_div = ticksPerSecond.QuadPart / 1000000.0; return (uint64_t) (tick.QuadPart / ticks_div); #elif defined HAVE_CLOCK_GETTIME && defined CLOCK_MONOTONIC // Use POSIX clock_gettime function to get precise monotonic time. struct timespec tv; int rc = clock_gettime (CLOCK_MONOTONIC, &tv); // Fix case where system has clock_gettime but CLOCK_MONOTONIC is not supported. // This should be a configuration check, but I looked into it and writing an // AC_FUNC_CLOCK_MONOTONIC seems beyond my powers. if( rc != 0) { // Use POSIX gettimeofday function to get precise time. struct timeval tv; int rc = gettimeofday (&tv, NULL); errno_assert (rc == 0); return (tv.tv_sec * (uint64_t) 1000000 + tv.tv_usec); } return (tv.tv_sec * (uint64_t) 1000000 + tv.tv_nsec / 1000); #elif defined HAVE_GETHRTIME return (gethrtime () / 1000); #else // Use POSIX gettimeofday function to get precise time. struct timeval tv; int rc = gettimeofday (&tv, NULL); errno_assert (rc == 0); return (tv.tv_sec * (uint64_t) 1000000 + tv.tv_usec); #endif } uint64_t zmq::clock_t::now_ms () { uint64_t tsc = rdtsc (); // If TSC is not supported, get precise time and chop off the microseconds. if (!tsc) { #ifdef ZMQ_HAVE_WINDOWS // Under Windows, now_us is not so reliable since QueryPerformanceCounter // does not guarantee that it will use a hardware that offers a monotonic timer. // So, lets use GetTickCount when GetTickCount64 is not available with an workaround // to its 32 bit limitation. return static_cast((*my_get_tick_count64)()); #else return now_us () / 1000; #endif } // If TSC haven't jumped back (in case of migration to a different // CPU core) and if not too much time elapsed since last measurement, // we can return cached time value. if (likely (tsc - last_tsc <= (clock_precision / 2) && tsc >= last_tsc)) return last_time; last_tsc = tsc; #ifdef ZMQ_HAVE_WINDOWS last_time = static_cast((*my_get_tick_count64)()); #else last_time = now_us () / 1000; #endif return last_time; } uint64_t zmq::clock_t::rdtsc () { #if (defined _MSC_VER && (defined _M_IX86 || defined _M_X64)) return __rdtsc (); #elif (defined __GNUC__ && (defined __i386__ || defined __x86_64__)) uint32_t low, high; __asm__ volatile ("rdtsc" : "=a" (low), "=d" (high)); return (uint64_t) high << 32 | low; #elif (defined __SUNPRO_CC && (__SUNPRO_CC >= 0x5100) && (defined __i386 || \ defined __amd64 || defined __x86_64)) union { uint64_t u64val; uint32_t u32val [2]; } tsc; asm("rdtsc" : "=a" (tsc.u32val [0]), "=d" (tsc.u32val [1])); return tsc.u64val; #elif defined(__s390__) uint64_t tsc; asm("\tstck\t%0\n" : "=Q" (tsc) : : "cc"); return(tsc); #else return 0; #endif } zeromq3-4.0.4+dfsg.orig/src/curve_server.hpp0000644000175000017500000000641412240736636017763 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_CURVE_SERVER_HPP_INCLUDED__ #define __ZMQ_CURVE_SERVER_HPP_INCLUDED__ #include "platform.hpp" #ifdef HAVE_LIBSODIUM #include #if crypto_box_NONCEBYTES != 24 \ || crypto_box_PUBLICKEYBYTES != 32 \ || crypto_box_SECRETKEYBYTES != 32 \ || crypto_box_ZEROBYTES != 32 \ || crypto_box_BOXZEROBYTES != 16 \ || crypto_secretbox_NONCEBYTES != 24 \ || crypto_secretbox_ZEROBYTES != 32 \ || crypto_secretbox_BOXZEROBYTES != 16 #error "libsodium not built properly" #endif #include "mechanism.hpp" #include "options.hpp" namespace zmq { class msg_t; class session_base_t; class curve_server_t : public mechanism_t { public: curve_server_t (session_base_t *session_, const std::string &peer_address_, const options_t &options_); virtual ~curve_server_t (); // mechanism implementation virtual int next_handshake_command (msg_t *msg_); virtual int process_handshake_command (msg_t *msg_); virtual int encode (msg_t *msg_); virtual int decode (msg_t *msg_); virtual int zap_msg_available (); virtual bool is_handshake_complete () const; private: enum state_t { expect_hello, send_welcome, expect_initiate, expect_zap_reply, send_ready, connected }; session_base_t * const session; const std::string peer_address; // Current FSM state state_t state; // True iff we are awaiting reply from ZAP handler. bool expecting_zap_reply; uint64_t cn_nonce; // Our secret key (s) uint8_t secret_key [crypto_box_SECRETKEYBYTES]; // Our short-term public key (S') uint8_t cn_public [crypto_box_PUBLICKEYBYTES]; // Our short-term secret key (s') uint8_t cn_secret [crypto_box_SECRETKEYBYTES]; // Client's short-term public key (C') uint8_t cn_client [crypto_box_PUBLICKEYBYTES]; // Key used to produce cookie uint8_t cookie_key [crypto_secretbox_KEYBYTES]; // Intermediary buffer used to speed up boxing and unboxing. uint8_t cn_precom [crypto_box_BEFORENMBYTES]; int process_hello (msg_t *msg_); int produce_welcome (msg_t *msg_); int process_initiate (msg_t *msg_); int produce_ready (msg_t *msg_); void send_zap_request (const uint8_t *key); int receive_and_process_zap_reply (); }; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/likely.hpp0000644000175000017500000000177012240736636016542 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_LIKELY_HPP_INCLUDED__ #define __ZMQ_LIKELY_HPP_INCLUDED__ #if defined __GNUC__ #define likely(x) __builtin_expect ((x), 1) #define unlikely(x) __builtin_expect ((x), 0) #else #define likely(x) (x) #define unlikely(x) (x) #endif #endif zeromq3-4.0.4+dfsg.orig/src/push.hpp0000644000175000017500000000316212240736636016225 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PUSH_HPP_INCLUDED__ #define __ZMQ_PUSH_HPP_INCLUDED__ #include "socket_base.hpp" #include "session_base.hpp" #include "lb.hpp" namespace zmq { class ctx_t; class pipe_t; class msg_t; class io_thread_t; class push_t : public socket_base_t { public: push_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_); ~push_t (); protected: // Overloads of functions from socket_base_t. void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_); int xsend (zmq::msg_t *msg_); bool xhas_out (); void xwrite_activated (zmq::pipe_t *pipe_); void xpipe_terminated (zmq::pipe_t *pipe_); private: // Load balancer managing the outbound pipes. lb_t lb; push_t (const push_t&); const push_t &operator = (const push_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/v2_encoder.cpp0000644000175000017500000000435212240736636017271 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "v2_protocol.hpp" #include "v2_encoder.hpp" #include "likely.hpp" #include "wire.hpp" zmq::v2_encoder_t::v2_encoder_t (size_t bufsize_) : encoder_base_t (bufsize_) { // Write 0 bytes to the batch and go to message_ready state. next_step (NULL, 0, &v2_encoder_t::message_ready, true); } zmq::v2_encoder_t::~v2_encoder_t () { } void zmq::v2_encoder_t::message_ready () { // Encode flags. unsigned char &protocol_flags = tmpbuf [0]; protocol_flags = 0; if (in_progress->flags () & msg_t::more) protocol_flags |= v2_protocol_t::more_flag; if (in_progress->size () > 255) protocol_flags |= v2_protocol_t::large_flag; if (in_progress->flags () & msg_t::command) protocol_flags |= v2_protocol_t::command_flag; // Encode the message length. For messages less then 256 bytes, // the length is encoded as 8-bit unsigned integer. For larger // messages, 64-bit unsigned integer in network byte order is used. const size_t size = in_progress->size (); if (unlikely (size > 255)) { put_uint64 (tmpbuf + 1, size); next_step (tmpbuf, 9, &v2_encoder_t::size_ready, false); } else { tmpbuf [1] = static_cast (size); next_step (tmpbuf, 2, &v2_encoder_t::size_ready, false); } } void zmq::v2_encoder_t::size_ready () { // Write message body into the buffer. next_step (in_progress->data (), in_progress->size (), &v2_encoder_t::message_ready, true); } zeromq3-4.0.4+dfsg.orig/src/session_base.hpp0000644000175000017500000001177512240736636017734 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SESSION_BASE_HPP_INCLUDED__ #define __ZMQ_SESSION_BASE_HPP_INCLUDED__ #include #include #include "own.hpp" #include "io_object.hpp" #include "pipe.hpp" #include "socket_base.hpp" namespace zmq { class pipe_t; class io_thread_t; class socket_base_t; struct i_engine; struct address_t; class session_base_t : public own_t, public io_object_t, public i_pipe_events { public: // Create a session of the particular type. static session_base_t *create (zmq::io_thread_t *io_thread_, bool connect_, zmq::socket_base_t *socket_, const options_t &options_, const address_t *addr_); // To be used once only, when creating the session. void attach_pipe (zmq::pipe_t *pipe_); // Following functions are the interface exposed towards the engine. virtual void reset (); void flush (); void detach (); // i_pipe_events interface implementation. void read_activated (zmq::pipe_t *pipe_); void write_activated (zmq::pipe_t *pipe_); void hiccuped (zmq::pipe_t *pipe_); void pipe_terminated (zmq::pipe_t *pipe_); // Delivers a message. Returns 0 if successful; -1 otherwise. // The function takes ownership of the message. int push_msg (msg_t *msg_); int zap_connect (); // Fetches a message. Returns 0 if successful; -1 otherwise. // The caller is responsible for freeing the message when no // longer used. int pull_msg (msg_t *msg_); // Receives message from ZAP socket. // Returns 0 on success; -1 otherwise. // The caller is responsible for freeing the message. int read_zap_msg (msg_t *msg_); // Sends message to ZAP socket. // Returns 0 on success; -1 otherwise. // The function takes ownership of the message. int write_zap_msg (msg_t *msg_); socket_base_t *get_socket (); protected: session_base_t (zmq::io_thread_t *io_thread_, bool connect_, zmq::socket_base_t *socket_, const options_t &options_, const address_t *addr_); virtual ~session_base_t (); private: void start_connecting (bool wait_); void detached (); // Handlers for incoming commands. void process_plug (); void process_attach (zmq::i_engine *engine_); void process_term (int linger_); // i_poll_events handlers. void timer_event (int id_); // Remove any half processed messages. Flush unflushed messages. // Call this function when engine disconnect to get rid of leftovers. void clean_pipes (); // Call this function to move on with the delayed process_term. void proceed_with_term (); // If true, this session (re)connects to the peer. Otherwise, it's // a transient session created by the listener. bool connect; // Pipe connecting the session to its socket. zmq::pipe_t *pipe; // Pipe used to exchange messages with ZAP socket. zmq::pipe_t *zap_pipe; // This set is added to with pipes we are disconnecting, but haven't yet completed std::set terminating_pipes; // This flag is true if the remainder of the message being processed // is still in the in pipe. bool incomplete_in; // True if termination have been suspended to push the pending // messages to the network. bool pending; // The protocol I/O engine connected to the session. zmq::i_engine *engine; // The socket the session belongs to. zmq::socket_base_t *socket; // I/O thread the session is living in. It will be used to plug in // the engines into the same thread. zmq::io_thread_t *io_thread; // ID of the linger timer enum {linger_timer_id = 0x20}; // True is linger timer is running. bool has_linger_timer; // Protocol and address to use when connecting. const address_t *addr; session_base_t (const session_base_t&); const session_base_t &operator = (const session_base_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/req.cpp0000644000175000017500000001644412240736636016037 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "req.hpp" #include "err.hpp" #include "msg.hpp" #include "wire.hpp" #include "random.hpp" #include "likely.hpp" zmq::req_t::req_t (class ctx_t *parent_, uint32_t tid_, int sid_) : dealer_t (parent_, tid_, sid_), receiving_reply (false), message_begins (true), reply_pipe (NULL), request_id_frames_enabled (false), request_id (generate_random()), strict (true) { options.type = ZMQ_REQ; } zmq::req_t::~req_t () { } int zmq::req_t::xsend (msg_t *msg_) { // If we've sent a request and we still haven't got the reply, // we can't send another request unless the strict option is disabled. if (receiving_reply) { if (strict) { errno = EFSM; return -1; } if (reply_pipe) reply_pipe->terminate (false); receiving_reply = false; message_begins = true; } // First part of the request is the request identity. if (message_begins) { reply_pipe = NULL; if (request_id_frames_enabled) { request_id++; msg_t id; int rc = id.init_data (&request_id, sizeof (request_id), NULL, NULL); errno_assert (rc == 0); id.set_flags (msg_t::more); rc = dealer_t::sendpipe (&id, &reply_pipe); if (rc != 0) return -1; } msg_t bottom; int rc = bottom.init (); errno_assert (rc == 0); bottom.set_flags (msg_t::more); rc = dealer_t::sendpipe (&bottom, &reply_pipe); if (rc != 0) return -1; assert (reply_pipe); message_begins = false; // Eat all currently avaliable messages before the request is fully // sent. This is done to avoid: // REQ sends request to A, A replies, B replies too. // A's reply was first and matches, that is used. // An hour later REQ sends a request to B. B's old reply is used. msg_t drop; while (true) { rc = drop.init (); errno_assert (rc == 0); rc = dealer_t::xrecv (&drop); if (rc != 0) break; drop.close (); } } bool more = msg_->flags () & msg_t::more ? true : false; int rc = dealer_t::xsend (msg_); if (rc != 0) return rc; // If the request was fully sent, flip the FSM into reply-receiving state. if (!more) { receiving_reply = true; message_begins = true; } return 0; } int zmq::req_t::xrecv (msg_t *msg_) { // If request wasn't send, we can't wait for reply. if (!receiving_reply) { errno = EFSM; return -1; } // Skip messages until one with the right first frames is found. while (message_begins) { // If enabled, the first frame must have the correct request_id. if (request_id_frames_enabled) { int rc = recv_reply_pipe (msg_); if (rc != 0) return rc; if (unlikely (!(msg_->flags () & msg_t::more) || msg_->size () != sizeof (request_id) || *static_cast (msg_->data ()) != request_id)) { // Skip the remaining frames and try the next message while (msg_->flags () & msg_t::more) { rc = recv_reply_pipe (msg_); errno_assert (rc == 0); } continue; } } // The next frame must be 0. // TODO: Failing this check should also close the connection with the peer! int rc = recv_reply_pipe (msg_); if (rc != 0) return rc; if (unlikely (!(msg_->flags () & msg_t::more) || msg_->size () != 0)) { // Skip the remaining frames and try the next message while (msg_->flags () & msg_t::more) { rc = recv_reply_pipe (msg_); errno_assert (rc == 0); } continue; } message_begins = false; } int rc = recv_reply_pipe (msg_); if (rc != 0) return rc; // If the reply is fully received, flip the FSM into request-sending state. if (!(msg_->flags () & msg_t::more)) { receiving_reply = false; message_begins = true; } return 0; } bool zmq::req_t::xhas_in () { // TODO: Duplicates should be removed here. if (!receiving_reply) return false; return dealer_t::xhas_in (); } bool zmq::req_t::xhas_out () { if (receiving_reply) return false; return dealer_t::xhas_out (); } int zmq::req_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { bool is_int = (optvallen_ == sizeof (int)); int value = is_int? *((int *) optval_): 0; switch (option_) { case ZMQ_REQ_CORRELATE: if (is_int && value >= 0) { request_id_frames_enabled = (value != 0); return 0; } break; case ZMQ_REQ_RELAXED: if (is_int && value >= 0) { strict = (value == 0); return 0; } break; default: break; } return dealer_t::xsetsockopt (option_, optval_, optvallen_); } void zmq::req_t::xpipe_terminated (pipe_t *pipe_) { if (reply_pipe == pipe_) reply_pipe = NULL; dealer_t::xpipe_terminated (pipe_); } int zmq::req_t::recv_reply_pipe (msg_t *msg_) { while (true) { pipe_t *pipe = NULL; int rc = dealer_t::recvpipe (msg_, &pipe); if (rc != 0) return rc; if (!reply_pipe || pipe == reply_pipe) return 0; } } zmq::req_session_t::req_session_t (io_thread_t *io_thread_, bool connect_, socket_base_t *socket_, const options_t &options_, const address_t *addr_) : session_base_t (io_thread_, connect_, socket_, options_, addr_), state (bottom) { } zmq::req_session_t::~req_session_t () { } int zmq::req_session_t::push_msg (msg_t *msg_) { switch (state) { case bottom: if (msg_->flags () == msg_t::more && msg_->size () == 0) { state = body; return session_base_t::push_msg (msg_); } break; case body: if (msg_->flags () == msg_t::more) return session_base_t::push_msg (msg_); if (msg_->flags () == 0) { state = bottom; return session_base_t::push_msg (msg_); } break; } errno = EFAULT; return -1; } void zmq::req_session_t::reset () { session_base_t::reset (); state = bottom; } zeromq3-4.0.4+dfsg.orig/src/poller_base.hpp0000644000175000017500000000470212240736636017536 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_POLLER_BASE_HPP_INCLUDED__ #define __ZMQ_POLLER_BASE_HPP_INCLUDED__ #include #include "clock.hpp" #include "atomic_counter.hpp" namespace zmq { struct i_poll_events; class poller_base_t { public: poller_base_t (); virtual ~poller_base_t (); // Returns load of the poller. Note that this function can be // invoked from a different thread! int get_load (); // Add a timeout to expire in timeout_ milliseconds. After the // expiration timer_event on sink_ object will be called with // argument set to id_. void add_timer (int timeout_, zmq::i_poll_events *sink_, int id_); // Cancel the timer created by sink_ object with ID equal to id_. void cancel_timer (zmq::i_poll_events *sink_, int id_); protected: // Called by individual poller implementations to manage the load. void adjust_load (int amount_); // Executes any timers that are due. Returns number of milliseconds // to wait to match the next timer or 0 meaning "no timers". uint64_t execute_timers (); private: // Clock instance private to this I/O thread. clock_t clock; // List of active timers. struct timer_info_t { zmq::i_poll_events *sink; int id; }; typedef std::multimap timers_t; timers_t timers; // Load of the poller. Currently the number of file descriptors // registered. atomic_counter_t load; poller_base_t (const poller_base_t&); const poller_base_t &operator = (const poller_base_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/err.cpp0000644000175000017500000002157412240736636016040 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "err.hpp" #include "platform.hpp" const char *zmq::errno_to_string (int errno_) { switch (errno_) { #if defined ZMQ_HAVE_WINDOWS case ENOTSUP: return "Not supported"; case EPROTONOSUPPORT: return "Protocol not supported"; case ENOBUFS: return "No buffer space available"; case ENETDOWN: return "Network is down"; case EADDRINUSE: return "Address in use"; case EADDRNOTAVAIL: return "Address not available"; case ECONNREFUSED: return "Connection refused"; case EINPROGRESS: return "Operation in progress"; #endif case EFSM: return "Operation cannot be accomplished in current state"; case ENOCOMPATPROTO: return "The protocol is not compatible with the socket type"; case ETERM: return "Context was terminated"; case EMTHREAD: return "No thread available"; default: #if defined _MSC_VER #pragma warning (push) #pragma warning (disable:4996) #endif return strerror (errno_); #if defined _MSC_VER #pragma warning (pop) #endif } } void zmq::zmq_abort(const char *errmsg_) { #if defined ZMQ_HAVE_WINDOWS // Raise STATUS_FATAL_APP_EXIT. ULONG_PTR extra_info [1]; extra_info [0] = (ULONG_PTR) errmsg_; RaiseException (0x40000015, EXCEPTION_NONCONTINUABLE, 1, extra_info); #else (void)errmsg_; abort (); #endif } #ifdef ZMQ_HAVE_WINDOWS const char *zmq::wsa_error() { int no = WSAGetLastError (); // TODO: This is not a generic way to handle this... if (no == WSAEWOULDBLOCK) return NULL; return wsa_error_no (no); } const char *zmq::wsa_error_no (int no_) { // TODO: It seems that list of Windows socket errors is longer than this. // Investigate whether there's a way to convert it into the string // automatically (wsaError->HRESULT->string?). return (no_ == WSABASEERR) ? "No Error" : (no_ == WSAEINTR) ? "Interrupted system call" : (no_ == WSAEBADF) ? "Bad file number" : (no_ == WSAEACCES) ? "Permission denied" : (no_ == WSAEFAULT) ? "Bad address" : (no_ == WSAEINVAL) ? "Invalid argument" : (no_ == WSAEMFILE) ? "Too many open files" : (no_ == WSAEWOULDBLOCK) ? "Operation would block" : (no_ == WSAEINPROGRESS) ? "Operation now in progress" : (no_ == WSAEALREADY) ? "Operation already in progress" : (no_ == WSAENOTSOCK) ? "Socket operation on non-socket" : (no_ == WSAEDESTADDRREQ) ? "Destination address required" : (no_ == WSAEMSGSIZE) ? "Message too long" : (no_ == WSAEPROTOTYPE) ? "Protocol wrong type for socket" : (no_ == WSAENOPROTOOPT) ? "Bad protocol option" : (no_ == WSAEPROTONOSUPPORT) ? "Protocol not supported" : (no_ == WSAESOCKTNOSUPPORT) ? "Socket type not supported" : (no_ == WSAEOPNOTSUPP) ? "Operation not supported on socket" : (no_ == WSAEPFNOSUPPORT) ? "Protocol family not supported" : (no_ == WSAEAFNOSUPPORT) ? "Address family not supported by protocol family" : (no_ == WSAEADDRINUSE) ? "Address already in use" : (no_ == WSAEADDRNOTAVAIL) ? "Can't assign requested address" : (no_ == WSAENETDOWN) ? "Network is down" : (no_ == WSAENETUNREACH) ? "Network is unreachable" : (no_ == WSAENETRESET) ? "Net dropped connection or reset" : (no_ == WSAECONNABORTED) ? "Software caused connection abort" : (no_ == WSAECONNRESET) ? "Connection reset by peer" : (no_ == WSAENOBUFS) ? "No buffer space available" : (no_ == WSAEISCONN) ? "Socket is already connected" : (no_ == WSAENOTCONN) ? "Socket is not connected" : (no_ == WSAESHUTDOWN) ? "Can't send after socket shutdown" : (no_ == WSAETOOMANYREFS) ? "Too many references can't splice" : (no_ == WSAETIMEDOUT) ? "Connection timed out" : (no_ == WSAECONNREFUSED) ? "Connection refused" : (no_ == WSAELOOP) ? "Too many levels of symbolic links" : (no_ == WSAENAMETOOLONG) ? "File name too long" : (no_ == WSAEHOSTDOWN) ? "Host is down" : (no_ == WSAEHOSTUNREACH) ? "No Route to Host" : (no_ == WSAENOTEMPTY) ? "Directory not empty" : (no_ == WSAEPROCLIM) ? "Too many processes" : (no_ == WSAEUSERS) ? "Too many users" : (no_ == WSAEDQUOT) ? "Disc Quota Exceeded" : (no_ == WSAESTALE) ? "Stale NFS file handle" : (no_ == WSAEREMOTE) ? "Too many levels of remote in path" : (no_ == WSASYSNOTREADY) ? "Network SubSystem is unavailable" : (no_ == WSAVERNOTSUPPORTED) ? "WINSOCK DLL Version out of range" : (no_ == WSANOTINITIALISED) ? "Successful WSASTARTUP not yet performed" : (no_ == WSAHOST_NOT_FOUND) ? "Host not found" : (no_ == WSATRY_AGAIN) ? "Non-Authoritative Host not found" : (no_ == WSANO_RECOVERY) ? "Non-Recoverable errors: FORMERR REFUSED NOTIMP" : (no_ == WSANO_DATA) ? "Valid name no data record of requested" : "error not defined"; } void zmq::win_error (char *buffer_, size_t buffer_size_) { DWORD errcode = GetLastError (); #if defined _WIN32_WCE DWORD rc = FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errcode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)buffer_, buffer_size_ / sizeof(wchar_t), NULL ); #else DWORD rc = FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errcode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buffer_, (DWORD) buffer_size_, NULL ); #endif zmq_assert (rc); } int zmq::wsa_error_to_errno (int errcode) { switch (errcode) { // 10009 - File handle is not valid. case WSAEBADF: return EBADF; // 10013 - Permission denied. case WSAEACCES: return EACCES; // 10014 - Bad address. case WSAEFAULT: return EFAULT; // 10022 - Invalid argument. case WSAEINVAL: return EINVAL; // 10024 - Too many open files. case WSAEMFILE: return EMFILE; // 10036 - Operation now in progress. case WSAEINPROGRESS: return EAGAIN; // 10040 - Message too long. case WSAEMSGSIZE: return EMSGSIZE; // 10043 - Protocol not supported. case WSAEPROTONOSUPPORT: return EPROTONOSUPPORT; // 10047 - Address family not supported by protocol family. case WSAEAFNOSUPPORT: return EAFNOSUPPORT; // 10048 - Address already in use. case WSAEADDRINUSE: return EADDRINUSE; // 10049 - Cannot assign requested address. case WSAEADDRNOTAVAIL: return EADDRNOTAVAIL; // 10050 - Network is down. case WSAENETDOWN: return ENETDOWN; // 10051 - Network is unreachable. case WSAENETUNREACH: return ENETUNREACH; // 10052 - Network dropped connection on reset. case WSAENETRESET: return ENETRESET; // 10053 - Software caused connection abort. case WSAECONNABORTED: return ECONNABORTED; // 10054 - Connection reset by peer. case WSAECONNRESET: return ECONNRESET; // 10055 - No buffer space available. case WSAENOBUFS: return ENOBUFS; // 10057 - Socket is not connected. case WSAENOTCONN: return ENOTCONN; // 10060 - Connection timed out. case WSAETIMEDOUT: return ETIMEDOUT; // 10061 - Connection refused. case WSAECONNREFUSED: return ECONNREFUSED; // 10065 - No route to host. case WSAEHOSTUNREACH: return EHOSTUNREACH; default: wsa_assert (false); } // Not reachable return 0; } #endif zeromq3-4.0.4+dfsg.orig/src/ipc_connecter.cpp0000644000175000017500000001544312240736636020061 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "ipc_connecter.hpp" #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS #include #include #include "stream_engine.hpp" #include "io_thread.hpp" #include "platform.hpp" #include "random.hpp" #include "err.hpp" #include "ip.hpp" #include "address.hpp" #include "ipc_address.hpp" #include "session_base.hpp" #include #include #include #include zmq::ipc_connecter_t::ipc_connecter_t (class io_thread_t *io_thread_, class session_base_t *session_, const options_t &options_, const address_t *addr_, bool delayed_start_) : own_t (io_thread_, options_), io_object_t (io_thread_), addr (addr_), s (retired_fd), handle_valid (false), delayed_start (delayed_start_), timer_started (false), session (session_), current_reconnect_ivl(options.reconnect_ivl) { zmq_assert (addr); zmq_assert (addr->protocol == "ipc"); addr->to_string (endpoint); socket = session-> get_socket(); } zmq::ipc_connecter_t::~ipc_connecter_t () { zmq_assert (!timer_started); zmq_assert (!handle_valid); zmq_assert (s == retired_fd); } void zmq::ipc_connecter_t::process_plug () { if (delayed_start) add_reconnect_timer (); else start_connecting (); } void zmq::ipc_connecter_t::process_term (int linger_) { if (timer_started) { cancel_timer (reconnect_timer_id); timer_started = false; } if (handle_valid) { rm_fd (handle); handle_valid = false; } if (s != retired_fd) close (); own_t::process_term (linger_); } void zmq::ipc_connecter_t::in_event () { // We are not polling for incomming data, so we are actually called // because of error here. However, we can get error on out event as well // on some platforms, so we'll simply handle both events in the same way. out_event (); } void zmq::ipc_connecter_t::out_event () { fd_t fd = connect (); rm_fd (handle); handle_valid = false; // Handle the error condition by attempt to reconnect. if (fd == retired_fd) { close (); add_reconnect_timer(); return; } // Create the engine object for this connection. stream_engine_t *engine = new (std::nothrow) stream_engine_t (fd, options, endpoint); alloc_assert (engine); // Attach the engine to the corresponding session object. send_attach (session, engine); // Shut the connecter down. terminate (); socket->event_connected (endpoint, fd); } void zmq::ipc_connecter_t::timer_event (int id_) { zmq_assert (id_ == reconnect_timer_id); timer_started = false; start_connecting (); } void zmq::ipc_connecter_t::start_connecting () { // Open the connecting socket. int rc = open (); // Connect may succeed in synchronous manner. if (rc == 0) { handle = add_fd (s); handle_valid = true; out_event (); } // Connection establishment may be delayed. Poll for its completion. else if (rc == -1 && errno == EINPROGRESS) { handle = add_fd (s); handle_valid = true; set_pollout (handle); socket->event_connect_delayed (endpoint, zmq_errno()); } // Handle any other error condition by eventual reconnect. else { if (s != retired_fd) close (); add_reconnect_timer (); } } void zmq::ipc_connecter_t::add_reconnect_timer() { int rc_ivl = get_new_reconnect_ivl(); add_timer (rc_ivl, reconnect_timer_id); socket->event_connect_retried (endpoint, rc_ivl); timer_started = true; } int zmq::ipc_connecter_t::get_new_reconnect_ivl () { // The new interval is the current interval + random value. int this_interval = current_reconnect_ivl + (generate_random () % options.reconnect_ivl); // Only change the current reconnect interval if the maximum reconnect // interval was set and if it's larger than the reconnect interval. if (options.reconnect_ivl_max > 0 && options.reconnect_ivl_max > options.reconnect_ivl) { // Calculate the next interval current_reconnect_ivl = current_reconnect_ivl * 2; if(current_reconnect_ivl >= options.reconnect_ivl_max) { current_reconnect_ivl = options.reconnect_ivl_max; } } return this_interval; } int zmq::ipc_connecter_t::open () { zmq_assert (s == retired_fd); // Create the socket. s = open_socket (AF_UNIX, SOCK_STREAM, 0); if (s == -1) return -1; // Set the non-blocking flag. unblock_socket (s); // Connect to the remote peer. int rc = ::connect ( s, addr->resolved.ipc_addr->addr (), addr->resolved.ipc_addr->addrlen ()); // Connect was successfull immediately. if (rc == 0) return 0; // Translate other error codes indicating asynchronous connect has been // launched to a uniform EINPROGRESS. if (rc == -1 && errno == EINTR) { errno = EINPROGRESS; return -1; } // Forward the error. return -1; } int zmq::ipc_connecter_t::close () { zmq_assert (s != retired_fd); int rc = ::close (s); errno_assert (rc == 0); socket->event_closed (endpoint, s); s = retired_fd; return 0; } zmq::fd_t zmq::ipc_connecter_t::connect () { // Following code should handle both Berkeley-derived socket // implementations and Solaris. int err = 0; #if defined ZMQ_HAVE_HPUX int len = sizeof (err); #else socklen_t len = sizeof (err); #endif int rc = getsockopt (s, SOL_SOCKET, SO_ERROR, (char*) &err, &len); if (rc == -1) err = errno; if (err != 0) { // Assert if the error was caused by 0MQ bug. // Networking problems are OK. No need to assert. errno = err; errno_assert (errno == ECONNREFUSED || errno == ECONNRESET || errno == ETIMEDOUT || errno == EHOSTUNREACH || errno == ENETUNREACH || errno == ENETDOWN); return retired_fd; } fd_t result = s; s = retired_fd; return result; } #endif zeromq3-4.0.4+dfsg.orig/src/ipc_connecter.hpp0000644000175000017500000000727012240736636020065 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __IPC_CONNECTER_HPP_INCLUDED__ #define __IPC_CONNECTER_HPP_INCLUDED__ #include "platform.hpp" #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS #include "fd.hpp" #include "own.hpp" #include "stdint.hpp" #include "io_object.hpp" namespace zmq { class io_thread_t; class session_base_t; struct address_t; class ipc_connecter_t : public own_t, public io_object_t { public: // If 'delayed_start' is true connecter first waits for a while, // then starts connection process. ipc_connecter_t (zmq::io_thread_t *io_thread_, zmq::session_base_t *session_, const options_t &options_, const address_t *addr_, bool delayed_start_); ~ipc_connecter_t (); private: // ID of the timer used to delay the reconnection. enum {reconnect_timer_id = 1}; // Handlers for incoming commands. void process_plug (); void process_term (int linger_); // Handlers for I/O events. void in_event (); void out_event (); void timer_event (int id_); // Internal function to start the actual connection establishment. void start_connecting (); // Internal function to add a reconnect timer void add_reconnect_timer(); // Internal function to return a reconnect backoff delay. // Will modify the current_reconnect_ivl used for next call // Returns the currently used interval int get_new_reconnect_ivl (); // Open IPC connecting socket. Returns -1 in case of error, // 0 if connect was successfull immediately. Returns -1 with // EAGAIN errno if async connect was launched. int open (); // Close the connecting socket. int close (); // Get the file descriptor of newly created connection. Returns // retired_fd if the connection was unsuccessfull. fd_t connect (); // Address to connect to. Owned by session_base_t. const address_t *addr; // Underlying socket. fd_t s; // Handle corresponding to the listening socket. handle_t handle; // If true file descriptor is registered with the poller and 'handle' // contains valid value. bool handle_valid; // If true, connecter is waiting a while before trying to connect. const bool delayed_start; // True iff a timer has been started. bool timer_started; // Reference to the session we belong to. zmq::session_base_t *session; // Current reconnect ivl, updated for backoff strategy int current_reconnect_ivl; // String representation of endpoint to connect to std::string endpoint; // Socket zmq::socket_base_t *socket; ipc_connecter_t (const ipc_connecter_t&); const ipc_connecter_t &operator = (const ipc_connecter_t&); }; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/windows.hpp0000755000175000017500000001123012307426216016730 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_WINDOWS_HPP_INCLUDED__ #define __ZMQ_WINDOWS_HPP_INCLUDED__ // The purpose of this header file is to turn on only the items actually // needed on the windows platform. #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #ifndef NOGDICAPMASKS #define NOGDICAPMASKS // CC_*, LC_*, PC_*, CP_*, TC_*, RC_ #endif #ifndef NOVIRTUALKEYCODES #define NOVIRTUALKEYCODES // VK_* #endif #ifndef NOWINMESSAGES #define NOWINMESSAGES // WM_*, EM_*, LB_*, CB_* #endif #ifndef NOWINSTYLES #define NOWINSTYLES // WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_* #endif #ifndef NOSYSMETRICS #define NOSYSMETRICS // SM_* #endif #ifndef NOMENUS #define NOMENUS // MF_* #endif #ifndef NOICONS #define NOICONS // IDI_* #endif #ifndef NOKEYSTATES #define NOKEYSTATES // MK_* #endif #ifndef NOSYSCOMMANDS #define NOSYSCOMMANDS // SC_* #endif #ifndef NORASTEROPS #define NORASTEROPS // Binary and Tertiary raster ops #endif #ifndef NOSHOWWINDOW #define NOSHOWWINDOW // SW_* #endif #ifndef OEMRESOURCE #define OEMRESOURCE // OEM Resource values #endif #ifndef NOATOM #define NOATOM // Atom Manager routines #endif #ifndef NOCLIPBOARD #define NOCLIPBOARD // Clipboard routines #endif #ifndef NOCOLOR #define NOCOLOR // Screen colors #endif #ifndef NOCTLMGR #define NOCTLMGR // Control and Dialog routines #endif #ifndef NODRAWTEXT #define NODRAWTEXT // DrawText() and DT_* #endif #ifndef NOGDI #define NOGDI // All GDI defines and routines #endif #ifndef NOKERNEL #define NOKERNEL // All KERNEL defines and routines #endif #ifndef NOUSER #define NOUSER // All USER defines and routines #endif #ifndef NONLS #define NONLS // All NLS defines and routines #endif #ifndef NOMB #define NOMB // MB_* and MessageBox() #endif #ifndef NOMEMMGR #define NOMEMMGR // GMEM_*, LMEM_*, GHND, LHND, associated routines #endif #ifndef NOMETAFILE #define NOMETAFILE // typedef METAFILEPICT #endif #ifndef NOMINMAX #define NOMINMAX // Macros min(a,b) and max(a,b) #endif #ifndef NOMSG #define NOMSG // typedef MSG and associated routines #endif #ifndef NOOPENFILE #define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_* #endif #ifndef NOSCROLL #define NOSCROLL // SB_* and scrolling routines #endif #ifndef NOSERVICE #define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc. #endif #ifndef NOSOUND #define NOSOUND // Sound driver routines #endif #ifndef NOTEXTMETRIC #define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines #endif #ifndef NOWH #define NOWH // SetWindowsHook and WH_* #endif #ifndef NOWINOFFSETS #define NOWINOFFSETS // GWL_*, GCL_*, associated routines #endif #ifndef NOCOMM #define NOCOMM // COMM driver routines #endif #ifndef NOKANJI #define NOKANJI // Kanji support stuff. #endif #ifndef NOHELP #define NOHELP // Help engine interface. #endif #ifndef NOPROFILER #define NOPROFILER // Profiler interface. #endif #ifndef NODEFERWINDOWPOS #define NODEFERWINDOWPOS // DeferWindowPos routines #endif #ifndef NOMCX #define NOMCX // Modem Configuration ExtensionsA #endif // Set target version to Windows Server 2003, Windows XP/SP1 or higher. #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #include #ifdef __MINGW32__ // Require Windows XP or higher with MinGW for getaddrinfo(). #if(_WIN32_WINNT >= 0x0501) #else #undef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #endif #include #include #include #include #include #if !defined _WIN32_WCE #include #endif // In MinGW environment AI_NUMERICSERV is not defined. #ifndef AI_NUMERICSERV #define AI_NUMERICSERV 0x0400 #endif #endif zeromq3-4.0.4+dfsg.orig/src/pgm_socket.cpp0000644000175000017500000005324012240736636017376 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #ifdef ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #ifdef ZMQ_HAVE_LINUX #include #endif #include #include #include #include "options.hpp" #include "pgm_socket.hpp" #include "config.hpp" #include "err.hpp" #include "random.hpp" #include "stdint.hpp" #ifndef MSG_ERRQUEUE #define MSG_ERRQUEUE 0x2000 #endif zmq::pgm_socket_t::pgm_socket_t (bool receiver_, const options_t &options_) : sock (NULL), options (options_), receiver (receiver_), pgm_msgv (NULL), pgm_msgv_len (0), nbytes_rec (0), nbytes_processed (0), pgm_msgv_processed (0) { } // Resolve PGM socket address. // network_ of the form : // e.g. eth0;239.192.0.1:7500 // link-local;224.250.0.1,224.250.0.2;224.250.0.3:8000 // ;[fe80::1%en0]:7500 int zmq::pgm_socket_t::init_address (const char *network_, struct pgm_addrinfo_t **res, uint16_t *port_number) { // Parse port number, start from end for IPv6 const char *port_delim = strrchr (network_, ':'); if (!port_delim) { errno = EINVAL; return -1; } *port_number = atoi (port_delim + 1); char network [256]; if (port_delim - network_ >= (int) sizeof (network) - 1) { errno = EINVAL; return -1; } memset (network, '\0', sizeof (network)); memcpy (network, network_, port_delim - network_); pgm_error_t *pgm_error = NULL; struct pgm_addrinfo_t hints; memset (&hints, 0, sizeof (hints)); hints.ai_family = AF_UNSPEC; if (!pgm_getaddrinfo (network, NULL, res, &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); if (pgm_error->domain == PGM_ERROR_DOMAIN_IF && // NB: cannot catch EAI_BADFLAGS. ( pgm_error->code != PGM_ERROR_SERVICE && pgm_error->code != PGM_ERROR_SOCKTNOSUPPORT)) { // User, host, or network configuration or transient error. pgm_error_free (pgm_error); errno = EINVAL; return -1; } // Fatal OpenPGM internal error. zmq_assert (false); } return 0; } // Create, bind and connect PGM socket. int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_) { // Can not open transport before destroying old one. zmq_assert (sock == NULL); zmq_assert (options.rate > 0); // Zero counter used in msgrecv. nbytes_rec = 0; nbytes_processed = 0; pgm_msgv_processed = 0; uint16_t port_number; struct pgm_addrinfo_t *res = NULL; sa_family_t sa_family; pgm_error_t *pgm_error = NULL; if (init_address(network_, &res, &port_number) < 0) { goto err_abort; } zmq_assert (res != NULL); // Pick up detected IP family. sa_family = res->ai_send_addrs[0].gsr_group.ss_family; // Create IP/PGM or UDP/PGM socket. if (udp_encapsulation_) { if (!pgm_socket (&sock, sa_family, SOCK_SEQPACKET, IPPROTO_UDP, &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); if (pgm_error->domain == PGM_ERROR_DOMAIN_SOCKET && ( pgm_error->code != PGM_ERROR_BADF && pgm_error->code != PGM_ERROR_FAULT && pgm_error->code != PGM_ERROR_NOPROTOOPT && pgm_error->code != PGM_ERROR_FAILED)) // User, host, or network configuration or transient error. goto err_abort; // Fatal OpenPGM internal error. zmq_assert (false); } // All options are of data type int const int encapsulation_port = port_number; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_UDP_ENCAP_UCAST_PORT, &encapsulation_port, sizeof (encapsulation_port))) goto err_abort; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_UDP_ENCAP_MCAST_PORT, &encapsulation_port, sizeof (encapsulation_port))) goto err_abort; } else { if (!pgm_socket (&sock, sa_family, SOCK_SEQPACKET, IPPROTO_PGM, &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); if (pgm_error->domain == PGM_ERROR_DOMAIN_SOCKET && ( pgm_error->code != PGM_ERROR_BADF && pgm_error->code != PGM_ERROR_FAULT && pgm_error->code != PGM_ERROR_NOPROTOOPT && pgm_error->code != PGM_ERROR_FAILED)) // User, host, or network configuration or transient error. goto err_abort; // Fatal OpenPGM internal error. zmq_assert (false); } } { const int rcvbuf = (int) options.rcvbuf; if (rcvbuf) { if (!pgm_setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof (rcvbuf))) goto err_abort; } const int sndbuf = (int) options.sndbuf; if (sndbuf) { if (!pgm_setsockopt (sock, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof (sndbuf))) goto err_abort; } const int max_tpdu = (int) pgm_max_tpdu; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_MTU, &max_tpdu, sizeof (max_tpdu))) goto err_abort; } if (receiver) { const int recv_only = 1, rxw_max_tpdu = (int) pgm_max_tpdu, rxw_sqns = compute_sqns (rxw_max_tpdu), peer_expiry = pgm_secs (300), spmr_expiry = pgm_msecs (25), nak_bo_ivl = pgm_msecs (50), nak_rpt_ivl = pgm_msecs (200), nak_rdata_ivl = pgm_msecs (200), nak_data_retries = 50, nak_ncf_retries = 50; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_RECV_ONLY, &recv_only, sizeof (recv_only)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_RXW_SQNS, &rxw_sqns, sizeof (rxw_sqns)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_PEER_EXPIRY, &peer_expiry, sizeof (peer_expiry)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_SPMR_EXPIRY, &spmr_expiry, sizeof (spmr_expiry)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_BO_IVL, &nak_bo_ivl, sizeof (nak_bo_ivl)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_RPT_IVL, &nak_rpt_ivl, sizeof (nak_rpt_ivl)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_RDATA_IVL, &nak_rdata_ivl, sizeof (nak_rdata_ivl)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_DATA_RETRIES, &nak_data_retries, sizeof (nak_data_retries)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_NCF_RETRIES, &nak_ncf_retries, sizeof (nak_ncf_retries))) goto err_abort; } else { const int send_only = 1, max_rte = (int) ((options.rate * 1000) / 8), txw_max_tpdu = (int) pgm_max_tpdu, txw_sqns = compute_sqns (txw_max_tpdu), ambient_spm = pgm_secs (30), heartbeat_spm[] = { pgm_msecs (100), pgm_msecs (100), pgm_msecs (100), pgm_msecs (100), pgm_msecs (1300), pgm_secs (7), pgm_secs (16), pgm_secs (25), pgm_secs (30) }; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_SEND_ONLY, &send_only, sizeof (send_only)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_ODATA_MAX_RTE, &max_rte, sizeof (max_rte)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_TXW_SQNS, &txw_sqns, sizeof (txw_sqns)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_AMBIENT_SPM, &ambient_spm, sizeof (ambient_spm)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_HEARTBEAT_SPM, &heartbeat_spm, sizeof (heartbeat_spm))) goto err_abort; } // PGM transport GSI. struct pgm_sockaddr_t addr; memset (&addr, 0, sizeof(addr)); addr.sa_port = port_number; addr.sa_addr.sport = DEFAULT_DATA_SOURCE_PORT; // Create random GSI. uint32_t buf [2]; buf [0] = generate_random (); buf [1] = generate_random (); if (!pgm_gsi_create_from_data (&addr.sa_addr.gsi, (uint8_t*) buf, 8)) goto err_abort; // Bind a transport to the specified network devices. struct pgm_interface_req_t if_req; memset (&if_req, 0, sizeof(if_req)); if_req.ir_interface = res->ai_recv_addrs[0].gsr_interface; if_req.ir_scope_id = 0; if (AF_INET6 == sa_family) { struct sockaddr_in6 sa6; memcpy (&sa6, &res->ai_recv_addrs[0].gsr_group, sizeof (sa6)); if_req.ir_scope_id = sa6.sin6_scope_id; } if (!pgm_bind3 (sock, &addr, sizeof (addr), &if_req, sizeof (if_req), &if_req, sizeof (if_req), &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); if ((pgm_error->domain == PGM_ERROR_DOMAIN_SOCKET || pgm_error->domain == PGM_ERROR_DOMAIN_IF) && ( pgm_error->code != PGM_ERROR_INVAL && pgm_error->code != PGM_ERROR_BADF && pgm_error->code != PGM_ERROR_FAULT)) // User, host, or network configuration or transient error. goto err_abort; // Fatal OpenPGM internal error. zmq_assert (false); } // Join IP multicast groups. for (unsigned i = 0; i < res->ai_recv_addrs_len; i++) { if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_JOIN_GROUP, &res->ai_recv_addrs [i], sizeof (struct group_req))) goto err_abort; } if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_SEND_GROUP, &res->ai_send_addrs [0], sizeof (struct group_req))) goto err_abort; pgm_freeaddrinfo (res); res = NULL; // Set IP level parameters. { // Multicast loopback disabled by default const int multicast_loop = 0; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_MULTICAST_LOOP, &multicast_loop, sizeof (multicast_loop))) goto err_abort; const int multicast_hops = options.multicast_hops; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_MULTICAST_HOPS, &multicast_hops, sizeof (multicast_hops))) goto err_abort; // Expedited Forwarding PHB for network elements, no ECN. // Ignore return value due to varied runtime support. const int dscp = 0x2e << 2; if (AF_INET6 != sa_family) pgm_setsockopt (sock, IPPROTO_PGM, PGM_TOS, &dscp, sizeof (dscp)); const int nonblocking = 1; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_NOBLOCK, &nonblocking, sizeof (nonblocking))) goto err_abort; } // Connect PGM transport to start state machine. if (!pgm_connect (sock, &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); goto err_abort; } // For receiver transport preallocate pgm_msgv array. if (receiver) { zmq_assert (in_batch_size > 0); size_t max_tsdu_size = get_max_tsdu_size (); pgm_msgv_len = (int) in_batch_size / max_tsdu_size; if ((int) in_batch_size % max_tsdu_size) pgm_msgv_len++; zmq_assert (pgm_msgv_len); pgm_msgv = (pgm_msgv_t*) malloc (sizeof (pgm_msgv_t) * pgm_msgv_len); alloc_assert (pgm_msgv); } return 0; err_abort: if (sock != NULL) { pgm_close (sock, FALSE); sock = NULL; } if (res != NULL) { pgm_freeaddrinfo (res); res = NULL; } if (pgm_error != NULL) { pgm_error_free (pgm_error); pgm_error = NULL; } errno = EINVAL; return -1; } zmq::pgm_socket_t::~pgm_socket_t () { if (pgm_msgv) free (pgm_msgv); if (sock) pgm_close (sock, TRUE); } // Get receiver fds. receive_fd_ is signaled for incoming packets, // waiting_pipe_fd_ is signaled for state driven events and data. void zmq::pgm_socket_t::get_receiver_fds (fd_t *receive_fd_, fd_t *waiting_pipe_fd_) { socklen_t socklen; bool rc; zmq_assert (receive_fd_); zmq_assert (waiting_pipe_fd_); socklen = sizeof (*receive_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_RECV_SOCK, receive_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*receive_fd_)); socklen = sizeof (*waiting_pipe_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_PENDING_SOCK, waiting_pipe_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*waiting_pipe_fd_)); } // Get fds and store them into user allocated memory. // send_fd is for non-blocking send wire notifications. // receive_fd_ is for incoming back-channel protocol packets. // rdata_notify_fd_ is raised for waiting repair transmissions. // pending_notify_fd_ is for state driven events. void zmq::pgm_socket_t::get_sender_fds (fd_t *send_fd_, fd_t *receive_fd_, fd_t *rdata_notify_fd_, fd_t *pending_notify_fd_) { socklen_t socklen; bool rc; zmq_assert (send_fd_); zmq_assert (receive_fd_); zmq_assert (rdata_notify_fd_); zmq_assert (pending_notify_fd_); socklen = sizeof (*send_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_SEND_SOCK, send_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*receive_fd_)); socklen = sizeof (*receive_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_RECV_SOCK, receive_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*receive_fd_)); socklen = sizeof (*rdata_notify_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_REPAIR_SOCK, rdata_notify_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*rdata_notify_fd_)); socklen = sizeof (*pending_notify_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_PENDING_SOCK, pending_notify_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*pending_notify_fd_)); } // Send one APDU, transmit window owned memory. // data_len_ must be less than one TPDU. size_t zmq::pgm_socket_t::send (unsigned char *data_, size_t data_len_) { size_t nbytes = 0; const int status = pgm_send (sock, data_, data_len_, &nbytes); // We have to write all data as one packet. if (nbytes > 0) { zmq_assert (status == PGM_IO_STATUS_NORMAL); zmq_assert (nbytes == data_len_); } else { zmq_assert (status == PGM_IO_STATUS_RATE_LIMITED || status == PGM_IO_STATUS_WOULD_BLOCK); if (status == PGM_IO_STATUS_RATE_LIMITED) errno = ENOMEM; else errno = EBUSY; } // Save return value. last_tx_status = status; return nbytes; } long zmq::pgm_socket_t::get_rx_timeout () { if (last_rx_status != PGM_IO_STATUS_RATE_LIMITED && last_rx_status != PGM_IO_STATUS_TIMER_PENDING) return -1; struct timeval tv; socklen_t optlen = sizeof (tv); const bool rc = pgm_getsockopt (sock, IPPROTO_PGM, last_rx_status == PGM_IO_STATUS_RATE_LIMITED ? PGM_RATE_REMAIN : PGM_TIME_REMAIN, &tv, &optlen); zmq_assert (rc); const long timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000); return timeout; } long zmq::pgm_socket_t::get_tx_timeout () { if (last_tx_status != PGM_IO_STATUS_RATE_LIMITED) return -1; struct timeval tv; socklen_t optlen = sizeof (tv); const bool rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_RATE_REMAIN, &tv, &optlen); zmq_assert (rc); const long timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000); return timeout; } // Return max TSDU size without fragmentation from current PGM transport. size_t zmq::pgm_socket_t::get_max_tsdu_size () { int max_tsdu = 0; socklen_t optlen = sizeof (max_tsdu); bool rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_MSS, &max_tsdu, &optlen); zmq_assert (rc); zmq_assert (optlen == sizeof (max_tsdu)); return (size_t) max_tsdu; } // pgm_recvmsgv is called to fill the pgm_msgv array up to pgm_msgv_len. // In subsequent calls data from pgm_msgv structure are returned. ssize_t zmq::pgm_socket_t::receive (void **raw_data_, const pgm_tsi_t **tsi_) { size_t raw_data_len = 0; // We just sent all data from pgm_transport_recvmsgv up // and have to return 0 that another engine in this thread is scheduled. if (nbytes_rec == nbytes_processed && nbytes_rec > 0) { // Reset all the counters. nbytes_rec = 0; nbytes_processed = 0; pgm_msgv_processed = 0; errno = EAGAIN; return 0; } // If we have are going first time or if we have processed all pgm_msgv_t // structure previously read from the pgm socket. if (nbytes_rec == nbytes_processed) { // Check program flow. zmq_assert (pgm_msgv_processed == 0); zmq_assert (nbytes_processed == 0); zmq_assert (nbytes_rec == 0); // Receive a vector of Application Protocol Domain Unit's (APDUs) // from the transport. pgm_error_t *pgm_error = NULL; const int status = pgm_recvmsgv (sock, pgm_msgv, pgm_msgv_len, MSG_ERRQUEUE, &nbytes_rec, &pgm_error); // Invalid parameters. zmq_assert (status != PGM_IO_STATUS_ERROR); last_rx_status = status; // In a case when no ODATA/RDATA fired POLLIN event (SPM...) // pgm_recvmsg returns PGM_IO_STATUS_TIMER_PENDING. if (status == PGM_IO_STATUS_TIMER_PENDING) { zmq_assert (nbytes_rec == 0); // In case if no RDATA/ODATA caused POLLIN 0 is // returned. nbytes_rec = 0; errno = EBUSY; return 0; } // Send SPMR, NAK, ACK is rate limited. if (status == PGM_IO_STATUS_RATE_LIMITED) { zmq_assert (nbytes_rec == 0); // In case if no RDATA/ODATA caused POLLIN 0 is returned. nbytes_rec = 0; errno = ENOMEM; return 0; } // No peers and hence no incoming packets. if (status == PGM_IO_STATUS_WOULD_BLOCK) { zmq_assert (nbytes_rec == 0); // In case if no RDATA/ODATA caused POLLIN 0 is returned. nbytes_rec = 0; errno = EAGAIN; return 0; } // Data loss. if (status == PGM_IO_STATUS_RESET) { struct pgm_sk_buff_t* skb = pgm_msgv [0].msgv_skb [0]; // Save lost data TSI. *tsi_ = &skb->tsi; nbytes_rec = 0; // In case of dala loss -1 is returned. errno = EINVAL; pgm_free_skb (skb); return -1; } zmq_assert (status == PGM_IO_STATUS_NORMAL); } else { zmq_assert (pgm_msgv_processed <= pgm_msgv_len); } // Zero byte payloads are valid in PGM, but not 0MQ protocol. zmq_assert (nbytes_rec > 0); // Only one APDU per pgm_msgv_t structure is allowed. zmq_assert (pgm_msgv [pgm_msgv_processed].msgv_len == 1); struct pgm_sk_buff_t* skb = pgm_msgv [pgm_msgv_processed].msgv_skb [0]; // Take pointers from pgm_msgv_t structure. *raw_data_ = skb->data; raw_data_len = skb->len; // Save current TSI. *tsi_ = &skb->tsi; // Move the the next pgm_msgv_t structure. pgm_msgv_processed++; zmq_assert (pgm_msgv_processed <= pgm_msgv_len); nbytes_processed +=raw_data_len; return raw_data_len; } void zmq::pgm_socket_t::process_upstream () { pgm_msgv_t dummy_msg; size_t dummy_bytes = 0; pgm_error_t *pgm_error = NULL; const int status = pgm_recvmsgv (sock, &dummy_msg, 1, MSG_ERRQUEUE, &dummy_bytes, &pgm_error); // Invalid parameters. zmq_assert (status != PGM_IO_STATUS_ERROR); // No data should be returned. zmq_assert (dummy_bytes == 0 && (status == PGM_IO_STATUS_TIMER_PENDING || status == PGM_IO_STATUS_RATE_LIMITED || status == PGM_IO_STATUS_WOULD_BLOCK)); last_rx_status = status; if (status == PGM_IO_STATUS_TIMER_PENDING) errno = EBUSY; else if (status == PGM_IO_STATUS_RATE_LIMITED) errno = ENOMEM; else errno = EAGAIN; } int zmq::pgm_socket_t::compute_sqns (int tpdu_) { // Convert rate into B/ms. uint64_t rate = uint64_t (options.rate) / 8; // Compute the size of the buffer in bytes. uint64_t size = uint64_t (options.recovery_ivl) * rate; // Translate the size into number of packets. uint64_t sqns = size / tpdu_; // Buffer should be able to hold at least one packet. if (sqns == 0) sqns = 1; return (int) sqns; } #endif zeromq3-4.0.4+dfsg.orig/src/poller_base.cpp0000644000175000017500000000540012240736636017525 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "poller_base.hpp" #include "i_poll_events.hpp" #include "err.hpp" zmq::poller_base_t::poller_base_t () { } zmq::poller_base_t::~poller_base_t () { // Make sure there is no more load on the shutdown. zmq_assert (get_load () == 0); } int zmq::poller_base_t::get_load () { return load.get (); } void zmq::poller_base_t::adjust_load (int amount_) { if (amount_ > 0) load.add (amount_); else if (amount_ < 0) load.sub (-amount_); } void zmq::poller_base_t::add_timer (int timeout_, i_poll_events *sink_, int id_) { uint64_t expiration = clock.now_ms () + timeout_; timer_info_t info = {sink_, id_}; timers.insert (timers_t::value_type (expiration, info)); } void zmq::poller_base_t::cancel_timer (i_poll_events *sink_, int id_) { // Complexity of this operation is O(n). We assume it is rarely used. for (timers_t::iterator it = timers.begin (); it != timers.end (); ++it) if (it->second.sink == sink_ && it->second.id == id_) { timers.erase (it); return; } // Timer not found. zmq_assert (false); } uint64_t zmq::poller_base_t::execute_timers () { // Fast track. if (timers.empty ()) return 0; // Get the current time. uint64_t current = clock.now_ms (); // Execute the timers that are already due. timers_t::iterator it = timers.begin (); while (it != timers.end ()) { // If we have to wait to execute the item, same will be true about // all the following items (multimap is sorted). Thus we can stop // checking the subsequent timers and return the time to wait for // the next timer (at least 1ms). if (it->first > current) return it->first - current; // Trigger the timer. it->second.sink->timer_event (it->second.id); // Remove it from the list of active timers. timers_t::iterator o = it; ++it; timers.erase (o); } // There are no more timers. return 0; } zeromq3-4.0.4+dfsg.orig/src/random.hpp0000644000175000017500000000177612240736636016537 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_RANDOM_HPP_INCLUDED__ #define __ZMQ_RANDOM_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { // Seeds the random number generator. void seed_random (); // Generates random value. uint32_t generate_random (); } #endif zeromq3-4.0.4+dfsg.orig/src/router.hpp0000644000175000017500000000703312240736636016567 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ROUTER_HPP_INCLUDED__ #define __ZMQ_ROUTER_HPP_INCLUDED__ #include #include "socket_base.hpp" #include "session_base.hpp" #include "stdint.hpp" #include "blob.hpp" #include "msg.hpp" #include "fq.hpp" namespace zmq { class ctx_t; class pipe_t; // TODO: This class uses O(n) scheduling. Rewrite it to use O(1) algorithm. class router_t : public socket_base_t { public: router_t (zmq::ctx_t *parent_, uint32_t tid_, int sid); ~router_t (); // Overloads of functions from socket_base_t. void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_); int xsetsockopt (int option_, const void *optval_, size_t optvallen_); int xsend (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_); bool xhas_in (); bool xhas_out (); void xread_activated (zmq::pipe_t *pipe_); void xwrite_activated (zmq::pipe_t *pipe_); void xpipe_terminated (zmq::pipe_t *pipe_); protected: // Rollback any message parts that were sent but not yet flushed. int rollback (); private: // Receive peer id and update lookup map bool identify_peer (pipe_t *pipe_); // Fair queueing object for inbound pipes. fq_t fq; // True iff there is a message held in the pre-fetch buffer. bool prefetched; // If true, the receiver got the message part with // the peer's identity. bool identity_sent; // Holds the prefetched identity. msg_t prefetched_id; // Holds the prefetched message. msg_t prefetched_msg; // If true, more incoming message parts are expected. bool more_in; struct outpipe_t { zmq::pipe_t *pipe; bool active; }; // We keep a set of pipes that have not been identified yet. std::set anonymous_pipes; // Outbound pipes indexed by the peer IDs. typedef std::map outpipes_t; outpipes_t outpipes; // The pipe we are currently writing to. zmq::pipe_t *current_out; // If true, more outgoing message parts are expected. bool more_out; // Peer ID are generated. It's a simple increment and wrap-over // algorithm. This value is the next ID to use (if not used already). uint32_t next_peer_id; // If true, report EAGAIN to the caller instead of silently dropping // the message targeting an unknown peer. bool mandatory; bool raw_sock; // if true, send an empty message to every connected router peer bool probe_router; router_t (const router_t&); const router_t &operator = (const router_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/poll.cpp0000644000175000017500000001102012240736636016177 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "poll.hpp" #if defined ZMQ_USE_POLL #include #include #include #include #include "poll.hpp" #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" zmq::poll_t::poll_t () : retired (false), stopping (false) { } zmq::poll_t::~poll_t () { worker.stop (); } zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_) { // If the file descriptor table is too small expand it. fd_table_t::size_type sz = fd_table.size (); if (sz <= (fd_table_t::size_type) fd_) { fd_table.resize (fd_ + 1); while (sz != (fd_table_t::size_type) (fd_ + 1)) { fd_table [sz].index = retired_fd; ++sz; } } pollfd pfd = {fd_, 0, 0}; pollset.push_back (pfd); zmq_assert (fd_table [fd_].index == retired_fd); fd_table [fd_].index = pollset.size() - 1; fd_table [fd_].events = events_; // Increase the load metric of the thread. adjust_load (1); return fd_; } void zmq::poll_t::rm_fd (handle_t handle_) { fd_t index = fd_table [handle_].index; zmq_assert (index != retired_fd); // Mark the fd as unused. pollset [index].fd = retired_fd; fd_table [handle_].index = retired_fd; retired = true; // Decrease the load metric of the thread. adjust_load (-1); } void zmq::poll_t::set_pollin (handle_t handle_) { int index = fd_table [handle_].index; pollset [index].events |= POLLIN; } void zmq::poll_t::reset_pollin (handle_t handle_) { int index = fd_table [handle_].index; pollset [index].events &= ~((short) POLLIN); } void zmq::poll_t::set_pollout (handle_t handle_) { int index = fd_table [handle_].index; pollset [index].events |= POLLOUT; } void zmq::poll_t::reset_pollout (handle_t handle_) { int index = fd_table [handle_].index; pollset [index].events &= ~((short) POLLOUT); } void zmq::poll_t::start () { worker.start (worker_routine, this); } void zmq::poll_t::stop () { stopping = true; } int zmq::poll_t::max_fds () { return -1; } void zmq::poll_t::loop () { while (!stopping) { // Execute any due timers. int timeout = (int) execute_timers (); // Wait for events. int rc = poll (&pollset [0], pollset.size (), timeout ? timeout : -1); if (rc == -1) { errno_assert (errno == EINTR); continue; } // If there are no events (i.e. it's a timeout) there's no point // in checking the pollset. if (rc == 0) continue; for (pollset_t::size_type i = 0; i != pollset.size (); i++) { zmq_assert (!(pollset [i].revents & POLLNVAL)); if (pollset [i].fd == retired_fd) continue; if (pollset [i].revents & (POLLERR | POLLHUP)) fd_table [pollset [i].fd].events->in_event (); if (pollset [i].fd == retired_fd) continue; if (pollset [i].revents & POLLOUT) fd_table [pollset [i].fd].events->out_event (); if (pollset [i].fd == retired_fd) continue; if (pollset [i].revents & POLLIN) fd_table [pollset [i].fd].events->in_event (); } // Clean up the pollset and update the fd_table accordingly. if (retired) { pollset_t::size_type i = 0; while (i < pollset.size ()) { if (pollset [i].fd == retired_fd) pollset.erase (pollset.begin () + i); else { fd_table [pollset [i].fd].index = i; i ++; } } retired = false; } } } void zmq::poll_t::worker_routine (void *arg_) { ((poll_t*) arg_)->loop (); } #endif zeromq3-4.0.4+dfsg.orig/src/ypipe.hpp0000644000175000017500000001602612240736636016377 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_YPIPE_HPP_INCLUDED__ #define __ZMQ_YPIPE_HPP_INCLUDED__ #include "atomic_ptr.hpp" #include "yqueue.hpp" #include "platform.hpp" #include "ypipe_base.hpp" namespace zmq { // Lock-free queue implementation. // Only a single thread can read from the pipe at any specific moment. // Only a single thread can write to the pipe at any specific moment. // T is the type of the object in the queue. // N is granularity of the pipe, i.e. how many items are needed to // perform next memory allocation. template class ypipe_t : public ypipe_base_t { public: // Initialises the pipe. inline ypipe_t () { // Insert terminator element into the queue. queue.push (); // Let all the pointers to point to the terminator. // (unless pipe is dead, in which case c is set to NULL). r = w = f = &queue.back (); c.set (&queue.back ()); } // The destructor doesn't have to be virtual. It is mad virtual // just to keep ICC and code checking tools from complaining. inline virtual ~ypipe_t () { } // Following function (write) deliberately copies uninitialised data // when used with zmq_msg. Initialising the VSM body for // non-VSM messages won't be good for performance. #ifdef ZMQ_HAVE_OPENVMS #pragma message save #pragma message disable(UNINIT) #endif // Write an item to the pipe. Don't flush it yet. If incomplete is // set to true the item is assumed to be continued by items // subsequently written to the pipe. Incomplete items are never // flushed down the stream. inline void write (const T &value_, bool incomplete_) { // Place the value to the queue, add new terminator element. queue.back () = value_; queue.push (); // Move the "flush up to here" poiter. if (!incomplete_) f = &queue.back (); } #ifdef ZMQ_HAVE_OPENVMS #pragma message restore #endif // Pop an incomplete item from the pipe. Returns true is such // item exists, false otherwise. inline bool unwrite (T *value_) { if (f == &queue.back ()) return false; queue.unpush (); *value_ = queue.back (); return true; } // Flush all the completed items into the pipe. Returns false if // the reader thread is sleeping. In that case, caller is obliged to // wake the reader up before using the pipe again. inline bool flush () { // If there are no un-flushed items, do nothing. if (w == f) return true; // Try to set 'c' to 'f'. if (c.cas (w, f) != w) { // Compare-and-swap was unseccessful because 'c' is NULL. // This means that the reader is asleep. Therefore we don't // care about thread-safeness and update c in non-atomic // manner. We'll return false to let the caller know // that reader is sleeping. c.set (f); w = f; return false; } // Reader is alive. Nothing special to do now. Just move // the 'first un-flushed item' pointer to 'f'. w = f; return true; } // Check whether item is available for reading. inline bool check_read () { // Was the value prefetched already? If so, return. if (&queue.front () != r && r) return true; // There's no prefetched value, so let us prefetch more values. // Prefetching is to simply retrieve the // pointer from c in atomic fashion. If there are no // items to prefetch, set c to NULL (using compare-and-swap). r = c.cas (&queue.front (), NULL); // If there are no elements prefetched, exit. // During pipe's lifetime r should never be NULL, however, // it can happen during pipe shutdown when items // are being deallocated. if (&queue.front () == r || !r) return false; // There was at least one value prefetched. return true; } // Reads an item from the pipe. Returns false if there is no value. // available. inline bool read (T *value_) { // Try to prefetch a value. if (!check_read ()) return false; // There was at least one value prefetched. // Return it to the caller. *value_ = queue.front (); queue.pop (); return true; } // Applies the function fn to the first elemenent in the pipe // and returns the value returned by the fn. // The pipe mustn't be empty or the function crashes. inline bool probe (bool (*fn)(T &)) { bool rc = check_read (); zmq_assert (rc); return (*fn) (queue.front ()); } protected: // Allocation-efficient queue to store pipe items. // Front of the queue points to the first prefetched item, back of // the pipe points to last un-flushed item. Front is used only by // reader thread, while back is used only by writer thread. yqueue_t queue; // Points to the first un-flushed item. This variable is used // exclusively by writer thread. T *w; // Points to the first un-prefetched item. This variable is used // exclusively by reader thread. T *r; // Points to the first item to be flushed in the future. T *f; // The single point of contention between writer and reader thread. // Points past the last flushed item. If it is NULL, // reader is asleep. This pointer should be always accessed using // atomic operations. atomic_ptr_t c; // Disable copying of ypipe object. ypipe_t (const ypipe_t&); const ypipe_t &operator = (const ypipe_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/ip.hpp0000644000175000017500000000262612240736636015662 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_IP_HPP_INCLUDED__ #define __ZMQ_IP_HPP_INCLUDED__ #include #include "fd.hpp" namespace zmq { // Same as socket(2), but allows for transparent tweaking the options. fd_t open_socket (int domain_, int type_, int protocol_); // Sets the socket into non-blocking mode. void unblock_socket (fd_t s_); // Enable IPv4-mapping of addresses in case it is disabled by default. void enable_ipv4_mapping (fd_t s_); // Returns string representation of peer's address. // Socket sockfd_ must be connected. Returns true iff successful. bool get_peer_ip_address (fd_t sockfd_, std::string &ip_addr_); } #endif zeromq3-4.0.4+dfsg.orig/src/options.hpp0000644000175000017500000001046512240736636016745 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_OPTIONS_HPP_INCLUDED__ #define __ZMQ_OPTIONS_HPP_INCLUDED__ #include #include #include "stddef.h" #include "stdint.hpp" #include "tcp_address.hpp" #include "../include/zmq.h" // Normal base 256 key is 32 bytes #define CURVE_KEYSIZE 32 // Key encoded using Z85 is 40 bytes #define CURVE_KEYSIZE_Z85 40 namespace zmq { struct options_t { options_t (); int setsockopt (int option_, const void *optval_, size_t optvallen_); int getsockopt (int option_, void *optval_, size_t *optvallen_); // High-water marks for message pipes. int sndhwm; int rcvhwm; // I/O thread affinity. uint64_t affinity; // Socket identity unsigned char identity_size; unsigned char identity [256]; // Maximum transfer rate [kb/s]. Default 100kb/s. int rate; // Reliability time interval [ms]. Default 10 seconds. int recovery_ivl; // Sets the time-to-live field in every multicast packet sent. int multicast_hops; // SO_SNDBUF and SO_RCVBUF to be passed to underlying transport sockets. int sndbuf; int rcvbuf; // Socket type. int type; // Linger time, in milliseconds. int linger; // Minimum interval between attempts to reconnect, in milliseconds. // Default 100ms int reconnect_ivl; // Maximum interval between attempts to reconnect, in milliseconds. // Default 0 (unused) int reconnect_ivl_max; // Maximum backlog for pending connections. int backlog; // Maximal size of message to handle. int64_t maxmsgsize; // The timeout for send/recv operations for this socket. int rcvtimeo; int sndtimeo; // If true, IPv6 is enabled (as well as IPv4) bool ipv6; // If 1, connecting pipes are not attached immediately, meaning a send() // on a socket with only connecting pipes would block int immediate; // If 1, (X)SUB socket should filter the messages. If 0, it should not. bool filter; // If true, the identity message is forwarded to the socket. bool recv_identity; // if true, router socket accepts non-zmq tcp connections bool raw_sock; // TCP keep-alive settings. // Defaults to -1 = do not change socket options int tcp_keepalive; int tcp_keepalive_cnt; int tcp_keepalive_idle; int tcp_keepalive_intvl; // TCP accept() filters typedef std::vector tcp_accept_filters_t; tcp_accept_filters_t tcp_accept_filters; // Security mechanism for all connections on this socket int mechanism; // If peer is acting as server for PLAIN or CURVE mechanisms int as_server; // ZAP authentication domain std::string zap_domain; // Security credentials for PLAIN mechanism std::string plain_username; std::string plain_password; // Security credentials for CURVE mechanism uint8_t curve_public_key [CURVE_KEYSIZE]; uint8_t curve_secret_key [CURVE_KEYSIZE]; uint8_t curve_server_key [CURVE_KEYSIZE]; // ID of the socket. int socket_id; // If true, socket conflates outgoing/incoming messages. // Applicable to dealer, push/pull, pub/sub socket types. // Cannot receive multi-part messages. // Ignores hwm bool conflate; }; } #endif zeromq3-4.0.4+dfsg.orig/src/io_thread.hpp0000644000175000017500000000471212240736636017206 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_IO_THREAD_HPP_INCLUDED__ #define __ZMQ_IO_THREAD_HPP_INCLUDED__ #include #include "stdint.hpp" #include "object.hpp" #include "poller.hpp" #include "i_poll_events.hpp" #include "mailbox.hpp" namespace zmq { class ctx_t; // Generic part of the I/O thread. Polling-mechanism-specific features // are implemented in separate "polling objects". class io_thread_t : public object_t, public i_poll_events { public: io_thread_t (zmq::ctx_t *ctx_, uint32_t tid_); // Clean-up. If the thread was started, it's neccessary to call 'stop' // before invoking destructor. Otherwise the destructor would hang up. ~io_thread_t (); // Launch the physical thread. void start (); // Ask underlying thread to stop. void stop (); // Returns mailbox associated with this I/O thread. mailbox_t *get_mailbox (); // i_poll_events implementation. void in_event (); void out_event (); void timer_event (int id_); // Used by io_objects to retrieve the assciated poller object. poller_t *get_poller (); // Command handlers. void process_stop (); // Returns load experienced by the I/O thread. int get_load (); private: // I/O thread accesses incoming commands via this mailbox. mailbox_t mailbox; // Handle associated with mailbox' file descriptor. poller_t::handle_t mailbox_handle; // I/O multiplexing is performed using a poller object. poller_t *poller; io_thread_t (const io_thread_t&); const io_thread_t &operator = (const io_thread_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/ipc_listener.hpp0000644000175000017500000000515312240736636017730 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_IPC_LISTENER_HPP_INCLUDED__ #define __ZMQ_IPC_LISTENER_HPP_INCLUDED__ #include "platform.hpp" #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS #include #include "fd.hpp" #include "own.hpp" #include "stdint.hpp" #include "io_object.hpp" namespace zmq { class io_thread_t; class socket_base_t; class ipc_listener_t : public own_t, public io_object_t { public: ipc_listener_t (zmq::io_thread_t *io_thread_, zmq::socket_base_t *socket_, const options_t &options_); ~ipc_listener_t (); // Set address to listen on. int set_address (const char *addr_); // Get the bound address for use with wildcards int get_address (std::string &addr_); private: // Handlers for incoming commands. void process_plug (); void process_term (int linger_); // Handlers for I/O events. void in_event (); // Close the listening socket. int close (); // Accept the new connection. Returns the file descriptor of the // newly created connection. The function may return retired_fd // if the connection was dropped while waiting in the listen backlog. fd_t accept (); // True, if the undelying file for UNIX domain socket exists. bool has_file; // Name of the file associated with the UNIX domain address. std::string filename; // Underlying socket. fd_t s; // Handle corresponding to the listening socket. handle_t handle; // Socket the listerner belongs to. zmq::socket_base_t *socket; // String representation of endpoint to bind to std::string endpoint; ipc_listener_t (const ipc_listener_t&); const ipc_listener_t &operator = (const ipc_listener_t&); }; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/io_object.cpp0000644000175000017500000000447212240736636017203 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "io_object.hpp" #include "io_thread.hpp" #include "err.hpp" zmq::io_object_t::io_object_t (io_thread_t *io_thread_) : poller (NULL) { if (io_thread_) plug (io_thread_); } zmq::io_object_t::~io_object_t () { } void zmq::io_object_t::plug (io_thread_t *io_thread_) { zmq_assert (io_thread_); zmq_assert (!poller); // Retrieve the poller from the thread we are running in. poller = io_thread_->get_poller (); } void zmq::io_object_t::unplug () { zmq_assert (poller); // Forget about old poller in preparation to be migrated // to a different I/O thread. poller = NULL; } zmq::io_object_t::handle_t zmq::io_object_t::add_fd (fd_t fd_) { return poller->add_fd (fd_, this); } void zmq::io_object_t::rm_fd (handle_t handle_) { poller->rm_fd (handle_); } void zmq::io_object_t::set_pollin (handle_t handle_) { poller->set_pollin (handle_); } void zmq::io_object_t::reset_pollin (handle_t handle_) { poller->reset_pollin (handle_); } void zmq::io_object_t::set_pollout (handle_t handle_) { poller->set_pollout (handle_); } void zmq::io_object_t::reset_pollout (handle_t handle_) { poller->reset_pollout (handle_); } void zmq::io_object_t::add_timer (int timeout_, int id_) { poller->add_timer (timeout_, this, id_); } void zmq::io_object_t::cancel_timer (int id_) { poller->cancel_timer (this, id_); } void zmq::io_object_t::in_event () { zmq_assert (false); } void zmq::io_object_t::out_event () { zmq_assert (false); } void zmq::io_object_t::timer_event (int) { zmq_assert (false); } zeromq3-4.0.4+dfsg.orig/src/fq.cpp0000644000175000017500000000735612240736636015660 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "fq.hpp" #include "pipe.hpp" #include "err.hpp" #include "msg.hpp" zmq::fq_t::fq_t () : active (0), current (0), more (false) { } zmq::fq_t::~fq_t () { zmq_assert (pipes.empty ()); } void zmq::fq_t::attach (pipe_t *pipe_) { pipes.push_back (pipe_); pipes.swap (active, pipes.size () - 1); active++; } void zmq::fq_t::pipe_terminated (pipe_t *pipe_) { const pipes_t::size_type index = pipes.index (pipe_); // Remove the pipe from the list; adjust number of active pipes // accordingly. if (index < active) { active--; pipes.swap (index, active); if (current == active) current = 0; } pipes.erase (pipe_); } void zmq::fq_t::activated (pipe_t *pipe_) { // Move the pipe to the list of active pipes. pipes.swap (pipes.index (pipe_), active); active++; } int zmq::fq_t::recv (msg_t *msg_) { return recvpipe (msg_, NULL); } int zmq::fq_t::recvpipe (msg_t *msg_, pipe_t **pipe_) { // Deallocate old content of the message. int rc = msg_->close (); errno_assert (rc == 0); // Round-robin over the pipes to get the next message. while (active > 0) { // Try to fetch new message. If we've already read part of the message // subsequent part should be immediately available. bool fetched = pipes [current]->read (msg_); // Note that when message is not fetched, current pipe is deactivated // and replaced by another active pipe. Thus we don't have to increase // the 'current' pointer. if (fetched) { if (pipe_) *pipe_ = pipes [current]; more = msg_->flags () & msg_t::more? true: false; if (!more) current = (current + 1) % active; return 0; } // Check the atomicity of the message. // If we've already received the first part of the message // we should get the remaining parts without blocking. zmq_assert (!more); active--; pipes.swap (current, active); if (current == active) current = 0; } // No message is available. Initialise the output parameter // to be a 0-byte message. rc = msg_->init (); errno_assert (rc == 0); errno = EAGAIN; return -1; } bool zmq::fq_t::has_in () { // There are subsequent parts of the partly-read message available. if (more) return true; // Note that messing with current doesn't break the fairness of fair // queueing algorithm. If there are no messages available current will // get back to its original value. Otherwise it'll point to the first // pipe holding messages, skipping only pipes with no messages available. while (active > 0) { if (pipes [current]->check_read ()) return true; // Deactivate the pipe. active--; pipes.swap (current, active); if (current == active) current = 0; } return false; } zeromq3-4.0.4+dfsg.orig/src/precompiled.cpp0000644000175000017500000000142712240736636017546 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "precompiled.hpp" zeromq3-4.0.4+dfsg.orig/src/rep.cpp0000644000175000017500000000623712240736636016035 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "rep.hpp" #include "err.hpp" #include "msg.hpp" zmq::rep_t::rep_t (class ctx_t *parent_, uint32_t tid_, int sid_) : router_t (parent_, tid_, sid_), sending_reply (false), request_begins (true) { options.type = ZMQ_REP; } zmq::rep_t::~rep_t () { } int zmq::rep_t::xsend (msg_t *msg_) { // If we are in the middle of receiving a request, we cannot send reply. if (!sending_reply) { errno = EFSM; return -1; } bool more = msg_->flags () & msg_t::more ? true : false; // Push message to the reply pipe. int rc = router_t::xsend (msg_); if (rc != 0) return rc; // If the reply is complete flip the FSM back to request receiving state. if (!more) sending_reply = false; return 0; } int zmq::rep_t::xrecv (msg_t *msg_) { // If we are in middle of sending a reply, we cannot receive next request. if (sending_reply) { errno = EFSM; return -1; } // First thing to do when receiving a request is to copy all the labels // to the reply pipe. if (request_begins) { while (true) { int rc = router_t::xrecv (msg_); if (rc != 0) return rc; if ((msg_->flags () & msg_t::more)) { // Empty message part delimits the traceback stack. bool bottom = (msg_->size () == 0); // Push it to the reply pipe. rc = router_t::xsend (msg_); errno_assert (rc == 0); if (bottom) break; } else { // If the traceback stack is malformed, discard anything // already sent to pipe (we're at end of invalid message). rc = router_t::rollback (); errno_assert (rc == 0); } } request_begins = false; } // Get next message part to return to the user. int rc = router_t::xrecv (msg_); if (rc != 0) return rc; // If whole request is read, flip the FSM to reply-sending state. if (!(msg_->flags () & msg_t::more)) { sending_reply = true; request_begins = true; } return 0; } bool zmq::rep_t::xhas_in () { if (sending_reply) return false; return router_t::xhas_in (); } bool zmq::rep_t::xhas_out () { if (!sending_reply) return false; return router_t::xhas_out (); } zeromq3-4.0.4+dfsg.orig/src/err.hpp0000644000175000017500000001076612240736636016046 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ERR_HPP_INCLUDED__ #define __ZMQ_ERR_HPP_INCLUDED__ // 0MQ-specific error codes are defined in zmq.h #include "../include/zmq.h" #include #if defined _WIN32_WCE #include "..\builds\msvc\errno.hpp" #else #include #endif #include #include #include #include "platform.hpp" #include "likely.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #endif // EPROTO is not used by OpenBSD and maybe other platforms. #ifndef EPROTO #define EPROTO 0 #endif namespace zmq { const char *errno_to_string (int errno_); void zmq_abort (const char *errmsg_); } #ifdef ZMQ_HAVE_WINDOWS namespace zmq { const char *wsa_error (); const char *wsa_error_no (int no_); void win_error (char *buffer_, size_t buffer_size_); int wsa_error_to_errno (int errcode); } // Provides convenient way to check WSA-style errors on Windows. #define wsa_assert(x) \ do {\ if (unlikely (!(x))) {\ const char *errstr = zmq::wsa_error ();\ if (errstr != NULL) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ }\ } while (false) // Provides convenient way to assert on WSA-style errors on Windows. #define wsa_assert_no(no) \ do {\ const char *errstr = zmq::wsa_error_no (no);\ if (errstr != NULL) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) // Provides convenient way to check GetLastError-style errors on Windows. #define win_assert(x) \ do {\ if (unlikely (!(x))) {\ char errstr [256];\ zmq::win_error (errstr, 256);\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) #endif // This macro works in exactly the same way as the normal assert. It is used // in its stead because standard assert on Win32 in broken - it prints nothing // when used within the scope of JNI library. #define zmq_assert(x) \ do {\ if (unlikely (!(x))) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", #x, \ __FILE__, __LINE__);\ zmq::zmq_abort (#x);\ }\ } while (false) // Provides convenient way to check for errno-style errors. #define errno_assert(x) \ do {\ if (unlikely (!(x))) {\ const char *errstr = strerror (errno);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) // Provides convenient way to check for POSIX errors. #define posix_assert(x) \ do {\ if (unlikely (x)) {\ const char *errstr = strerror (x);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) // Provides convenient way to check for errors from getaddrinfo. #define gai_assert(x) \ do {\ if (unlikely (x)) {\ const char *errstr = gai_strerror (x);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) // Provides convenient way to check whether memory allocation have succeeded. #define alloc_assert(x) \ do {\ if (unlikely (!x)) {\ fprintf (stderr, "FATAL ERROR: OUT OF MEMORY (%s:%d)\n",\ __FILE__, __LINE__);\ zmq::zmq_abort ("FATAL ERROR: OUT OF MEMORY");\ }\ } while (false) #endif zeromq3-4.0.4+dfsg.orig/src/mechanism.hpp0000644000175000017500000000636012240736636017215 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_MECHANISM_HPP_INCLUDED__ #define __ZMQ_MECHANISM_HPP_INCLUDED__ #include "stdint.hpp" #include "options.hpp" #include "blob.hpp" namespace zmq { // Abstract class representing security mechanism. // Different mechanism extedns this class. class msg_t; class mechanism_t { public: mechanism_t (const options_t &options_); virtual ~mechanism_t (); // Prepare next handshake command that is to be sent to the peer. virtual int next_handshake_command (msg_t *msg_) = 0; // Process the handshake command received from the peer. virtual int process_handshake_command (msg_t *msg_) = 0; virtual int encode (msg_t *msg_) { return 0; } virtual int decode (msg_t *msg_) { return 0; } // Notifies mechanism about availability of ZAP message. virtual int zap_msg_available () { return 0; } // True iff the handshake stage is complete? virtual bool is_handshake_complete () const = 0; void set_peer_identity (const void *id_ptr, size_t id_size); void peer_identity (msg_t *msg_); protected: // Only used to identify the socket for the Socket-Type // property in the wire protocol. const char *socket_type_string (int socket_type) const; size_t add_property (unsigned char *ptr, const char *name, const void *value, size_t value_len) const; // Parses a metadata. // Metadata consists of a list of properties consisting of // name and value as size-specified strings. // Returns 0 on success and -1 on error, in which case errno is set. int parse_metadata (const unsigned char *ptr_, size_t length); // This is called by parse_property method whenever it // parses a new property. The function should return 0 // on success and -1 on error, in which case it should // set errno. Signaling error prevents parser from // parsing remaining data. // Derived classes are supposed to override this // method to handle custom processing. virtual int property (const std::string name_, const void *value_, size_t length_); options_t options; private: blob_t identity; // Returns true iff socket associated with the mechanism // is compatible with a given socket type 'type_'. bool check_socket_type (const std::string type_) const; }; } #endif zeromq3-4.0.4+dfsg.orig/src/stdint.hpp0000644000175000017500000000265412240736636016560 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_STDINT_HPP_INCLUDED__ #define __ZMQ_STDINT_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS #include #elif defined _MSC_VER && _MSC_VER < 1600 #ifndef int8_t typedef __int8 int8_t; #endif #ifndef int16_t typedef __int16 int16_t; #endif #ifndef int32_t typedef __int32 int32_t; #endif #ifndef int64_t typedef __int64 int64_t; #endif #ifndef uint8_t typedef unsigned __int8 uint8_t; #endif #ifndef uint16_t typedef unsigned __int16 uint16_t; #endif #ifndef uint32_t typedef unsigned __int32 uint32_t; #endif #ifndef uint64_t typedef unsigned __int64 uint64_t; #endif #else #include #endif #endif zeromq3-4.0.4+dfsg.orig/src/trie.cpp0000644000175000017500000002432512240736636016210 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "err.hpp" #include "trie.hpp" zmq::trie_t::trie_t () : refcnt (0), min (0), count (0), live_nodes (0) { } zmq::trie_t::~trie_t () { if (count == 1) { zmq_assert (next.node); delete next.node; next.node = 0; } else if (count > 1) { for (unsigned short i = 0; i != count; ++i) delete next.table [i]; free (next.table); } } bool zmq::trie_t::add (unsigned char *prefix_, size_t size_) { // We are at the node corresponding to the prefix. We are done. if (!size_) { ++refcnt; return refcnt == 1; } unsigned char c = *prefix_; if (c < min || c >= min + count) { // The character is out of range of currently handled // charcters. We have to extend the table. if (!count) { min = c; count = 1; next.node = NULL; } else if (count == 1) { unsigned char oldc = min; trie_t *oldp = next.node; count = (min < c ? c - min : min - c) + 1; next.table = (trie_t**) malloc (sizeof (trie_t*) * count); alloc_assert (next.table); for (unsigned short i = 0; i != count; ++i) next.table [i] = 0; min = std::min (min, c); next.table [oldc - min] = oldp; } else if (min < c) { // The new character is above the current character range. unsigned short old_count = count; count = c - min + 1; next.table = (trie_t**) realloc ((void*) next.table, sizeof (trie_t*) * count); zmq_assert (next.table); for (unsigned short i = old_count; i != count; i++) next.table [i] = NULL; } else { // The new character is below the current character range. unsigned short old_count = count; count = (min + old_count) - c; next.table = (trie_t**) realloc ((void*) next.table, sizeof (trie_t*) * count); zmq_assert (next.table); memmove (next.table + min - c, next.table, old_count * sizeof (trie_t*)); for (unsigned short i = 0; i != min - c; i++) next.table [i] = NULL; min = c; } } // If next node does not exist, create one. if (count == 1) { if (!next.node) { next.node = new (std::nothrow) trie_t; alloc_assert (next.node); ++live_nodes; zmq_assert (live_nodes == 1); } return next.node->add (prefix_ + 1, size_ - 1); } else { if (!next.table [c - min]) { next.table [c - min] = new (std::nothrow) trie_t; alloc_assert (next.table [c - min]); ++live_nodes; zmq_assert (live_nodes > 1); } return next.table [c - min]->add (prefix_ + 1, size_ - 1); } } bool zmq::trie_t::rm (unsigned char *prefix_, size_t size_) { // TODO: Shouldn't an error be reported if the key does not exist? if (!size_) { if (!refcnt) return false; refcnt--; return refcnt == 0; } unsigned char c = *prefix_; if (!count || c < min || c >= min + count) return false; trie_t *next_node = count == 1 ? next.node : next.table [c - min]; if (!next_node) return false; bool ret = next_node->rm (prefix_ + 1, size_ - 1); // Prune redundant nodes if (next_node->is_redundant ()) { delete next_node; zmq_assert (count > 0); if (count == 1) { // The just pruned node is was the only live node next.node = 0; count = 0; --live_nodes; zmq_assert (live_nodes == 0); } else { next.table [c - min] = 0; zmq_assert (live_nodes > 1); --live_nodes; // Compact the table if possible if (live_nodes == 1) { // We can switch to using the more compact single-node // representation since the table only contains one live node trie_t *node = 0; // Since we always compact the table the pruned node must // either be the left-most or right-most ptr in the node // table if (c == min) { // The pruned node is the left-most node ptr in the // node table => keep the right-most node node = next.table [count - 1]; min += count - 1; } else if (c == min + count - 1) { // The pruned node is the right-most node ptr in the // node table => keep the left-most node node = next.table [0]; } zmq_assert (node); free (next.table); next.node = node; count = 1; } else if (c == min) { // We can compact the table "from the left". // Find the left-most non-null node ptr, which we'll use as // our new min unsigned char new_min = min; for (unsigned short i = 1; i < count; ++i) { if (next.table [i]) { new_min = i + min; break; } } zmq_assert (new_min != min); trie_t **old_table = next.table; zmq_assert (new_min > min); zmq_assert (count > new_min - min); count = count - (new_min - min); next.table = (trie_t**) malloc (sizeof (trie_t*) * count); alloc_assert (next.table); memmove (next.table, old_table + (new_min - min), sizeof (trie_t*) * count); free (old_table); min = new_min; } else if (c == min + count - 1) { // We can compact the table "from the right". // Find the right-most non-null node ptr, which we'll use to // determine the new table size unsigned short new_count = count; for (unsigned short i = 1; i < count; ++i) { if (next.table [count - 1 - i]) { new_count = count - i; break; } } zmq_assert (new_count != count); count = new_count; trie_t **old_table = next.table; next.table = (trie_t**) malloc (sizeof (trie_t*) * count); alloc_assert (next.table); memmove (next.table, old_table, sizeof (trie_t*) * count); free (old_table); } } } return ret; } bool zmq::trie_t::check (unsigned char *data_, size_t size_) { // This function is on critical path. It deliberately doesn't use // recursion to get a bit better performance. trie_t *current = this; while (true) { // We've found a corresponding subscription! if (current->refcnt) return true; // We've checked all the data and haven't found matching subscription. if (!size_) return false; // If there's no corresponding slot for the first character // of the prefix, the message does not match. unsigned char c = *data_; if (c < current->min || c >= current->min + current->count) return false; // Move to the next character. if (current->count == 1) current = current->next.node; else { current = current->next.table [c - current->min]; if (!current) return false; } data_++; size_--; } } void zmq::trie_t::apply (void (*func_) (unsigned char *data_, size_t size_, void *arg_), void *arg_) { unsigned char *buff = NULL; apply_helper (&buff, 0, 0, func_, arg_); free (buff); } void zmq::trie_t::apply_helper ( unsigned char **buff_, size_t buffsize_, size_t maxbuffsize_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), void *arg_) { // If this node is a subscription, apply the function. if (refcnt) func_ (*buff_, buffsize_, arg_); // Adjust the buffer. if (buffsize_ >= maxbuffsize_) { maxbuffsize_ = buffsize_ + 256; *buff_ = (unsigned char*) realloc (*buff_, maxbuffsize_); zmq_assert (*buff_); } // If there are no subnodes in the trie, return. if (count == 0) return; // If there's one subnode (optimisation). if (count == 1) { (*buff_) [buffsize_] = min; buffsize_++; next.node->apply_helper (buff_, buffsize_, maxbuffsize_, func_, arg_); return; } // If there are multiple subnodes. for (unsigned short c = 0; c != count; c++) { (*buff_) [buffsize_] = min + c; if (next.table [c]) next.table [c]->apply_helper (buff_, buffsize_ + 1, maxbuffsize_, func_, arg_); } } bool zmq::trie_t::is_redundant () const { return refcnt == 0 && live_nodes == 0; } zeromq3-4.0.4+dfsg.orig/src/object.hpp0000644000175000017500000001154712240736636016522 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_OBJECT_HPP_INCLUDED__ #define __ZMQ_OBJECT_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { struct i_engine; struct endpoint_t; struct pending_connection_t; struct command_t; class ctx_t; class pipe_t; class socket_base_t; class session_base_t; class io_thread_t; class own_t; // Base class for all objects that participate in inter-thread // communication. class object_t { public: object_t (zmq::ctx_t *ctx_, uint32_t tid_); object_t (object_t *parent_); virtual ~object_t (); uint32_t get_tid (); void set_tid(uint32_t id); ctx_t *get_ctx (); void process_command (zmq::command_t &cmd_); void send_inproc_connected (zmq::socket_base_t *socket_); void send_bind (zmq::own_t *destination_, zmq::pipe_t *pipe_, bool inc_seqnum_ = true); protected: // Using following function, socket is able to access global // repository of inproc endpoints. int register_endpoint (const char *addr_, zmq::endpoint_t &endpoint_); void unregister_endpoints (zmq::socket_base_t *socket_); zmq::endpoint_t find_endpoint (const char *addr_); void pend_connection (const char *addr_, pending_connection_t &pending_connection_); void connect_pending (const char *addr_, zmq::socket_base_t *bind_socket_); void destroy_socket (zmq::socket_base_t *socket_); // Logs an message. void log (const char *format_, ...); // Chooses least loaded I/O thread. zmq::io_thread_t *choose_io_thread (uint64_t affinity_); // Derived object can use these functions to send commands // to other objects. void send_stop (); void send_plug (zmq::own_t *destination_, bool inc_seqnum_ = true); void send_own (zmq::own_t *destination_, zmq::own_t *object_); void send_attach (zmq::session_base_t *destination_, zmq::i_engine *engine_, bool inc_seqnum_ = true); void send_activate_read (zmq::pipe_t *destination_); void send_activate_write (zmq::pipe_t *destination_, uint64_t msgs_read_); void send_hiccup (zmq::pipe_t *destination_, void *pipe_); void send_pipe_term (zmq::pipe_t *destination_); void send_pipe_term_ack (zmq::pipe_t *destination_); void send_term_req (zmq::own_t *destination_, zmq::own_t *object_); void send_term (zmq::own_t *destination_, int linger_); void send_term_ack (zmq::own_t *destination_); void send_reap (zmq::socket_base_t *socket_); void send_reaped (); void send_done (); // These handlers can be overloaded by the derived objects. They are // called when command arrives from another thread. virtual void process_stop (); virtual void process_plug (); virtual void process_own (zmq::own_t *object_); virtual void process_attach (zmq::i_engine *engine_); virtual void process_bind (zmq::pipe_t *pipe_); virtual void process_activate_read (); virtual void process_activate_write (uint64_t msgs_read_); virtual void process_hiccup (void *pipe_); virtual void process_pipe_term (); virtual void process_pipe_term_ack (); virtual void process_term_req (zmq::own_t *object_); virtual void process_term (int linger_); virtual void process_term_ack (); virtual void process_reap (zmq::socket_base_t *socket_); virtual void process_reaped (); // Special handler called after a command that requires a seqnum // was processed. The implementation should catch up with its counter // of processed commands here. virtual void process_seqnum (); private: // Context provides access to the global state. zmq::ctx_t *ctx; // Thread ID of the thread the object belongs to. uint32_t tid; void send_command (command_t &cmd_); object_t (const object_t&); const object_t &operator = (const object_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/ctx.cpp0000644000175000017500000003566012307426216016041 0ustar ghedoghedo/* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #endif #include #include #include "ctx.hpp" #include "socket_base.hpp" #include "io_thread.hpp" #include "reaper.hpp" #include "pipe.hpp" #include "err.hpp" #include "msg.hpp" #define ZMQ_CTX_TAG_VALUE_GOOD 0xabadcafe #define ZMQ_CTX_TAG_VALUE_BAD 0xdeadbeef int clipped_maxsocket(int max_requested) { if (max_requested >= zmq::poller_t::max_fds () && zmq::poller_t::max_fds () != -1) max_requested = zmq::poller_t::max_fds () - 1; // -1 because we need room for the repear mailbox. return max_requested; } zmq::ctx_t::ctx_t () : tag (ZMQ_CTX_TAG_VALUE_GOOD), starting (true), terminating (false), reaper (NULL), slot_count (0), slots (NULL), max_sockets (clipped_maxsocket (ZMQ_MAX_SOCKETS_DFLT)), io_thread_count (ZMQ_IO_THREADS_DFLT), ipv6 (false) { #ifdef HAVE_FORK pid = getpid(); #endif } bool zmq::ctx_t::check_tag () { return tag == ZMQ_CTX_TAG_VALUE_GOOD; } zmq::ctx_t::~ctx_t () { // Check that there are no remaining sockets. zmq_assert (sockets.empty ()); // Ask I/O threads to terminate. If stop signal wasn't sent to I/O // thread subsequent invocation of destructor would hang-up. for (io_threads_t::size_type i = 0; i != io_threads.size (); i++) io_threads [i]->stop (); // Wait till I/O threads actually terminate. for (io_threads_t::size_type i = 0; i != io_threads.size (); i++) delete io_threads [i]; // Deallocate the reaper thread object. delete reaper; // Deallocate the array of mailboxes. No special work is // needed as mailboxes themselves were deallocated with their // corresponding io_thread/socket objects. free (slots); // Remove the tag, so that the object is considered dead. tag = ZMQ_CTX_TAG_VALUE_BAD; } int zmq::ctx_t::terminate () { // Connect up any pending inproc connections, otherwise we will hang pending_connections_t copy = pending_connections; for (pending_connections_t::iterator p = copy.begin (); p != copy.end (); ++p) { zmq::socket_base_t *s = create_socket (ZMQ_PAIR); s->bind (p->first.c_str ()); s->close (); } slot_sync.lock (); if (!starting) { #ifdef HAVE_FORK if (pid != getpid()) { // we are a forked child process. Close all file descriptors // inherited from the parent. for (sockets_t::size_type i = 0; i != sockets.size (); i++) { sockets[i]->get_mailbox()->forked(); } term_mailbox.forked(); } #endif // Check whether termination was already underway, but interrupted and now // restarted. bool restarted = terminating; terminating = true; // First attempt to terminate the context. if (!restarted) { // First send stop command to sockets so that any blocking calls // can be interrupted. If there are no sockets we can ask reaper // thread to stop. for (sockets_t::size_type i = 0; i != sockets.size (); i++) sockets [i]->stop (); if (sockets.empty ()) reaper->stop (); } slot_sync.unlock(); // Wait till reaper thread closes all the sockets. command_t cmd; int rc = term_mailbox.recv (&cmd, -1); if (rc == -1 && errno == EINTR) return -1; errno_assert (rc == 0); zmq_assert (cmd.type == command_t::done); slot_sync.lock (); zmq_assert (sockets.empty ()); } slot_sync.unlock (); // Deallocate the resources. delete this; return 0; } int zmq::ctx_t::shutdown () { slot_sync.lock (); if (!starting && !terminating) { terminating = true; // Send stop command to sockets so that any blocking calls // can be interrupted. If there are no sockets we can ask reaper // thread to stop. for (sockets_t::size_type i = 0; i != sockets.size (); i++) sockets [i]->stop (); if (sockets.empty ()) reaper->stop (); } slot_sync.unlock (); return 0; } int zmq::ctx_t::set (int option_, int optval_) { int rc = 0; if (option_ == ZMQ_MAX_SOCKETS && optval_ >= 1 && optval_ == clipped_maxsocket (optval_)) { opt_sync.lock (); max_sockets = optval_; opt_sync.unlock (); } else if (option_ == ZMQ_IO_THREADS && optval_ >= 0) { opt_sync.lock (); io_thread_count = optval_; opt_sync.unlock (); } else if (option_ == ZMQ_IPV6 && optval_ >= 0) { opt_sync.lock (); ipv6 = (optval_ != 0); opt_sync.unlock (); } else { errno = EINVAL; rc = -1; } return rc; } int zmq::ctx_t::get (int option_) { int rc = 0; if (option_ == ZMQ_MAX_SOCKETS) rc = max_sockets; else if (option_ == ZMQ_IO_THREADS) rc = io_thread_count; else if (option_ == ZMQ_IPV6) rc = ipv6; else { errno = EINVAL; rc = -1; } return rc; } zmq::socket_base_t *zmq::ctx_t::create_socket (int type_) { slot_sync.lock (); if (unlikely (starting)) { starting = false; // Initialise the array of mailboxes. Additional three slots are for // zmq_ctx_term thread and reaper thread. opt_sync.lock (); int mazmq = max_sockets; int ios = io_thread_count; opt_sync.unlock (); slot_count = mazmq + ios + 2; slots = (mailbox_t**) malloc (sizeof (mailbox_t*) * slot_count); alloc_assert (slots); // Initialise the infrastructure for zmq_ctx_term thread. slots [term_tid] = &term_mailbox; // Create the reaper thread. reaper = new (std::nothrow) reaper_t (this, reaper_tid); alloc_assert (reaper); slots [reaper_tid] = reaper->get_mailbox (); reaper->start (); // Create I/O thread objects and launch them. for (int i = 2; i != ios + 2; i++) { io_thread_t *io_thread = new (std::nothrow) io_thread_t (this, i); alloc_assert (io_thread); io_threads.push_back (io_thread); slots [i] = io_thread->get_mailbox (); io_thread->start (); } // In the unused part of the slot array, create a list of empty slots. for (int32_t i = (int32_t) slot_count - 1; i >= (int32_t) ios + 2; i--) { empty_slots.push_back (i); slots [i] = NULL; } } // Once zmq_ctx_term() was called, we can't create new sockets. if (terminating) { slot_sync.unlock (); errno = ETERM; return NULL; } // If max_sockets limit was reached, return error. if (empty_slots.empty ()) { slot_sync.unlock (); errno = EMFILE; return NULL; } // Choose a slot for the socket. uint32_t slot = empty_slots.back (); empty_slots.pop_back (); // Generate new unique socket ID. int sid = ((int) max_socket_id.add (1)) + 1; // Create the socket and register its mailbox. socket_base_t *s = socket_base_t::create (type_, this, slot, sid); if (!s) { empty_slots.push_back (slot); slot_sync.unlock (); return NULL; } sockets.push_back (s); slots [slot] = s->get_mailbox (); slot_sync.unlock (); return s; } void zmq::ctx_t::destroy_socket (class socket_base_t *socket_) { slot_sync.lock (); // Free the associated thread slot. uint32_t tid = socket_->get_tid (); empty_slots.push_back (tid); slots [tid] = NULL; // Remove the socket from the list of sockets. sockets.erase (socket_); // If zmq_ctx_term() was already called and there are no more socket // we can ask reaper thread to terminate. if (terminating && sockets.empty ()) reaper->stop (); slot_sync.unlock (); } zmq::object_t *zmq::ctx_t::get_reaper () { return reaper; } void zmq::ctx_t::send_command (uint32_t tid_, const command_t &command_) { slots [tid_]->send (command_); } zmq::io_thread_t *zmq::ctx_t::choose_io_thread (uint64_t affinity_) { if (io_threads.empty ()) return NULL; // Find the I/O thread with minimum load. int min_load = -1; io_thread_t *selected_io_thread = NULL; for (io_threads_t::size_type i = 0; i != io_threads.size (); i++) { if (!affinity_ || (affinity_ & (uint64_t (1) << i))) { int load = io_threads [i]->get_load (); if (selected_io_thread == NULL || load < min_load) { min_load = load; selected_io_thread = io_threads [i]; } } } return selected_io_thread; } int zmq::ctx_t::register_endpoint (const char *addr_, endpoint_t &endpoint_) { endpoints_sync.lock (); bool inserted = endpoints.insert (endpoints_t::value_type ( std::string (addr_), endpoint_)).second; endpoints_sync.unlock (); if (!inserted) { errno = EADDRINUSE; return -1; } return 0; } void zmq::ctx_t::unregister_endpoints (socket_base_t *socket_) { endpoints_sync.lock (); endpoints_t::iterator it = endpoints.begin (); while (it != endpoints.end ()) { if (it->second.socket == socket_) { endpoints_t::iterator to_erase = it; ++it; endpoints.erase (to_erase); continue; } ++it; } endpoints_sync.unlock (); } zmq::endpoint_t zmq::ctx_t::find_endpoint (const char *addr_) { endpoints_sync.lock (); endpoints_t::iterator it = endpoints.find (addr_); if (it == endpoints.end ()) { endpoints_sync.unlock (); errno = ECONNREFUSED; endpoint_t empty = {NULL, options_t()}; return empty; } endpoint_t endpoint = it->second; // Increment the command sequence number of the peer so that it won't // get deallocated until "bind" command is issued by the caller. // The subsequent 'bind' has to be called with inc_seqnum parameter // set to false, so that the seqnum isn't incremented twice. endpoint.socket->inc_seqnum (); endpoints_sync.unlock (); return endpoint; } void zmq::ctx_t::pend_connection (const char *addr_, pending_connection_t &pending_connection_) { endpoints_sync.lock (); endpoints_t::iterator it = endpoints.find (addr_); if (it == endpoints.end ()) { // Still no bind. pending_connection_.endpoint.socket->inc_seqnum (); pending_connections.insert (pending_connections_t::value_type (std::string (addr_), pending_connection_)); } else { // Bind has happened in the mean time, connect directly connect_inproc_sockets(it->second.socket, it->second.options, pending_connection_, connect_side); } endpoints_sync.unlock (); } void zmq::ctx_t::connect_pending (const char *addr_, zmq::socket_base_t *bind_socket_) { endpoints_sync.lock (); std::pair pending = pending_connections.equal_range(addr_); for (pending_connections_t::iterator p = pending.first; p != pending.second; ++p) { connect_inproc_sockets(bind_socket_, endpoints[addr_].options, p->second, bind_side); } pending_connections.erase(pending.first, pending.second); endpoints_sync.unlock (); } void zmq::ctx_t::connect_inproc_sockets(zmq::socket_base_t *bind_socket_, options_t& bind_options, pending_connection_t &pending_connection_, side side_) { bind_socket_->inc_seqnum(); pending_connection_.bind_pipe->set_tid(bind_socket_->get_tid()); if (side_ == bind_side) { command_t cmd; cmd.type = command_t::bind; cmd.args.bind.pipe = pending_connection_.bind_pipe; bind_socket_->process_command(cmd); bind_socket_->send_inproc_connected(pending_connection_.endpoint.socket); } else { pending_connection_.connect_pipe->send_bind(bind_socket_, pending_connection_.bind_pipe, false); } int sndhwm = 0; if (pending_connection_.endpoint.options.sndhwm != 0 && bind_options.rcvhwm != 0) sndhwm = pending_connection_.endpoint.options.sndhwm + bind_options.rcvhwm; int rcvhwm = 0; if (pending_connection_.endpoint.options.rcvhwm != 0 && bind_options.sndhwm != 0) rcvhwm = pending_connection_.endpoint.options.rcvhwm + bind_options.sndhwm; bool conflate = pending_connection_.endpoint.options.conflate && (pending_connection_.endpoint.options.type == ZMQ_DEALER || pending_connection_.endpoint.options.type == ZMQ_PULL || pending_connection_.endpoint.options.type == ZMQ_PUSH || pending_connection_.endpoint.options.type == ZMQ_PUB || pending_connection_.endpoint.options.type == ZMQ_SUB); int hwms [2] = {conflate? -1 : sndhwm, conflate? -1 : rcvhwm}; pending_connection_.connect_pipe->set_hwms(hwms [1], hwms [0]); pending_connection_.bind_pipe->set_hwms(hwms [0], hwms [1]); if (bind_options.recv_identity) { msg_t id; int rc = id.init_size (pending_connection_.endpoint.options.identity_size); errno_assert (rc == 0); memcpy (id.data (), pending_connection_.endpoint.options.identity, pending_connection_.endpoint.options.identity_size); id.set_flags (msg_t::identity); bool written = pending_connection_.connect_pipe->write (&id); zmq_assert (written); pending_connection_.connect_pipe->flush (); } if (pending_connection_.endpoint.options.recv_identity) { msg_t id; int rc = id.init_size (bind_options.identity_size); errno_assert (rc == 0); memcpy (id.data (), bind_options.identity, bind_options.identity_size); id.set_flags (msg_t::identity); bool written = pending_connection_.bind_pipe->write (&id); zmq_assert (written); pending_connection_.bind_pipe->flush (); } } // The last used socket ID, or 0 if no socket was used so far. Note that this // is a global variable. Thus, even sockets created in different contexts have // unique IDs. zmq::atomic_counter_t zmq::ctx_t::max_socket_id; zeromq3-4.0.4+dfsg.orig/src/i_decoder.hpp0000644000175000017500000000274612240736636017172 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_I_DECODER_HPP_INCLUDED__ #define __ZMQ_I_DECODER_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { class msg_t; // Interface to be implemented by message decoder. class i_decoder { public: virtual ~i_decoder () {} virtual void get_buffer (unsigned char **data_, size_t *size_) = 0; // Decodes data pointed to by data_. // When a message is decoded, 1 is returned. // When the decoder needs more data, 0 is returnd. // On error, -1 is returned and errno is set accordingly. virtual int decode (const unsigned char *data_, size_t size_, size_t &processed) = 0; virtual msg_t *msg () = 0; }; } #endif zeromq3-4.0.4+dfsg.orig/src/wire.hpp0000644000175000017500000000616312240736636016220 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_WIRE_HPP_INCLUDED__ #define __ZMQ_WIRE_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { // Helper functions to convert different integer types to/from network // byte order. inline void put_uint8 (unsigned char *buffer_, uint8_t value) { *buffer_ = value; } inline uint8_t get_uint8 (const unsigned char *buffer_) { return *buffer_; } inline void put_uint16 (unsigned char *buffer_, uint16_t value) { buffer_ [0] = (unsigned char) (((value) >> 8) & 0xff); buffer_ [1] = (unsigned char) (value & 0xff); } inline uint16_t get_uint16 (const unsigned char *buffer_) { return (((uint16_t) buffer_ [0]) << 8) | ((uint16_t) buffer_ [1]); } inline void put_uint32 (unsigned char *buffer_, uint32_t value) { buffer_ [0] = (unsigned char) (((value) >> 24) & 0xff); buffer_ [1] = (unsigned char) (((value) >> 16) & 0xff); buffer_ [2] = (unsigned char) (((value) >> 8) & 0xff); buffer_ [3] = (unsigned char) (value & 0xff); } inline uint32_t get_uint32 (const unsigned char *buffer_) { return (((uint32_t) buffer_ [0]) << 24) | (((uint32_t) buffer_ [1]) << 16) | (((uint32_t) buffer_ [2]) << 8) | ((uint32_t) buffer_ [3]); } inline void put_uint64 (unsigned char *buffer_, uint64_t value) { buffer_ [0] = (unsigned char) (((value) >> 56) & 0xff); buffer_ [1] = (unsigned char) (((value) >> 48) & 0xff); buffer_ [2] = (unsigned char) (((value) >> 40) & 0xff); buffer_ [3] = (unsigned char) (((value) >> 32) & 0xff); buffer_ [4] = (unsigned char) (((value) >> 24) & 0xff); buffer_ [5] = (unsigned char) (((value) >> 16) & 0xff); buffer_ [6] = (unsigned char) (((value) >> 8) & 0xff); buffer_ [7] = (unsigned char) (value & 0xff); } inline uint64_t get_uint64 (const unsigned char *buffer_) { return (((uint64_t) buffer_ [0]) << 56) | (((uint64_t) buffer_ [1]) << 48) | (((uint64_t) buffer_ [2]) << 40) | (((uint64_t) buffer_ [3]) << 32) | (((uint64_t) buffer_ [4]) << 24) | (((uint64_t) buffer_ [5]) << 16) | (((uint64_t) buffer_ [6]) << 8) | ((uint64_t) buffer_ [7]); } } #endif zeromq3-4.0.4+dfsg.orig/src/xpub.hpp0000644000175000017500000000550612240736636016230 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_XPUB_HPP_INCLUDED__ #define __ZMQ_XPUB_HPP_INCLUDED__ #include #include #include "socket_base.hpp" #include "session_base.hpp" #include "mtrie.hpp" #include "array.hpp" #include "dist.hpp" namespace zmq { class ctx_t; class msg_t; class pipe_t; class io_thread_t; class xpub_t : public socket_base_t { public: xpub_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_); ~xpub_t (); // Implementations of virtual functions from socket_base_t. void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_ = false); int xsend (zmq::msg_t *msg_); bool xhas_out (); int xrecv (zmq::msg_t *msg_); bool xhas_in (); void xread_activated (zmq::pipe_t *pipe_); void xwrite_activated (zmq::pipe_t *pipe_); int xsetsockopt (int option_, const void *optval_, size_t optvallen_); void xpipe_terminated (zmq::pipe_t *pipe_); private: // Function to be applied to the trie to send all the subsciptions // upstream. static void send_unsubscription (unsigned char *data_, size_t size_, void *arg_); // Function to be applied to each matching pipes. static void mark_as_matching (zmq::pipe_t *pipe_, void *arg_); // List of all subscriptions mapped to corresponding pipes. mtrie_t subscriptions; // Distributor of messages holding the list of outbound pipes. dist_t dist; // If true, send all subscription messages upstream, not just // unique ones bool verbose; // True if we are in the middle of sending a multi-part message. bool more; // List of pending (un)subscriptions, ie. those that were already // applied to the trie, but not yet received by the user. typedef std::basic_string blob_t; std::deque pending_data; std::deque pending_flags; xpub_t (const xpub_t&); const xpub_t &operator = (const xpub_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/mailbox.hpp0000644000175000017500000000450312240736636016701 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_MAILBOX_HPP_INCLUDED__ #define __ZMQ_MAILBOX_HPP_INCLUDED__ #include #include "platform.hpp" #include "signaler.hpp" #include "fd.hpp" #include "config.hpp" #include "command.hpp" #include "ypipe.hpp" #include "mutex.hpp" namespace zmq { class mailbox_t { public: mailbox_t (); ~mailbox_t (); fd_t get_fd (); void send (const command_t &cmd_); int recv (command_t *cmd_, int timeout_); #ifdef HAVE_FORK // close the file descriptors in the signaller. This is used in a forked // child process to close the file descriptors so that they do not interfere // with the context in the parent process. void forked() { signaler.forked(); } #endif private: // The pipe to store actual commands. typedef ypipe_t cpipe_t; cpipe_t cpipe; // Signaler to pass signals from writer thread to reader thread. signaler_t signaler; // There's only one thread receiving from the mailbox, but there // is arbitrary number of threads sending. Given that ypipe requires // synchronised access on both of its endpoints, we have to synchronise // the sending side. mutex_t sync; // True if the underlying pipe is active, ie. when we are allowed to // read commands from it. bool active; // Disable copying of mailbox_t object. mailbox_t (const mailbox_t&); const mailbox_t &operator = (const mailbox_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/mtrie.cpp0000644000175000017500000003121312240736636016357 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "err.hpp" #include "pipe.hpp" #include "mtrie.hpp" zmq::mtrie_t::mtrie_t () : pipes (0), min (0), count (0), live_nodes (0) { } zmq::mtrie_t::~mtrie_t () { if (pipes) { delete pipes; pipes = 0; } if (count == 1) { zmq_assert (next.node); delete next.node; next.node = 0; } else if (count > 1) { for (unsigned short i = 0; i != count; ++i) delete next.table [i]; free (next.table); } } bool zmq::mtrie_t::add (unsigned char *prefix_, size_t size_, pipe_t *pipe_) { return add_helper (prefix_, size_, pipe_); } bool zmq::mtrie_t::add_helper (unsigned char *prefix_, size_t size_, pipe_t *pipe_) { // We are at the node corresponding to the prefix. We are done. if (!size_) { bool result = !pipes; if (!pipes) { pipes = new (std::nothrow) pipes_t; alloc_assert (pipes); } pipes->insert (pipe_); return result; } unsigned char c = *prefix_; if (c < min || c >= min + count) { // The character is out of range of currently handled // charcters. We have to extend the table. if (!count) { min = c; count = 1; next.node = NULL; } else if (count == 1) { unsigned char oldc = min; mtrie_t *oldp = next.node; count = (min < c ? c - min : min - c) + 1; next.table = (mtrie_t**) malloc (sizeof (mtrie_t*) * count); alloc_assert (next.table); for (unsigned short i = 0; i != count; ++i) next.table [i] = 0; min = std::min (min, c); next.table [oldc - min] = oldp; } else if (min < c) { // The new character is above the current character range. unsigned short old_count = count; count = c - min + 1; next.table = (mtrie_t**) realloc (next.table, sizeof (mtrie_t*) * count); alloc_assert (next.table); for (unsigned short i = old_count; i != count; i++) next.table [i] = NULL; } else { // The new character is below the current character range. unsigned short old_count = count; count = (min + old_count) - c; next.table = (mtrie_t**) realloc (next.table, sizeof (mtrie_t*) * count); alloc_assert (next.table); memmove (next.table + min - c, next.table, old_count * sizeof (mtrie_t*)); for (unsigned short i = 0; i != min - c; i++) next.table [i] = NULL; min = c; } } // If next node does not exist, create one. if (count == 1) { if (!next.node) { next.node = new (std::nothrow) mtrie_t; alloc_assert (next.node); ++live_nodes; } return next.node->add_helper (prefix_ + 1, size_ - 1, pipe_); } else { if (!next.table [c - min]) { next.table [c - min] = new (std::nothrow) mtrie_t; alloc_assert (next.table [c - min]); ++live_nodes; } return next.table [c - min]->add_helper (prefix_ + 1, size_ - 1, pipe_); } } void zmq::mtrie_t::rm (pipe_t *pipe_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), void *arg_) { unsigned char *buff = NULL; rm_helper (pipe_, &buff, 0, 0, func_, arg_); free (buff); } void zmq::mtrie_t::rm_helper (pipe_t *pipe_, unsigned char **buff_, size_t buffsize_, size_t maxbuffsize_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), void *arg_) { // Remove the subscription from this node. if (pipes && pipes->erase (pipe_) && pipes->empty ()) { func_ (*buff_, buffsize_, arg_); delete pipes; pipes = 0; } // Adjust the buffer. if (buffsize_ >= maxbuffsize_) { maxbuffsize_ = buffsize_ + 256; *buff_ = (unsigned char*) realloc (*buff_, maxbuffsize_); alloc_assert (*buff_); } // If there are no subnodes in the trie, return. if (count == 0) return; // If there's one subnode (optimisation). if (count == 1) { (*buff_) [buffsize_] = min; buffsize_++; next.node->rm_helper (pipe_, buff_, buffsize_, maxbuffsize_, func_, arg_); // Prune the node if it was made redundant by the removal if (next.node->is_redundant ()) { delete next.node; next.node = 0; count = 0; --live_nodes; zmq_assert (live_nodes == 0); } return; } // If there are multiple subnodes. // // New min non-null character in the node table after the removal unsigned char new_min = min + count - 1; // New max non-null character in the node table after the removal unsigned char new_max = min; for (unsigned short c = 0; c != count; c++) { (*buff_) [buffsize_] = min + c; if (next.table [c]) { next.table [c]->rm_helper (pipe_, buff_, buffsize_ + 1, maxbuffsize_, func_, arg_); // Prune redundant nodes from the mtrie if (next.table [c]->is_redundant ()) { delete next.table [c]; next.table [c] = 0; zmq_assert (live_nodes > 0); --live_nodes; } else { // The node is not redundant, so it's a candidate for being // the new min/max node. // // We loop through the node array from left to right, so the // first non-null, non-redundant node encountered is the new // minimum index. Conversely, the last non-redundant, non-null // node encountered is the new maximum index. if (c + min < new_min) new_min = c + min; if (c + min > new_max) new_max = c + min; } } } zmq_assert (count > 1); // Free the node table if it's no longer used. if (live_nodes == 0) { free (next.table); next.table = NULL; count = 0; } // Compact the node table if possible else if (live_nodes == 1) { // If there's only one live node in the table we can // switch to using the more compact single-node // representation zmq_assert (new_min == new_max); zmq_assert (new_min >= min && new_min < min + count); mtrie_t *node = next.table [new_min - min]; zmq_assert (node); free (next.table); next.node = node; count = 1; min = new_min; } else if (new_min > min || new_max < min + count - 1) { zmq_assert (new_max - new_min + 1 > 1); mtrie_t **old_table = next.table; zmq_assert (new_min > min || new_max < min + count - 1); zmq_assert (new_min >= min); zmq_assert (new_max <= min + count - 1); zmq_assert (new_max - new_min + 1 < count); count = new_max - new_min + 1; next.table = (mtrie_t**) malloc (sizeof (mtrie_t*) * count); alloc_assert (next.table); memmove (next.table, old_table + (new_min - min), sizeof (mtrie_t*) * count); free (old_table); min = new_min; } } bool zmq::mtrie_t::rm (unsigned char *prefix_, size_t size_, pipe_t *pipe_) { return rm_helper (prefix_, size_, pipe_); } bool zmq::mtrie_t::rm_helper (unsigned char *prefix_, size_t size_, pipe_t *pipe_) { if (!size_) { if (pipes) { pipes_t::size_type erased = pipes->erase (pipe_); zmq_assert (erased == 1); if (pipes->empty ()) { delete pipes; pipes = 0; } } return !pipes; } unsigned char c = *prefix_; if (!count || c < min || c >= min + count) return false; mtrie_t *next_node = count == 1 ? next.node : next.table [c - min]; if (!next_node) return false; bool ret = next_node->rm_helper (prefix_ + 1, size_ - 1, pipe_); if (next_node->is_redundant ()) { delete next_node; zmq_assert (count > 0); if (count == 1) { next.node = 0; count = 0; --live_nodes; zmq_assert (live_nodes == 0); } else { next.table [c - min] = 0; zmq_assert (live_nodes > 1); --live_nodes; // Compact the table if possible if (live_nodes == 1) { // If there's only one live node in the table we can // switch to using the more compact single-node // representation unsigned short i; for (i = 0; i < count; ++i) if (next.table [i]) break; zmq_assert (i < count); min += i; count = 1; mtrie_t *oldp = next.table [i]; free (next.table); next.node = oldp; } else if (c == min) { // We can compact the table "from the left" unsigned short i; for (i = 1; i < count; ++i) if (next.table [i]) break; zmq_assert (i < count); min += i; count -= i; mtrie_t **old_table = next.table; next.table = (mtrie_t**) malloc (sizeof (mtrie_t*) * count); alloc_assert (next.table); memmove (next.table, old_table + i, sizeof (mtrie_t*) * count); free (old_table); } else if (c == min + count - 1) { // We can compact the table "from the right" unsigned short i; for (i = 1; i < count; ++i) if (next.table [count - 1 - i]) break; zmq_assert (i < count); count -= i; mtrie_t **old_table = next.table; next.table = (mtrie_t**) malloc (sizeof (mtrie_t*) * count); alloc_assert (next.table); memmove (next.table, old_table, sizeof (mtrie_t*) * count); free (old_table); } } } return ret; } void zmq::mtrie_t::match (unsigned char *data_, size_t size_, void (*func_) (pipe_t *pipe_, void *arg_), void *arg_) { mtrie_t *current = this; while (true) { // Signal the pipes attached to this node. if (current->pipes) { for (pipes_t::iterator it = current->pipes->begin (); it != current->pipes->end (); ++it) func_ (*it, arg_); } // If we are at the end of the message, there's nothing more to match. if (!size_) break; // If there are no subnodes in the trie, return. if (current->count == 0) break; // If there's one subnode (optimisation). if (current->count == 1) { if (data_ [0] != current->min) break; current = current->next.node; data_++; size_--; continue; } // If there are multiple subnodes. if (data_ [0] < current->min || data_ [0] >= current->min + current->count) break; if (!current->next.table [data_ [0] - current->min]) break; current = current->next.table [data_ [0] - current->min]; data_++; size_--; } } bool zmq::mtrie_t::is_redundant () const { return !pipes && live_nodes == 0; } zeromq3-4.0.4+dfsg.orig/src/dealer.hpp0000644000175000017500000000432212240736636016501 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_DEALER_HPP_INCLUDED__ #define __ZMQ_DEALER_HPP_INCLUDED__ #include "socket_base.hpp" #include "session_base.hpp" #include "fq.hpp" #include "lb.hpp" namespace zmq { class ctx_t; class msg_t; class pipe_t; class io_thread_t; class socket_base_t; class dealer_t : public socket_base_t { public: dealer_t (zmq::ctx_t *parent_, uint32_t tid_, int sid); ~dealer_t (); protected: // Overloads of functions from socket_base_t. void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_); int xsetsockopt (int option_, const void *optval_, size_t optvallen_); int xsend (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_); bool xhas_in (); bool xhas_out (); void xread_activated (zmq::pipe_t *pipe_); void xwrite_activated (zmq::pipe_t *pipe_); void xpipe_terminated (zmq::pipe_t *pipe_); // Send and recv - knowing which pipe was used. int sendpipe (zmq::msg_t *msg_, zmq::pipe_t **pipe_); int recvpipe (zmq::msg_t *msg_, zmq::pipe_t **pipe_); private: // Messages are fair-queued from inbound pipes. And load-balanced to // the outbound pipes. fq_t fq; lb_t lb; // if true, send an empty message to every connected router peer bool probe_router; dealer_t (const dealer_t&); const dealer_t &operator = (const dealer_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/v2_encoder.hpp0000644000175000017500000000251112240736636017271 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_V2_ENCODER_HPP_INCLUDED__ #define __ZMQ_V2_ENCODER_HPP_INCLUDED__ #include "encoder.hpp" namespace zmq { // Encoder for 0MQ framing protocol. Converts messages into data stream. class v2_encoder_t : public encoder_base_t { public: v2_encoder_t (size_t bufsize_); virtual ~v2_encoder_t (); private: void size_ready (); void message_ready (); unsigned char tmpbuf [9]; v2_encoder_t (const v2_encoder_t&); const v2_encoder_t &operator = (const v2_encoder_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/io_thread.cpp0000644000175000017500000000446612240736636017207 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "io_thread.hpp" #include "platform.hpp" #include "err.hpp" #include "ctx.hpp" zmq::io_thread_t::io_thread_t (ctx_t *ctx_, uint32_t tid_) : object_t (ctx_, tid_) { poller = new (std::nothrow) poller_t; alloc_assert (poller); mailbox_handle = poller->add_fd (mailbox.get_fd (), this); poller->set_pollin (mailbox_handle); } zmq::io_thread_t::~io_thread_t () { delete poller; } void zmq::io_thread_t::start () { // Start the underlying I/O thread. poller->start (); } void zmq::io_thread_t::stop () { send_stop (); } zmq::mailbox_t *zmq::io_thread_t::get_mailbox () { return &mailbox; } int zmq::io_thread_t::get_load () { return poller->get_load (); } void zmq::io_thread_t::in_event () { // TODO: Do we want to limit number of commands I/O thread can // process in a single go? command_t cmd; int rc = mailbox.recv (&cmd, 0); while (rc == 0 || errno == EINTR) { if (rc == 0) cmd.destination->process_command (cmd); rc = mailbox.recv (&cmd, 0); } errno_assert (rc != 0 && errno == EAGAIN); } void zmq::io_thread_t::out_event () { // We are never polling for POLLOUT here. This function is never called. zmq_assert (false); } void zmq::io_thread_t::timer_event (int) { // No timers here. This function is never called. zmq_assert (false); } zmq::poller_t *zmq::io_thread_t::get_poller () { zmq_assert (poller); return poller; } void zmq::io_thread_t::process_stop () { poller->rm_fd (mailbox_handle); poller->stop (); } zeromq3-4.0.4+dfsg.orig/src/kqueue.cpp0000644000175000017500000001230012240736636016532 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "kqueue.hpp" #if defined ZMQ_USE_KQUEUE #include #include #include #include #include #include #include #include "kqueue.hpp" #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" #include "likely.hpp" // NetBSD defines (struct kevent).udata as intptr_t, everyone else // as void *. #if defined ZMQ_HAVE_NETBSD #define kevent_udata_t intptr_t #else #define kevent_udata_t void * #endif zmq::kqueue_t::kqueue_t () : stopping (false) { // Create event queue kqueue_fd = kqueue (); errno_assert (kqueue_fd != -1); #ifdef HAVE_FORK pid = getpid(); #endif } zmq::kqueue_t::~kqueue_t () { worker.stop (); close (kqueue_fd); } void zmq::kqueue_t::kevent_add (fd_t fd_, short filter_, void *udata_) { struct kevent ev; EV_SET (&ev, fd_, filter_, EV_ADD, 0, 0, (kevent_udata_t)udata_); int rc = kevent (kqueue_fd, &ev, 1, NULL, 0, NULL); errno_assert (rc != -1); } void zmq::kqueue_t::kevent_delete (fd_t fd_, short filter_) { struct kevent ev; EV_SET (&ev, fd_, filter_, EV_DELETE, 0, 0, 0); int rc = kevent (kqueue_fd, &ev, 1, NULL, 0, NULL); errno_assert (rc != -1); } zmq::kqueue_t::handle_t zmq::kqueue_t::add_fd (fd_t fd_, i_poll_events *reactor_) { poll_entry_t *pe = new (std::nothrow) poll_entry_t; alloc_assert (pe); pe->fd = fd_; pe->flag_pollin = 0; pe->flag_pollout = 0; pe->reactor = reactor_; adjust_load (1); return pe; } void zmq::kqueue_t::rm_fd (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (pe->flag_pollin) kevent_delete (pe->fd, EVFILT_READ); if (pe->flag_pollout) kevent_delete (pe->fd, EVFILT_WRITE); pe->fd = retired_fd; retired.push_back (pe); adjust_load (-1); } void zmq::kqueue_t::set_pollin (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (likely (!pe->flag_pollin)) { pe->flag_pollin = true; kevent_add (pe->fd, EVFILT_READ, pe); } } void zmq::kqueue_t::reset_pollin (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (likely (pe->flag_pollin)) { pe->flag_pollin = false; kevent_delete (pe->fd, EVFILT_READ); } } void zmq::kqueue_t::set_pollout (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (likely (!pe->flag_pollout)) { pe->flag_pollout = true; kevent_add (pe->fd, EVFILT_WRITE, pe); } } void zmq::kqueue_t::reset_pollout (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (likely (pe->flag_pollout)) { pe->flag_pollout = false; kevent_delete (pe->fd, EVFILT_WRITE); } } void zmq::kqueue_t::start () { worker.start (worker_routine, this); } void zmq::kqueue_t::stop () { stopping = true; } int zmq::kqueue_t::max_fds () { return -1; } void zmq::kqueue_t::loop () { while (!stopping) { // Execute any due timers. int timeout = (int) execute_timers (); // Wait for events. struct kevent ev_buf [max_io_events]; timespec ts = {timeout / 1000, (timeout % 1000) * 1000000}; int n = kevent (kqueue_fd, NULL, 0, &ev_buf [0], max_io_events, timeout ? &ts: NULL); #ifdef HAVE_FORK if (unlikely(pid != getpid())) { //printf("zmq::kqueue_t::loop aborting on forked child %d\n", (int)getpid()); // simply exit the loop in a forked process. return; } #endif if (n == -1) { errno_assert (errno == EINTR); continue; } for (int i = 0; i < n; i ++) { poll_entry_t *pe = (poll_entry_t*) ev_buf [i].udata; if (pe->fd == retired_fd) continue; if (ev_buf [i].flags & EV_EOF) pe->reactor->in_event (); if (pe->fd == retired_fd) continue; if (ev_buf [i].filter == EVFILT_WRITE) pe->reactor->out_event (); if (pe->fd == retired_fd) continue; if (ev_buf [i].filter == EVFILT_READ) pe->reactor->in_event (); } // Destroy retired event sources. for (retired_t::iterator it = retired.begin (); it != retired.end (); ++it) delete *it; retired.clear (); } } void zmq::kqueue_t::worker_routine (void *arg_) { ((kqueue_t*) arg_)->loop (); } #endif zeromq3-4.0.4+dfsg.orig/src/sub.cpp0000644000175000017500000000403312240736636016030 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "sub.hpp" #include "msg.hpp" zmq::sub_t::sub_t (class ctx_t *parent_, uint32_t tid_, int sid_) : xsub_t (parent_, tid_, sid_) { options.type = ZMQ_SUB; // Switch filtering messages on (as opposed to XSUB which where the // filtering is off). options.filter = true; } zmq::sub_t::~sub_t () { } int zmq::sub_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { if (option_ != ZMQ_SUBSCRIBE && option_ != ZMQ_UNSUBSCRIBE) { errno = EINVAL; return -1; } // Create the subscription message. msg_t msg; int rc = msg.init_size (optvallen_ + 1); errno_assert (rc == 0); unsigned char *data = (unsigned char*) msg.data (); if (option_ == ZMQ_SUBSCRIBE) *data = 1; else if (option_ == ZMQ_UNSUBSCRIBE) *data = 0; memcpy (data + 1, optval_, optvallen_); // Pass it further on in the stack. int err = 0; rc = xsub_t::xsend (&msg); if (rc != 0) err = errno; int rc2 = msg.close (); errno_assert (rc2 == 0); if (rc != 0) errno = err; return rc; } int zmq::sub_t::xsend (msg_t *) { // Overload the XSUB's send. errno = ENOTSUP; return -1; } bool zmq::sub_t::xhas_out () { // Overload the XSUB's send. return false; } zeromq3-4.0.4+dfsg.orig/src/fd.hpp0000644000175000017500000000227012240736636015636 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_FD_HPP_INCLUDED__ #define __ZMQ_FD_HPP_INCLUDED__ #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif namespace zmq { #ifdef ZMQ_HAVE_WINDOWS #if defined _MSC_VER &&_MSC_VER <= 1400 typedef UINT_PTR fd_t; enum {retired_fd = (fd_t)(~0)}; #else typedef SOCKET fd_t; enum {retired_fd = (fd_t)INVALID_SOCKET}; #endif #else typedef int fd_t; enum {retired_fd = -1}; #endif } #endif zeromq3-4.0.4+dfsg.orig/src/stream.cpp0000644000175000017500000001615012240736636016535 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "stream.hpp" #include "pipe.hpp" #include "wire.hpp" #include "random.hpp" #include "likely.hpp" #include "err.hpp" zmq::stream_t::stream_t (class ctx_t *parent_, uint32_t tid_, int sid_) : socket_base_t (parent_, tid_, sid_), prefetched (false), identity_sent (false), current_out (NULL), more_out (false), next_peer_id (generate_random ()) { options.type = ZMQ_STREAM; options.raw_sock = true; prefetched_id.init (); prefetched_msg.init (); } zmq::stream_t::~stream_t () { zmq_assert (outpipes.empty ()); prefetched_id.close (); prefetched_msg.close (); } void zmq::stream_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { // subscribe_to_all_ is unused (void)subscribe_to_all_; zmq_assert (pipe_); identify_peer (pipe_); fq.attach (pipe_); } void zmq::stream_t::xpipe_terminated (pipe_t *pipe_) { outpipes_t::iterator it = outpipes.find (pipe_->get_identity ()); zmq_assert (it != outpipes.end ()); outpipes.erase (it); fq.pipe_terminated (pipe_); if (pipe_ == current_out) current_out = NULL; } void zmq::stream_t::xread_activated (pipe_t *pipe_) { fq.activated (pipe_); } void zmq::stream_t::xwrite_activated (pipe_t *pipe_) { outpipes_t::iterator it; for (it = outpipes.begin (); it != outpipes.end (); ++it) if (it->second.pipe == pipe_) break; zmq_assert (it != outpipes.end ()); zmq_assert (!it->second.active); it->second.active = true; } int zmq::stream_t::xsend (msg_t *msg_) { // If this is the first part of the message it's the ID of the // peer to send the message to. if (!more_out) { zmq_assert (!current_out); // If we have malformed message (prefix with no subsequent message) // then just silently ignore it. // TODO: The connections should be killed instead. if (msg_->flags () & msg_t::more) { // Find the pipe associated with the identity stored in the prefix. // If there's no such pipe return an error blob_t identity ((unsigned char*) msg_->data (), msg_->size ()); outpipes_t::iterator it = outpipes.find (identity); if (it != outpipes.end ()) { current_out = it->second.pipe; if (!current_out->check_write ()) { it->second.active = false; current_out = NULL; errno = EAGAIN; return -1; } } else { errno = EHOSTUNREACH; return -1; } } // Expect one more message frame. more_out = true; int rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); return 0; } // Ignore the MORE flag msg_->reset_flags (msg_t::more); // This is the last part of the message. more_out = false; // Push the message into the pipe. If there's no out pipe, just drop it. if (current_out) { // Close the remote connection if user has asked to do so // by sending zero length message. // Pending messages in the pipe will be dropped (on receiving term- ack) if (msg_->size () == 0) { current_out->terminate (false); int rc = msg_->close (); errno_assert (rc == 0); current_out = NULL; return 0; } bool ok = current_out->write (msg_); if (likely (ok)) current_out->flush (); current_out = NULL; } else { int rc = msg_->close (); errno_assert (rc == 0); } // Detach the message from the data buffer. int rc = msg_->init (); errno_assert (rc == 0); return 0; } int zmq::stream_t::xrecv (msg_t *msg_) { if (prefetched) { if (!identity_sent) { int rc = msg_->move (prefetched_id); errno_assert (rc == 0); identity_sent = true; } else { int rc = msg_->move (prefetched_msg); errno_assert (rc == 0); prefetched = false; } return 0; } pipe_t *pipe = NULL; int rc = fq.recvpipe (&prefetched_msg, &pipe); if (rc != 0) return -1; zmq_assert (pipe != NULL); zmq_assert ((prefetched_msg.flags () & msg_t::more) == 0); // We have received a frame with TCP data. // Rather than sendig this frame, we keep it in prefetched // buffer and send a frame with peer's ID. blob_t identity = pipe->get_identity (); rc = msg_->init_size (identity.size ()); errno_assert (rc == 0); memcpy (msg_->data (), identity.data (), identity.size ()); msg_->set_flags (msg_t::more); prefetched = true; identity_sent = true; return 0; } bool zmq::stream_t::xhas_in () { // We may already have a message pre-fetched. if (prefetched) return true; // Try to read the next message. // The message, if read, is kept in the pre-fetch buffer. pipe_t *pipe = NULL; int rc = fq.recvpipe (&prefetched_msg, &pipe); if (rc != 0) return false; zmq_assert (pipe != NULL); zmq_assert ((prefetched_msg.flags () & msg_t::more) == 0); blob_t identity = pipe->get_identity (); rc = prefetched_id.init_size (identity.size ()); errno_assert (rc == 0); memcpy (prefetched_id.data (), identity.data (), identity.size ()); prefetched_id.set_flags (msg_t::more); prefetched = true; identity_sent = false; return true; } bool zmq::stream_t::xhas_out () { // In theory, STREAM socket is always ready for writing. Whether actual // attempt to write succeeds depends on which pipe the message is going // to be routed to. return true; } void zmq::stream_t::identify_peer (pipe_t *pipe_) { // Always assign identity for raw-socket unsigned char buffer [5]; buffer [0] = 0; put_uint32 (buffer + 1, next_peer_id++); blob_t identity = blob_t (buffer, sizeof buffer); memcpy (options.identity, identity.data (), identity.size ()); options.identity_size = identity.size (); pipe_->set_identity (identity); // Add the record into output pipes lookup table outpipe_t outpipe = {pipe_, true}; const bool ok = outpipes.insert ( outpipes_t::value_type (identity, outpipe)).second; zmq_assert (ok); } zeromq3-4.0.4+dfsg.orig/src/null_mechanism.cpp0000644000175000017500000001640212240736636020240 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include #include #include #include "err.hpp" #include "msg.hpp" #include "session_base.hpp" #include "wire.hpp" #include "null_mechanism.hpp" zmq::null_mechanism_t::null_mechanism_t (session_base_t *session_, const std::string &peer_address_, const options_t &options_) : mechanism_t (options_), session (session_), peer_address (peer_address_), ready_command_sent (false), ready_command_received (false), zap_connected (false), zap_request_sent (false), zap_reply_received (false) { // NULL mechanism only uses ZAP if there's a domain defined // This prevents ZAP requests on naive sockets if (options.zap_domain.size () > 0 && session->zap_connect () == 0) zap_connected = true; } zmq::null_mechanism_t::~null_mechanism_t () { } int zmq::null_mechanism_t::next_handshake_command (msg_t *msg_) { if (ready_command_sent) { errno = EAGAIN; return -1; } if (zap_connected && !zap_reply_received) { if (zap_request_sent) { errno = EAGAIN; return -1; } send_zap_request (); zap_request_sent = true; const int rc = receive_and_process_zap_reply (); if (rc != 0) return -1; zap_reply_received = true; } unsigned char * const command_buffer = (unsigned char *) malloc (512); alloc_assert (command_buffer); unsigned char *ptr = command_buffer; // Add mechanism string memcpy (ptr, "\5READY", 6); ptr += 6; // Add socket type property const char *socket_type = socket_type_string (options.type); ptr += add_property (ptr, "Socket-Type", socket_type, strlen (socket_type)); // Add identity property if (options.type == ZMQ_REQ || options.type == ZMQ_DEALER || options.type == ZMQ_ROUTER) { ptr += add_property (ptr, "Identity", options.identity, options.identity_size); } const size_t command_size = ptr - command_buffer; const int rc = msg_->init_size (command_size); errno_assert (rc == 0); memcpy (msg_->data (), command_buffer, command_size); free (command_buffer); ready_command_sent = true; return 0; } int zmq::null_mechanism_t::process_handshake_command (msg_t *msg_) { if (ready_command_received) { errno = EPROTO; return -1; } const unsigned char *ptr = static_cast (msg_->data ()); size_t bytes_left = msg_->size (); if (bytes_left < 6 || memcmp (ptr, "\5READY", 6)) { errno = EPROTO; return -1; } ptr += 6; bytes_left -= 6; int rc = parse_metadata (ptr, bytes_left); if (rc == 0) { int rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); } ready_command_received = true; return rc; } int zmq::null_mechanism_t::zap_msg_available () { if (zap_reply_received) { errno = EFSM; return -1; } const int rc = receive_and_process_zap_reply (); if (rc == 0) zap_reply_received = true; return rc; } bool zmq::null_mechanism_t::is_handshake_complete () const { return ready_command_received && ready_command_sent; } void zmq::null_mechanism_t::send_zap_request () { int rc; msg_t msg; // Address delimiter frame rc = msg.init (); errno_assert (rc == 0); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Version frame rc = msg.init_size (3); errno_assert (rc == 0); memcpy (msg.data (), "1.0", 3); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Request id frame rc = msg.init_size (1); errno_assert (rc == 0); memcpy (msg.data (), "1", 1); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Domain frame rc = msg.init_size (options.zap_domain.length ()); errno_assert (rc == 0); memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ()); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Address frame rc = msg.init_size (peer_address.length ()); errno_assert (rc == 0); memcpy (msg.data (), peer_address.c_str (), peer_address.length ()); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Identity frame rc = msg.init_size (options.identity_size); errno_assert (rc == 0); memcpy (msg.data (), options.identity, options.identity_size); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Mechanism frame rc = msg.init_size (4); errno_assert (rc == 0); memcpy (msg.data (), "NULL", 4); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); } int zmq::null_mechanism_t::receive_and_process_zap_reply () { int rc = 0; msg_t msg [7]; // ZAP reply consists of 7 frames // Initialize all reply frames for (int i = 0; i < 7; i++) { rc = msg [i].init (); errno_assert (rc == 0); } for (int i = 0; i < 7; i++) { rc = session->read_zap_msg (&msg [i]); if (rc == -1) break; if ((msg [i].flags () & msg_t::more) == (i < 6? 0: msg_t::more)) { errno = EPROTO; rc = -1; break; } } if (rc != 0) goto error; // Address delimiter frame if (msg [0].size () > 0) { rc = -1; errno = EPROTO; goto error; } // Version frame if (msg [1].size () != 3 || memcmp (msg [1].data (), "1.0", 3)) { rc = -1; errno = EPROTO; goto error; } // Request id frame if (msg [2].size () != 1 || memcmp (msg [2].data (), "1", 1)) { rc = -1; errno = EPROTO; goto error; } // Status code frame if (msg [3].size () != 3 || memcmp (msg [3].data (), "200", 3)) { rc = -1; errno = EACCES; goto error; } // Process metadata frame rc = parse_metadata (static_cast (msg [6].data ()), msg [6].size ()); error: for (int i = 0; i < 7; i++) { const int rc2 = msg [i].close (); errno_assert (rc2 == 0); } return rc; } zeromq3-4.0.4+dfsg.orig/src/xsub.hpp0000644000175000017500000000505112240736636016226 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_XSUB_HPP_INCLUDED__ #define __ZMQ_XSUB_HPP_INCLUDED__ #include "socket_base.hpp" #include "session_base.hpp" #include "dist.hpp" #include "fq.hpp" #include "trie.hpp" namespace zmq { class ctx_t; class pipe_t; class io_thread_t; class xsub_t : public socket_base_t { public: xsub_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_); ~xsub_t (); protected: // Overloads of functions from socket_base_t. void xattach_pipe (zmq::pipe_t *pipe_, bool subscribe_to_all_); int xsend (zmq::msg_t *msg_); bool xhas_out (); int xrecv (zmq::msg_t *msg_); bool xhas_in (); void xread_activated (zmq::pipe_t *pipe_); void xwrite_activated (zmq::pipe_t *pipe_); void xhiccuped (pipe_t *pipe_); void xpipe_terminated (zmq::pipe_t *pipe_); private: // Check whether the message matches at least one subscription. bool match (zmq::msg_t *msg_); // Function to be applied to the trie to send all the subsciptions // upstream. static void send_subscription (unsigned char *data_, size_t size_, void *arg_); // Fair queueing object for inbound pipes. fq_t fq; // Object for distributing the subscriptions upstream. dist_t dist; // The repository of subscriptions. trie_t subscriptions; // If true, 'message' contains a matching message to return on the // next recv call. bool has_message; msg_t message; // If true, part of a multipart message was already received, but // there are following parts still waiting. bool more; xsub_t (const xsub_t&); const xsub_t &operator = (const xsub_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/trie.hpp0000644000175000017500000000420612240736636016211 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TRIE_HPP_INCLUDED__ #define __ZMQ_TRIE_HPP_INCLUDED__ #include #include "stdint.hpp" namespace zmq { class trie_t { public: trie_t (); ~trie_t (); // Add key to the trie. Returns true if this is a new item in the trie // rather than a duplicate. bool add (unsigned char *prefix_, size_t size_); // Remove key from the trie. Returns true if the item is actually // removed from the trie. bool rm (unsigned char *prefix_, size_t size_); // Check whether particular key is in the trie. bool check (unsigned char *data_, size_t size_); // Apply the function supplied to each subscription in the trie. void apply (void (*func_) (unsigned char *data_, size_t size_, void *arg_), void *arg_); private: void apply_helper ( unsigned char **buff_, size_t buffsize_, size_t maxbuffsize_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), void *arg_); bool is_redundant () const; uint32_t refcnt; unsigned char min; unsigned short count; unsigned short live_nodes; union { class trie_t *node; class trie_t **table; } next; trie_t (const trie_t&); const trie_t &operator = (const trie_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/raw_encoder.hpp0000644000175000017500000000272312240736636017540 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_RAW_ENCODER_HPP_INCLUDED__ #define __ZMQ_RAW_ENCODER_HPP_INCLUDED__ #if defined(_MSC_VER) #ifndef NOMINMAX #define NOMINMAX #endif #endif #include #include #include #include #include "err.hpp" #include "msg.hpp" #include "i_encoder.hpp" namespace zmq { // Encoder for 0MQ framing protocol. Converts messages into data batches. class raw_encoder_t : public encoder_base_t { public: raw_encoder_t (size_t bufsize_); ~raw_encoder_t (); private: void raw_message_ready (); raw_encoder_t (const raw_encoder_t&); const raw_encoder_t &operator = (const raw_encoder_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/curve_server.cpp0000644000175000017500000004424512240736636017762 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #ifdef HAVE_LIBSODIUM #include #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "msg.hpp" #include "session_base.hpp" #include "err.hpp" #include "curve_server.hpp" #include "wire.hpp" zmq::curve_server_t::curve_server_t (session_base_t *session_, const std::string &peer_address_, const options_t &options_) : mechanism_t (options_), session (session_), peer_address (peer_address_), state (expect_hello), expecting_zap_reply (false), cn_nonce (1) { // Fetch our secret key from socket options memcpy (secret_key, options_.curve_secret_key, crypto_box_SECRETKEYBYTES); // Generate short-term key pair const int rc = crypto_box_keypair (cn_public, cn_secret); zmq_assert (rc == 0); } zmq::curve_server_t::~curve_server_t () { } int zmq::curve_server_t::next_handshake_command (msg_t *msg_) { int rc = 0; switch (state) { case send_welcome: rc = produce_welcome (msg_); if (rc == 0) state = expect_initiate; break; case send_ready: rc = produce_ready (msg_); if (rc == 0) state = connected; break; default: errno = EAGAIN; rc = -1; break; } return rc; } int zmq::curve_server_t::process_handshake_command (msg_t *msg_) { int rc = 0; switch (state) { case expect_hello: rc = process_hello (msg_); if (rc == 0) state = send_welcome; break; case expect_initiate: rc = process_initiate (msg_); if (rc == 0) state = expecting_zap_reply? expect_zap_reply: send_ready; break; default: errno = EPROTO; rc = -1; break; } if (rc == 0) { rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); } return rc; } int zmq::curve_server_t::encode (msg_t *msg_) { zmq_assert (state == connected); const size_t mlen = crypto_box_ZEROBYTES + 1 + msg_->size (); uint8_t message_nonce [crypto_box_NONCEBYTES]; memcpy (message_nonce, "CurveZMQMESSAGES", 16); memcpy (message_nonce + 16, &cn_nonce, 8); uint8_t flags = 0; if (msg_->flags () & msg_t::more) flags |= 0x01; uint8_t *message_plaintext = static_cast (malloc (mlen)); alloc_assert (message_plaintext); memset (message_plaintext, 0, crypto_box_ZEROBYTES); message_plaintext [crypto_box_ZEROBYTES] = flags; memcpy (message_plaintext + crypto_box_ZEROBYTES + 1, msg_->data (), msg_->size ()); uint8_t *message_box = static_cast (malloc (mlen)); alloc_assert (message_box); int rc = crypto_box_afternm (message_box, message_plaintext, mlen, message_nonce, cn_precom); zmq_assert (rc == 0); rc = msg_->close (); zmq_assert (rc == 0); rc = msg_->init_size (16 + mlen - crypto_box_BOXZEROBYTES); zmq_assert (rc == 0); uint8_t *message = static_cast (msg_->data ()); memcpy (message, "\x07MESSAGE", 8); memcpy (message + 8, &cn_nonce, 8); memcpy (message + 16, message_box + crypto_box_BOXZEROBYTES, mlen - crypto_box_BOXZEROBYTES); free (message_plaintext); free (message_box); cn_nonce++; return 0; } int zmq::curve_server_t::decode (msg_t *msg_) { zmq_assert (state == connected); if (msg_->size () < 33) { errno = EPROTO; return -1; } const uint8_t *message = static_cast (msg_->data ()); if (memcmp (message, "\x07MESSAGE", 8)) { errno = EPROTO; return -1; } uint8_t message_nonce [crypto_box_NONCEBYTES]; memcpy (message_nonce, "CurveZMQMESSAGEC", 16); memcpy (message_nonce + 16, message + 8, 8); const size_t clen = crypto_box_BOXZEROBYTES + msg_->size () - 16; uint8_t *message_plaintext = static_cast (malloc (clen)); alloc_assert (message_plaintext); uint8_t *message_box = static_cast (malloc (clen)); alloc_assert (message_box); memset (message_box, 0, crypto_box_BOXZEROBYTES); memcpy (message_box + crypto_box_BOXZEROBYTES, message + 16, msg_->size () - 16); int rc = crypto_box_open_afternm (message_plaintext, message_box, clen, message_nonce, cn_precom); if (rc == 0) { rc = msg_->close (); zmq_assert (rc == 0); rc = msg_->init_size (clen - 1 - crypto_box_ZEROBYTES); zmq_assert (rc == 0); const uint8_t flags = message_plaintext [crypto_box_ZEROBYTES]; if (flags & 0x01) msg_->set_flags (msg_t::more); memcpy (msg_->data (), message_plaintext + crypto_box_ZEROBYTES + 1, msg_->size ()); } else errno = EPROTO; free (message_plaintext); free (message_box); return rc; } int zmq::curve_server_t::zap_msg_available () { if (state != expect_zap_reply) { errno = EFSM; return -1; } const int rc = receive_and_process_zap_reply (); if (rc == 0) state = send_ready; return rc; } bool zmq::curve_server_t::is_handshake_complete () const { return state == connected; } int zmq::curve_server_t::process_hello (msg_t *msg_) { if (msg_->size () != 200) { errno = EPROTO; return -1; } const uint8_t * const hello = static_cast (msg_->data ()); if (memcmp (hello, "\x05HELLO", 6)) { errno = EPROTO; return -1; } const uint8_t major = hello [6]; const uint8_t minor = hello [7]; if (major != 1 || minor != 0) { errno = EPROTO; return -1; } // Save client's short-term public key (C') memcpy (cn_client, hello + 80, 32); uint8_t hello_nonce [crypto_box_NONCEBYTES]; uint8_t hello_plaintext [crypto_box_ZEROBYTES + 64]; uint8_t hello_box [crypto_box_BOXZEROBYTES + 80]; memcpy (hello_nonce, "CurveZMQHELLO---", 16); memcpy (hello_nonce + 16, hello + 112, 8); memset (hello_box, 0, crypto_box_BOXZEROBYTES); memcpy (hello_box + crypto_box_BOXZEROBYTES, hello + 120, 80); // Open Box [64 * %x0](C'->S) int rc = crypto_box_open (hello_plaintext, hello_box, sizeof hello_box, hello_nonce, cn_client, secret_key); if (rc != 0) { errno = EPROTO; return -1; } return rc; } int zmq::curve_server_t::produce_welcome (msg_t *msg_) { uint8_t cookie_nonce [crypto_secretbox_NONCEBYTES]; uint8_t cookie_plaintext [crypto_secretbox_ZEROBYTES + 64]; uint8_t cookie_ciphertext [crypto_secretbox_BOXZEROBYTES + 80]; // Create full nonce for encryption // 8-byte prefix plus 16-byte random nonce memcpy (cookie_nonce, "COOKIE--", 8); randombytes (cookie_nonce + 8, 16); // Generate cookie = Box [C' + s'](t) memset (cookie_plaintext, 0, crypto_secretbox_ZEROBYTES); memcpy (cookie_plaintext + crypto_secretbox_ZEROBYTES, cn_client, 32); memcpy (cookie_plaintext + crypto_secretbox_ZEROBYTES + 32, cn_secret, 32); // Generate fresh cookie key randombytes (cookie_key, crypto_secretbox_KEYBYTES); // Encrypt using symmetric cookie key int rc = crypto_secretbox (cookie_ciphertext, cookie_plaintext, sizeof cookie_plaintext, cookie_nonce, cookie_key); zmq_assert (rc == 0); uint8_t welcome_nonce [crypto_box_NONCEBYTES]; uint8_t welcome_plaintext [crypto_box_ZEROBYTES + 128]; uint8_t welcome_ciphertext [crypto_box_BOXZEROBYTES + 144]; // Create full nonce for encryption // 8-byte prefix plus 16-byte random nonce memcpy (welcome_nonce, "WELCOME-", 8); randombytes (welcome_nonce + 8, crypto_box_NONCEBYTES - 8); // Create 144-byte Box [S' + cookie](S->C') memset (welcome_plaintext, 0, crypto_box_ZEROBYTES); memcpy (welcome_plaintext + crypto_box_ZEROBYTES, cn_public, 32); memcpy (welcome_plaintext + crypto_box_ZEROBYTES + 32, cookie_nonce + 8, 16); memcpy (welcome_plaintext + crypto_box_ZEROBYTES + 48, cookie_ciphertext + crypto_secretbox_BOXZEROBYTES, 80); rc = crypto_box (welcome_ciphertext, welcome_plaintext, sizeof welcome_plaintext, welcome_nonce, cn_client, secret_key); zmq_assert (rc == 0); rc = msg_->init_size (168); errno_assert (rc == 0); uint8_t * const welcome = static_cast (msg_->data ()); memcpy (welcome, "\x07WELCOME", 8); memcpy (welcome + 8, welcome_nonce + 8, 16); memcpy (welcome + 24, welcome_ciphertext + crypto_box_BOXZEROBYTES, 144); return 0; } int zmq::curve_server_t::process_initiate (msg_t *msg_) { if (msg_->size () < 257) { errno = EPROTO; return -1; } const uint8_t *initiate = static_cast (msg_->data ()); if (memcmp (initiate, "\x08INITIATE", 9)) { errno = EPROTO; return -1; } uint8_t cookie_nonce [crypto_secretbox_NONCEBYTES]; uint8_t cookie_plaintext [crypto_secretbox_ZEROBYTES + 64]; uint8_t cookie_box [crypto_secretbox_BOXZEROBYTES + 80]; // Open Box [C' + s'](t) memset (cookie_box, 0, crypto_secretbox_BOXZEROBYTES); memcpy (cookie_box + crypto_secretbox_BOXZEROBYTES, initiate + 25, 80); memcpy (cookie_nonce, "COOKIE--", 8); memcpy (cookie_nonce + 8, initiate + 9, 16); int rc = crypto_secretbox_open (cookie_plaintext, cookie_box, sizeof cookie_box, cookie_nonce, cookie_key); if (rc != 0) { errno = EPROTO; return -1; } // Check cookie plain text is as expected [C' + s'] if (memcmp (cookie_plaintext + crypto_secretbox_ZEROBYTES, cn_client, 32) || memcmp (cookie_plaintext + crypto_secretbox_ZEROBYTES + 32, cn_secret, 32)) { errno = EPROTO; return -1; } const size_t clen = (msg_->size () - 113) + crypto_box_BOXZEROBYTES; uint8_t initiate_nonce [crypto_box_NONCEBYTES]; uint8_t initiate_plaintext [crypto_box_ZEROBYTES + 128 + 256]; uint8_t initiate_box [crypto_box_BOXZEROBYTES + 144 + 256]; // Open Box [C + vouch + metadata](C'->S') memset (initiate_box, 0, crypto_box_BOXZEROBYTES); memcpy (initiate_box + crypto_box_BOXZEROBYTES, initiate + 113, clen - crypto_box_BOXZEROBYTES); memcpy (initiate_nonce, "CurveZMQINITIATE", 16); memcpy (initiate_nonce + 16, initiate + 105, 8); rc = crypto_box_open (initiate_plaintext, initiate_box, clen, initiate_nonce, cn_client, cn_secret); if (rc != 0) { errno = EPROTO; return -1; } const uint8_t *client_key = initiate_plaintext + crypto_box_ZEROBYTES; uint8_t vouch_nonce [crypto_box_NONCEBYTES]; uint8_t vouch_plaintext [crypto_box_ZEROBYTES + 64]; uint8_t vouch_box [crypto_box_BOXZEROBYTES + 80]; // Open Box Box [C',S](C->S') and check contents memset (vouch_box, 0, crypto_box_BOXZEROBYTES); memcpy (vouch_box + crypto_box_BOXZEROBYTES, initiate_plaintext + crypto_box_ZEROBYTES + 48, 80); memcpy (vouch_nonce, "VOUCH---", 8); memcpy (vouch_nonce + 8, initiate_plaintext + crypto_box_ZEROBYTES + 32, 16); rc = crypto_box_open (vouch_plaintext, vouch_box, sizeof vouch_box, vouch_nonce, client_key, cn_secret); if (rc != 0) { errno = EPROTO; return -1; } // What we decrypted must be the client's short-term public key if (memcmp (vouch_plaintext + crypto_box_ZEROBYTES, cn_client, 32)) { errno = EPROTO; return -1; } // Precompute connection secret from client key rc = crypto_box_beforenm (cn_precom, cn_client, cn_secret); zmq_assert (rc == 0); // Use ZAP protocol (RFC 27) to authenticate the user. rc = session->zap_connect (); if (rc == 0) { send_zap_request (client_key); rc = receive_and_process_zap_reply (); if (rc != 0) { if (errno != EAGAIN) return -1; expecting_zap_reply = true; } } return parse_metadata (initiate_plaintext + crypto_box_ZEROBYTES + 128, clen - crypto_box_ZEROBYTES - 128); } int zmq::curve_server_t::produce_ready (msg_t *msg_) { uint8_t ready_nonce [crypto_box_NONCEBYTES]; uint8_t ready_plaintext [crypto_box_ZEROBYTES + 256]; uint8_t ready_box [crypto_box_BOXZEROBYTES + 16 + 256]; // Create Box [metadata](S'->C') memset (ready_plaintext, 0, crypto_box_ZEROBYTES); uint8_t *ptr = ready_plaintext + crypto_box_ZEROBYTES; // Add socket type property const char *socket_type = socket_type_string (options.type); ptr += add_property (ptr, "Socket-Type", socket_type, strlen (socket_type)); // Add identity property if (options.type == ZMQ_REQ || options.type == ZMQ_DEALER || options.type == ZMQ_ROUTER) ptr += add_property (ptr, "Identity", options.identity, options.identity_size); const size_t mlen = ptr - ready_plaintext; memcpy (ready_nonce, "CurveZMQREADY---", 16); memcpy (ready_nonce + 16, &cn_nonce, 8); int rc = crypto_box_afternm (ready_box, ready_plaintext, mlen, ready_nonce, cn_precom); zmq_assert (rc == 0); rc = msg_->init_size (14 + mlen - crypto_box_BOXZEROBYTES); errno_assert (rc == 0); uint8_t *ready = static_cast (msg_->data ()); memcpy (ready, "\x05READY", 6); // Short nonce, prefixed by "CurveZMQREADY---" memcpy (ready + 6, &cn_nonce, 8); // Box [metadata](S'->C') memcpy (ready + 14, ready_box + crypto_box_BOXZEROBYTES, mlen - crypto_box_BOXZEROBYTES); cn_nonce++; return 0; } void zmq::curve_server_t::send_zap_request (const uint8_t *key) { int rc; msg_t msg; // Address delimiter frame rc = msg.init (); errno_assert (rc == 0); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Version frame rc = msg.init_size (3); errno_assert (rc == 0); memcpy (msg.data (), "1.0", 3); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Request ID frame rc = msg.init_size (1); errno_assert (rc == 0); memcpy (msg.data (), "1", 1); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Domain frame rc = msg.init_size (options.zap_domain.length ()); errno_assert (rc == 0); memcpy (msg.data (), options.zap_domain.c_str (), options.zap_domain.length ()); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Address frame rc = msg.init_size (peer_address.length ()); errno_assert (rc == 0); memcpy (msg.data (), peer_address.c_str (), peer_address.length ()); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Identity frame rc = msg.init_size (options.identity_size); errno_assert (rc == 0); memcpy (msg.data (), options.identity, options.identity_size); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Mechanism frame rc = msg.init_size (5); errno_assert (rc == 0); memcpy (msg.data (), "CURVE", 5); msg.set_flags (msg_t::more); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); // Credentials frame rc = msg.init_size (crypto_box_PUBLICKEYBYTES); errno_assert (rc == 0); memcpy (msg.data (), key, crypto_box_PUBLICKEYBYTES); rc = session->write_zap_msg (&msg); errno_assert (rc == 0); } int zmq::curve_server_t::receive_and_process_zap_reply () { int rc = 0; msg_t msg [7]; // ZAP reply consists of 7 frames // Initialize all reply frames for (int i = 0; i < 7; i++) { rc = msg [i].init (); errno_assert (rc == 0); } for (int i = 0; i < 7; i++) { rc = session->read_zap_msg (&msg [i]); if (rc == -1) break; if ((msg [i].flags () & msg_t::more) == (i < 6? 0: msg_t::more)) { errno = EPROTO; rc = -1; break; } } if (rc != 0) goto error; // Address delimiter frame if (msg [0].size () > 0) { rc = -1; errno = EPROTO; goto error; } // Version frame if (msg [1].size () != 3 || memcmp (msg [1].data (), "1.0", 3)) { rc = -1; errno = EPROTO; goto error; } // Request id frame if (msg [2].size () != 1 || memcmp (msg [2].data (), "1", 1)) { rc = -1; errno = EPROTO; goto error; } // Status code frame if (msg [3].size () != 3 || memcmp (msg [3].data (), "200", 3)) { rc = -1; errno = EACCES; goto error; } // Process metadata frame rc = parse_metadata (static_cast (msg [6].data ()), msg [6].size ()); error: for (int i = 0; i < 7; i++) { const int rc2 = msg [i].close (); errno_assert (rc2 == 0); } return rc; } #endif zeromq3-4.0.4+dfsg.orig/src/select.cpp0000644000175000017500000001302512240736636016517 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "select.hpp" #if defined ZMQ_USE_SELECT #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #elif defined ZMQ_HAVE_HPUX #include #include #include #elif defined ZMQ_HAVE_OPENVMS #include #include #else #include #endif #include #include #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" zmq::select_t::select_t () : maxfd (retired_fd), retired (false), stopping (false) { // Clear file descriptor sets. FD_ZERO (&source_set_in); FD_ZERO (&source_set_out); FD_ZERO (&source_set_err); } zmq::select_t::~select_t () { worker.stop (); } zmq::select_t::handle_t zmq::select_t::add_fd (fd_t fd_, i_poll_events *events_) { // Store the file descriptor. fd_entry_t entry = {fd_, events_}; fds.push_back (entry); // Ensure we do not attempt to select () on more than FD_SETSIZE // file descriptors. zmq_assert (fds.size () <= FD_SETSIZE); // Start polling on errors. FD_SET (fd_, &source_set_err); // Adjust maxfd if necessary. if (fd_ > maxfd) maxfd = fd_; // Increase the load metric of the thread. adjust_load (1); return fd_; } void zmq::select_t::rm_fd (handle_t handle_) { // Mark the descriptor as retired. fd_set_t::iterator it; for (it = fds.begin (); it != fds.end (); ++it) if (it->fd == handle_) break; zmq_assert (it != fds.end ()); it->fd = retired_fd; retired = true; // Stop polling on the descriptor. FD_CLR (handle_, &source_set_in); FD_CLR (handle_, &source_set_out); FD_CLR (handle_, &source_set_err); // Discard all events generated on this file descriptor. FD_CLR (handle_, &readfds); FD_CLR (handle_, &writefds); FD_CLR (handle_, &exceptfds); // Adjust the maxfd attribute if we have removed the // highest-numbered file descriptor. if (handle_ == maxfd) { maxfd = retired_fd; for (fd_set_t::iterator it = fds.begin (); it != fds.end (); ++it) if (it->fd > maxfd) maxfd = it->fd; } // Decrease the load metric of the thread. adjust_load (-1); } void zmq::select_t::set_pollin (handle_t handle_) { FD_SET (handle_, &source_set_in); } void zmq::select_t::reset_pollin (handle_t handle_) { FD_CLR (handle_, &source_set_in); } void zmq::select_t::set_pollout (handle_t handle_) { FD_SET (handle_, &source_set_out); } void zmq::select_t::reset_pollout (handle_t handle_) { FD_CLR (handle_, &source_set_out); } void zmq::select_t::start () { worker.start (worker_routine, this); } void zmq::select_t::stop () { stopping = true; } int zmq::select_t::max_fds () { return FD_SETSIZE; } void zmq::select_t::loop () { while (!stopping) { // Execute any due timers. int timeout = (int) execute_timers (); // Intialise the pollsets. memcpy (&readfds, &source_set_in, sizeof source_set_in); memcpy (&writefds, &source_set_out, sizeof source_set_out); memcpy (&exceptfds, &source_set_err, sizeof source_set_err); // Wait for events. struct timeval tv = {(long) (timeout / 1000), (long) (timeout % 1000 * 1000)}; #ifdef ZMQ_HAVE_WINDOWS int rc = select (0, &readfds, &writefds, &exceptfds, timeout ? &tv : NULL); wsa_assert (rc != SOCKET_ERROR); #else int rc = select (maxfd + 1, &readfds, &writefds, &exceptfds, timeout ? &tv : NULL); if (rc == -1) { errno_assert (errno == EINTR); continue; } #endif // If there are no events (i.e. it's a timeout) there's no point // in checking the pollset. if (rc == 0) continue; for (fd_set_t::size_type i = 0; i < fds.size (); i ++) { if (fds [i].fd == retired_fd) continue; if (FD_ISSET (fds [i].fd, &exceptfds)) fds [i].events->in_event (); if (fds [i].fd == retired_fd) continue; if (FD_ISSET (fds [i].fd, &writefds)) fds [i].events->out_event (); if (fds [i].fd == retired_fd) continue; if (FD_ISSET (fds [i].fd, &readfds)) fds [i].events->in_event (); } // Destroy retired event sources. if (retired) { fds.erase (std::remove_if (fds.begin (), fds.end (), zmq::select_t::is_retired_fd), fds.end ()); retired = false; } } } void zmq::select_t::worker_routine (void *arg_) { ((select_t*) arg_)->loop (); } bool zmq::select_t::is_retired_fd (const fd_entry_t &entry) { return (entry.fd == retired_fd); } #endif zeromq3-4.0.4+dfsg.orig/src/thread.cpp0000644000175000017500000000503112240736636016505 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "thread.hpp" #include "err.hpp" #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS extern "C" { #if defined _WIN32_WCE static DWORD thread_routine (LPVOID arg_) #else static unsigned int __stdcall thread_routine (void *arg_) #endif { zmq::thread_t *self = (zmq::thread_t*) arg_; self->tfn (self->arg); return 0; } } void zmq::thread_t::start (thread_fn *tfn_, void *arg_) { tfn = tfn_; arg =arg_; #if defined _WIN32_WCE descriptor = (HANDLE) CreateThread (NULL, 0, &::thread_routine, this, 0 , NULL); #else descriptor = (HANDLE) _beginthreadex (NULL, 0, &::thread_routine, this, 0 , NULL); #endif win_assert (descriptor != NULL); } void zmq::thread_t::stop () { DWORD rc = WaitForSingleObject (descriptor, INFINITE); win_assert (rc != WAIT_FAILED); BOOL rc2 = CloseHandle (descriptor); win_assert (rc2 != 0); } #else #include extern "C" { static void *thread_routine (void *arg_) { #if !defined ZMQ_HAVE_OPENVMS && !defined ZMQ_HAVE_ANDROID // Following code will guarantee more predictable latencies as it'll // disallow any signal handling in the I/O thread. sigset_t signal_set; int rc = sigfillset (&signal_set); errno_assert (rc == 0); rc = pthread_sigmask (SIG_BLOCK, &signal_set, NULL); posix_assert (rc); #endif zmq::thread_t *self = (zmq::thread_t*) arg_; self->tfn (self->arg); return NULL; } } void zmq::thread_t::start (thread_fn *tfn_, void *arg_) { tfn = tfn_; arg =arg_; int rc = pthread_create (&descriptor, NULL, thread_routine, this); posix_assert (rc); } void zmq::thread_t::stop () { int rc = pthread_join (descriptor, NULL); posix_assert (rc); } #endif zeromq3-4.0.4+dfsg.orig/src/command.hpp0000644000175000017500000001044612240736636016667 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_COMMAND_HPP_INCLUDED__ #define __ZMQ_COMMAND_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { class object_t; class own_t; struct i_engine; class pipe_t; class socket_base_t; // This structure defines the commands that can be sent between threads. struct command_t { // Object to process the command. zmq::object_t *destination; enum type_t { stop, plug, own, attach, bind, activate_read, activate_write, hiccup, pipe_term, pipe_term_ack, term_req, term, term_ack, reap, reaped, inproc_connected, done } type; union { // Sent to I/O thread to let it know that it should // terminate itself. struct { } stop; // Sent to I/O object to make it register with its I/O thread. struct { } plug; // Sent to socket to let it know about the newly created object. struct { zmq::own_t *object; } own; // Attach the engine to the session. If engine is NULL, it informs // session that the connection have failed. struct { struct i_engine *engine; } attach; // Sent from session to socket to establish pipe(s) between them. // Caller have used inc_seqnum beforehand sending the command. struct { zmq::pipe_t *pipe; } bind; // Sent by pipe writer to inform dormant pipe reader that there // are messages in the pipe. struct { } activate_read; // Sent by pipe reader to inform pipe writer about how many // messages it has read so far. struct { uint64_t msgs_read; } activate_write; // Sent by pipe reader to writer after creating a new inpipe. // The parameter is actually of type pipe_t::upipe_t, however, // its definition is private so we'll have to do with void*. struct { void *pipe; } hiccup; // Sent by pipe reader to pipe writer to ask it to terminate // its end of the pipe. struct { } pipe_term; // Pipe writer acknowledges pipe_term command. struct { } pipe_term_ack; // Sent by I/O object ot the socket to request the shutdown of // the I/O object. struct { zmq::own_t *object; } term_req; // Sent by socket to I/O object to start its shutdown. struct { int linger; } term; // Sent by I/O object to the socket to acknowledge it has // shut down. struct { } term_ack; // Transfers the ownership of the closed socket // to the reaper thread. struct { zmq::socket_base_t *socket; } reap; // Closed socket notifies the reaper that it's already deallocated. struct { } reaped; // Sent by reaper thread to the term thread when all the sockets // are successfully deallocated. struct { } done; } args; }; } #endif zeromq3-4.0.4+dfsg.orig/src/tcp_listener.cpp0000644000175000017500000002044412240736636017736 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "platform.hpp" #include "tcp_listener.hpp" #include "stream_engine.hpp" #include "io_thread.hpp" #include "session_base.hpp" #include "config.hpp" #include "err.hpp" #include "ip.hpp" #include "tcp.hpp" #include "socket_base.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #include #include #include #endif #ifdef ZMQ_HAVE_OPENVMS #include #endif zmq::tcp_listener_t::tcp_listener_t (io_thread_t *io_thread_, socket_base_t *socket_, const options_t &options_) : own_t (io_thread_, options_), io_object_t (io_thread_), s (retired_fd), socket (socket_) { } zmq::tcp_listener_t::~tcp_listener_t () { zmq_assert (s == retired_fd); } void zmq::tcp_listener_t::process_plug () { // Start polling for incoming connections. handle = add_fd (s); set_pollin (handle); } void zmq::tcp_listener_t::process_term (int linger_) { rm_fd (handle); close (); own_t::process_term (linger_); } void zmq::tcp_listener_t::in_event () { fd_t fd = accept (); // If connection was reset by the peer in the meantime, just ignore it. // TODO: Handle specific errors like ENFILE/EMFILE etc. if (fd == retired_fd) { socket->event_accept_failed (endpoint, zmq_errno()); return; } tune_tcp_socket (fd); tune_tcp_keepalives (fd, options.tcp_keepalive, options.tcp_keepalive_cnt, options.tcp_keepalive_idle, options.tcp_keepalive_intvl); // Create the engine object for this connection. stream_engine_t *engine = new (std::nothrow) stream_engine_t (fd, options, endpoint); alloc_assert (engine); // Choose I/O thread to run connecter in. Given that we are already // running in an I/O thread, there must be at least one available. io_thread_t *io_thread = choose_io_thread (options.affinity); zmq_assert (io_thread); // Create and launch a session object. session_base_t *session = session_base_t::create (io_thread, false, socket, options, NULL); errno_assert (session); session->inc_seqnum (); launch_child (session); send_attach (session, engine, false); socket->event_accepted (endpoint, fd); } void zmq::tcp_listener_t::close () { zmq_assert (s != retired_fd); #ifdef ZMQ_HAVE_WINDOWS int rc = closesocket (s); wsa_assert (rc != SOCKET_ERROR); #else int rc = ::close (s); errno_assert (rc == 0); #endif socket->event_closed (endpoint, s); s = retired_fd; } int zmq::tcp_listener_t::get_address (std::string &addr_) { // Get the details of the TCP socket struct sockaddr_storage ss; #ifdef ZMQ_HAVE_HPUX int sl = sizeof (ss); #else socklen_t sl = sizeof (ss); #endif int rc = getsockname (s, (struct sockaddr *) &ss, &sl); if (rc != 0) { addr_.clear (); return rc; } tcp_address_t addr ((struct sockaddr *) &ss, sl); return addr.to_string (addr_); } int zmq::tcp_listener_t::set_address (const char *addr_) { // Convert the textual address into address structure. int rc = address.resolve (addr_, true, options.ipv6); if (rc != 0) return -1; // Create a listening socket. s = open_socket (address.family (), SOCK_STREAM, IPPROTO_TCP); #ifdef ZMQ_HAVE_WINDOWS if (s == INVALID_SOCKET) errno = wsa_error_to_errno (WSAGetLastError ()); #endif // IPv6 address family not supported, try automatic downgrade to IPv4. if (address.family () == AF_INET6 && errno == EAFNOSUPPORT && options.ipv6) { rc = address.resolve (addr_, true, true); if (rc != 0) return rc; s = ::socket (address.family (), SOCK_STREAM, IPPROTO_TCP); } #ifdef ZMQ_HAVE_WINDOWS if (s == INVALID_SOCKET) { errno = wsa_error_to_errno (WSAGetLastError ()); return -1; } #if !defined _WIN32_WCE // On Windows, preventing sockets to be inherited by child processes. BOOL brc = SetHandleInformation ((HANDLE) s, HANDLE_FLAG_INHERIT, 0); win_assert (brc); #endif #else if (s == -1) return -1; #endif // On some systems, IPv4 mapping in IPv6 sockets is disabled by default. // Switch it on in such cases. if (address.family () == AF_INET6) enable_ipv4_mapping (s); // Set the socket buffer limits for the underlying socket. if (options.sndbuf != 0) set_tcp_send_buffer (s, options.sndbuf); if (options.rcvbuf != 0) set_tcp_receive_buffer (s, options.rcvbuf); // Allow reusing of the address. int flag = 1; #ifdef ZMQ_HAVE_WINDOWS rc = setsockopt (s, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (const char*) &flag, sizeof (int)); wsa_assert (rc != SOCKET_ERROR); #else rc = setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof (int)); errno_assert (rc == 0); #endif address.to_string (endpoint); // Bind the socket to the network interface and port. rc = bind (s, address.addr (), address.addrlen ()); #ifdef ZMQ_HAVE_WINDOWS if (rc == SOCKET_ERROR) { errno = wsa_error_to_errno (WSAGetLastError ()); goto error; } #else if (rc != 0) goto error; #endif // Listen for incomming connections. rc = listen (s, options.backlog); #ifdef ZMQ_HAVE_WINDOWS if (rc == SOCKET_ERROR) { errno = wsa_error_to_errno (WSAGetLastError ()); goto error; } #else if (rc != 0) goto error; #endif socket->event_listening (endpoint, s); return 0; error: int err = errno; close (); errno = err; return -1; } zmq::fd_t zmq::tcp_listener_t::accept () { // The situation where connection cannot be accepted due to insufficient // resources is considered valid and treated by ignoring the connection. // Accept one connection and deal with different failure modes. zmq_assert (s != retired_fd); struct sockaddr_storage ss; memset (&ss, 0, sizeof (ss)); #ifdef ZMQ_HAVE_HPUX int ss_len = sizeof (ss); #else socklen_t ss_len = sizeof (ss); #endif fd_t sock = ::accept (s, (struct sockaddr *) &ss, &ss_len); #ifdef ZMQ_HAVE_WINDOWS if (sock == INVALID_SOCKET) { wsa_assert (WSAGetLastError () == WSAEWOULDBLOCK || WSAGetLastError () == WSAECONNRESET || WSAGetLastError () == WSAEMFILE || WSAGetLastError () == WSAENOBUFS); return retired_fd; } #if !defined _WIN32_WCE // On Windows, preventing sockets to be inherited by child processes. BOOL brc = SetHandleInformation ((HANDLE) sock, HANDLE_FLAG_INHERIT, 0); win_assert (brc); #endif #else if (sock == -1) { errno_assert (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR || errno == ECONNABORTED || errno == EPROTO || errno == ENOBUFS || errno == ENOMEM || errno == EMFILE || errno == ENFILE); return retired_fd; } #endif if (!options.tcp_accept_filters.empty ()) { bool matched = false; for (options_t::tcp_accept_filters_t::size_type i = 0; i != options.tcp_accept_filters.size (); ++i) { if (options.tcp_accept_filters[i].match_address ((struct sockaddr *) &ss, ss_len)) { matched = true; break; } } if (!matched) { #ifdef ZMQ_HAVE_WINDOWS int rc = closesocket (sock); wsa_assert (rc != SOCKET_ERROR); #else int rc = ::close (sock); errno_assert (rc == 0); #endif return retired_fd; } } return sock; } zeromq3-4.0.4+dfsg.orig/src/dbuffer.hpp0000644000175000017500000000655212240736636016671 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_DBUFFER_HPP_INCLUDED__ #define __ZMQ_DBUFFER_HPP_INCLUDED__ #include #include #include #include "mutex.hpp" #include "msg.hpp" namespace zmq { // dbuffer is a single-producer single-consumer double-buffer // implementation. // // The producer writes to a back buffer and then tries to swap // pointers between the back and front buffers. If it fails, // due to the consumer reading from the front buffer, it just // gives up, which is ok since writes are many and redundant. // // The reader simply reads from the front buffer. // // has_msg keeps track of whether there has been a not yet read // value written, it is used by ypipe_conflate to mimic ypipe // functionality regarding a reader being asleep template class dbuffer_t; template <> class dbuffer_t { public: inline dbuffer_t () : back (&storage[0]) , front (&storage[1]) , has_msg (false) { back->init (); front->init (); } inline ~dbuffer_t() { back->close (); front->close (); } inline void write (const msg_t &value_) { msg_t& xvalue = const_cast(value_); zmq_assert (xvalue.check ()); back->move (xvalue); // cannot just overwrite, might leak zmq_assert (back->check ()); if (sync.try_lock ()) { std::swap (back, front); has_msg = true; sync.unlock (); } } inline bool read (msg_t *value_) { if (!value_) return false; { scoped_lock_t lock (sync); if (!has_msg) return false; zmq_assert (front->check ()); *value_ = *front; front->init (); // avoid double free has_msg = false; return true; } } inline bool check_read () { scoped_lock_t lock (sync); return has_msg; } inline bool probe (bool (*fn)(msg_t &)) { scoped_lock_t lock (sync); return (*fn) (*front); } private: msg_t storage[2]; msg_t *back, *front; mutex_t sync; bool has_msg; // Disable copying of dbuffer. dbuffer_t (const dbuffer_t&); const dbuffer_t &operator = (const dbuffer_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/Makefile.in0000644000175000017500000031371512307430721016600 0ustar ghedoghedo# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/libzmq.pc.in \ $(srcdir)/platform.hpp.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = platform.hpp CONFIG_CLEAN_FILES = libzmq.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) @BUILD_PGM_TRUE@libzmq_la_DEPENDENCIES = \ @BUILD_PGM_TRUE@ $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la am_libzmq_la_OBJECTS = libzmq_la-address.lo libzmq_la-clock.lo \ libzmq_la-ctx.lo libzmq_la-curve_client.lo \ libzmq_la-curve_server.lo libzmq_la-devpoll.lo \ libzmq_la-dist.lo libzmq_la-epoll.lo libzmq_la-err.lo \ libzmq_la-fq.lo libzmq_la-io_object.lo libzmq_la-io_thread.lo \ libzmq_la-ip.lo libzmq_la-ipc_address.lo \ libzmq_la-ipc_connecter.lo libzmq_la-ipc_listener.lo \ libzmq_la-kqueue.lo libzmq_la-lb.lo libzmq_la-mailbox.lo \ libzmq_la-mechanism.lo libzmq_la-msg.lo libzmq_la-mtrie.lo \ libzmq_la-null_mechanism.lo libzmq_la-object.lo \ libzmq_la-options.lo libzmq_la-own.lo libzmq_la-pair.lo \ libzmq_la-pgm_receiver.lo libzmq_la-pgm_sender.lo \ libzmq_la-pgm_socket.lo libzmq_la-pipe.lo \ libzmq_la-plain_mechanism.lo libzmq_la-poll.lo \ libzmq_la-poller_base.lo libzmq_la-pull.lo libzmq_la-push.lo \ libzmq_la-proxy.lo libzmq_la-reaper.lo libzmq_la-pub.lo \ libzmq_la-random.lo libzmq_la-rep.lo libzmq_la-req.lo \ libzmq_la-select.lo libzmq_la-session_base.lo \ libzmq_la-signaler.lo libzmq_la-socket_base.lo \ libzmq_la-stream.lo libzmq_la-stream_engine.lo \ libzmq_la-sub.lo libzmq_la-tcp.lo libzmq_la-tcp_address.lo \ libzmq_la-tcp_connecter.lo libzmq_la-tcp_listener.lo \ libzmq_la-thread.lo libzmq_la-trie.lo libzmq_la-xpub.lo \ libzmq_la-router.lo libzmq_la-dealer.lo \ libzmq_la-v1_decoder.lo libzmq_la-v1_encoder.lo \ libzmq_la-v2_decoder.lo libzmq_la-v2_encoder.lo \ libzmq_la-xsub.lo libzmq_la-zmq.lo libzmq_la-zmq_utils.lo \ libzmq_la-raw_decoder.lo libzmq_la-raw_encoder.lo libzmq_la_OBJECTS = $(am_libzmq_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libzmq_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libzmq_la_CXXFLAGS) \ $(CXXFLAGS) $(libzmq_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libzmq_la_SOURCES) DIST_SOURCES = $(libzmq_la_SOURCES) DATA = $(pkgconfig_DATA) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libzmq.la pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libzmq.pc include_HEADERS = ../include/zmq.h ../include/zmq_utils.h libzmq_la_SOURCES = \ address.hpp \ array.hpp \ atomic_counter.hpp \ atomic_ptr.hpp \ blob.hpp \ clock.hpp \ command.hpp \ config.hpp \ ctx.hpp \ curve_client.hpp \ curve_server.hpp \ decoder.hpp \ devpoll.hpp \ dist.hpp \ encoder.hpp \ epoll.hpp \ err.hpp \ fd.hpp \ fq.hpp \ i_encoder.hpp \ i_decoder.hpp \ i_engine.hpp \ i_poll_events.hpp \ io_object.hpp \ io_thread.hpp \ ip.hpp \ ipc_address.hpp \ ipc_connecter.hpp \ ipc_listener.hpp \ i_engine.hpp \ i_poll_events.hpp \ kqueue.hpp \ lb.hpp \ likely.hpp \ mailbox.hpp \ mechanism.hpp \ msg.hpp \ mtrie.hpp \ mutex.hpp \ null_mechanism.hpp \ object.hpp \ options.hpp \ own.hpp \ pgm_receiver.hpp \ pgm_sender.hpp \ pgm_socket.hpp \ pipe.hpp \ plain_mechanism.hpp \ platform.hpp \ poll.hpp \ poller.hpp \ poller_base.hpp \ pair.hpp \ proxy.hpp \ pub.hpp \ pull.hpp \ push.hpp \ random.hpp \ reaper.hpp \ rep.hpp \ req.hpp \ select.hpp \ session_base.hpp \ signaler.hpp \ socket_base.hpp \ stdint.hpp \ stream.hpp \ stream_engine.hpp \ sub.hpp \ tcp.hpp \ tcp_address.hpp \ tcp_connecter.hpp \ tcp_listener.hpp \ thread.hpp \ trie.hpp \ windows.hpp \ wire.hpp \ xpub.hpp \ router.hpp \ dealer.hpp \ xsub.hpp \ ypipe.hpp \ ypipe_base.hpp \ yqueue.hpp \ address.cpp \ clock.cpp \ ctx.cpp \ curve_client.cpp \ curve_server.cpp \ devpoll.cpp \ dist.cpp \ epoll.cpp \ err.cpp \ fq.cpp \ io_object.cpp \ io_thread.cpp \ ip.cpp \ ipc_address.cpp \ ipc_connecter.cpp \ ipc_listener.cpp \ kqueue.cpp \ lb.cpp \ mailbox.cpp \ mechanism.cpp \ msg.cpp \ mtrie.cpp \ null_mechanism.cpp \ object.cpp \ options.cpp \ own.cpp \ pair.cpp \ pgm_receiver.cpp \ pgm_sender.cpp \ pgm_socket.cpp \ pipe.cpp \ plain_mechanism.cpp \ poll.cpp \ poller_base.cpp \ pull.cpp \ push.cpp \ proxy.cpp \ reaper.cpp \ pub.cpp \ random.cpp \ rep.cpp \ req.cpp \ select.cpp \ session_base.cpp \ signaler.cpp \ socket_base.cpp \ stream.cpp \ stream_engine.cpp \ sub.cpp \ tcp.cpp \ tcp_address.cpp \ tcp_connecter.cpp \ tcp_listener.cpp \ thread.cpp \ trie.cpp \ xpub.cpp \ router.cpp \ dealer.cpp \ v1_decoder.cpp \ v1_encoder.cpp \ v1_decoder.hpp \ v1_encoder.hpp \ v2_decoder.cpp \ v2_decoder.hpp \ v2_encoder.cpp \ v2_encoder.hpp \ v2_protocol.hpp \ xsub.cpp \ zmq.cpp \ zmq_utils.cpp \ raw_decoder.hpp \ raw_decoder.cpp \ raw_encoder.hpp \ raw_encoder.cpp \ ypipe_conflate.hpp \ dbuffer.hpp @ON_ANDROID_FALSE@@ON_LINUX_FALSE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl @ON_ANDROID_FALSE@@ON_LINUX_TRUE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl,--version-script=$(srcdir)/libzmq.vers @ON_ANDROID_TRUE@@ON_MINGW_FALSE@libzmq_la_LDFLAGS = -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ @ON_MINGW_TRUE@libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ EXTRA_DIST = libzmq.vers libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ @BUILD_PGM_TRUE@libzmq_la_CPPFLAGS = -I$(top_srcdir)/@pgm_srcdir@/include/ @BUILD_PGM_TRUE@libzmq_la_LIBADD = $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la all: platform.hpp $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): platform.hpp: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/platform.hpp.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/platform.hpp $(srcdir)/platform.hpp.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f platform.hpp stamp-h1 libzmq.pc: $(top_builddir)/config.status $(srcdir)/libzmq.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libzmq.la: $(libzmq_la_OBJECTS) $(libzmq_la_DEPENDENCIES) $(EXTRA_libzmq_la_DEPENDENCIES) $(AM_V_CXXLD)$(libzmq_la_LINK) -rpath $(libdir) $(libzmq_la_OBJECTS) $(libzmq_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-clock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-ctx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-curve_client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-curve_server.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-dealer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-devpoll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-dist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-epoll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-err.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-fq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-io_object.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-io_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-ip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-ipc_address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-ipc_connecter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-ipc_listener.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-kqueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-lb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-mailbox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-mechanism.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-msg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-mtrie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-null_mechanism.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-object.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-own.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pair.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm_receiver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm_sender.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm_socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pipe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-plain_mechanism.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-poll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-poller_base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-proxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pull.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-push.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-raw_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-raw_encoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-reaper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-rep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-req.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-router.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-session_base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-signaler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-socket_base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-stream_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-sub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp_address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp_connecter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp_listener.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-trie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-v1_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-v1_encoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-v2_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-v2_encoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xpub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xsub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_utils.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< libzmq_la-address.lo: address.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-address.lo -MD -MP -MF $(DEPDIR)/libzmq_la-address.Tpo -c -o libzmq_la-address.lo `test -f 'address.cpp' || echo '$(srcdir)/'`address.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-address.Tpo $(DEPDIR)/libzmq_la-address.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='address.cpp' object='libzmq_la-address.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-address.lo `test -f 'address.cpp' || echo '$(srcdir)/'`address.cpp libzmq_la-clock.lo: clock.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-clock.lo -MD -MP -MF $(DEPDIR)/libzmq_la-clock.Tpo -c -o libzmq_la-clock.lo `test -f 'clock.cpp' || echo '$(srcdir)/'`clock.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-clock.Tpo $(DEPDIR)/libzmq_la-clock.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clock.cpp' object='libzmq_la-clock.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-clock.lo `test -f 'clock.cpp' || echo '$(srcdir)/'`clock.cpp libzmq_la-ctx.lo: ctx.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ctx.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ctx.Tpo -c -o libzmq_la-ctx.lo `test -f 'ctx.cpp' || echo '$(srcdir)/'`ctx.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-ctx.Tpo $(DEPDIR)/libzmq_la-ctx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ctx.cpp' object='libzmq_la-ctx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ctx.lo `test -f 'ctx.cpp' || echo '$(srcdir)/'`ctx.cpp libzmq_la-curve_client.lo: curve_client.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-curve_client.lo -MD -MP -MF $(DEPDIR)/libzmq_la-curve_client.Tpo -c -o libzmq_la-curve_client.lo `test -f 'curve_client.cpp' || echo '$(srcdir)/'`curve_client.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-curve_client.Tpo $(DEPDIR)/libzmq_la-curve_client.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='curve_client.cpp' object='libzmq_la-curve_client.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-curve_client.lo `test -f 'curve_client.cpp' || echo '$(srcdir)/'`curve_client.cpp libzmq_la-curve_server.lo: curve_server.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-curve_server.lo -MD -MP -MF $(DEPDIR)/libzmq_la-curve_server.Tpo -c -o libzmq_la-curve_server.lo `test -f 'curve_server.cpp' || echo '$(srcdir)/'`curve_server.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-curve_server.Tpo $(DEPDIR)/libzmq_la-curve_server.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='curve_server.cpp' object='libzmq_la-curve_server.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-curve_server.lo `test -f 'curve_server.cpp' || echo '$(srcdir)/'`curve_server.cpp libzmq_la-devpoll.lo: devpoll.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-devpoll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-devpoll.Tpo -c -o libzmq_la-devpoll.lo `test -f 'devpoll.cpp' || echo '$(srcdir)/'`devpoll.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-devpoll.Tpo $(DEPDIR)/libzmq_la-devpoll.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='devpoll.cpp' object='libzmq_la-devpoll.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-devpoll.lo `test -f 'devpoll.cpp' || echo '$(srcdir)/'`devpoll.cpp libzmq_la-dist.lo: dist.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-dist.lo -MD -MP -MF $(DEPDIR)/libzmq_la-dist.Tpo -c -o libzmq_la-dist.lo `test -f 'dist.cpp' || echo '$(srcdir)/'`dist.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-dist.Tpo $(DEPDIR)/libzmq_la-dist.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dist.cpp' object='libzmq_la-dist.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-dist.lo `test -f 'dist.cpp' || echo '$(srcdir)/'`dist.cpp libzmq_la-epoll.lo: epoll.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-epoll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-epoll.Tpo -c -o libzmq_la-epoll.lo `test -f 'epoll.cpp' || echo '$(srcdir)/'`epoll.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-epoll.Tpo $(DEPDIR)/libzmq_la-epoll.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='epoll.cpp' object='libzmq_la-epoll.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-epoll.lo `test -f 'epoll.cpp' || echo '$(srcdir)/'`epoll.cpp libzmq_la-err.lo: err.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-err.lo -MD -MP -MF $(DEPDIR)/libzmq_la-err.Tpo -c -o libzmq_la-err.lo `test -f 'err.cpp' || echo '$(srcdir)/'`err.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-err.Tpo $(DEPDIR)/libzmq_la-err.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='err.cpp' object='libzmq_la-err.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-err.lo `test -f 'err.cpp' || echo '$(srcdir)/'`err.cpp libzmq_la-fq.lo: fq.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-fq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-fq.Tpo -c -o libzmq_la-fq.lo `test -f 'fq.cpp' || echo '$(srcdir)/'`fq.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-fq.Tpo $(DEPDIR)/libzmq_la-fq.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fq.cpp' object='libzmq_la-fq.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-fq.lo `test -f 'fq.cpp' || echo '$(srcdir)/'`fq.cpp libzmq_la-io_object.lo: io_object.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-io_object.lo -MD -MP -MF $(DEPDIR)/libzmq_la-io_object.Tpo -c -o libzmq_la-io_object.lo `test -f 'io_object.cpp' || echo '$(srcdir)/'`io_object.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-io_object.Tpo $(DEPDIR)/libzmq_la-io_object.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='io_object.cpp' object='libzmq_la-io_object.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-io_object.lo `test -f 'io_object.cpp' || echo '$(srcdir)/'`io_object.cpp libzmq_la-io_thread.lo: io_thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-io_thread.lo -MD -MP -MF $(DEPDIR)/libzmq_la-io_thread.Tpo -c -o libzmq_la-io_thread.lo `test -f 'io_thread.cpp' || echo '$(srcdir)/'`io_thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-io_thread.Tpo $(DEPDIR)/libzmq_la-io_thread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='io_thread.cpp' object='libzmq_la-io_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-io_thread.lo `test -f 'io_thread.cpp' || echo '$(srcdir)/'`io_thread.cpp libzmq_la-ip.lo: ip.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ip.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ip.Tpo -c -o libzmq_la-ip.lo `test -f 'ip.cpp' || echo '$(srcdir)/'`ip.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-ip.Tpo $(DEPDIR)/libzmq_la-ip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ip.cpp' object='libzmq_la-ip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ip.lo `test -f 'ip.cpp' || echo '$(srcdir)/'`ip.cpp libzmq_la-ipc_address.lo: ipc_address.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ipc_address.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ipc_address.Tpo -c -o libzmq_la-ipc_address.lo `test -f 'ipc_address.cpp' || echo '$(srcdir)/'`ipc_address.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-ipc_address.Tpo $(DEPDIR)/libzmq_la-ipc_address.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ipc_address.cpp' object='libzmq_la-ipc_address.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ipc_address.lo `test -f 'ipc_address.cpp' || echo '$(srcdir)/'`ipc_address.cpp libzmq_la-ipc_connecter.lo: ipc_connecter.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ipc_connecter.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ipc_connecter.Tpo -c -o libzmq_la-ipc_connecter.lo `test -f 'ipc_connecter.cpp' || echo '$(srcdir)/'`ipc_connecter.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-ipc_connecter.Tpo $(DEPDIR)/libzmq_la-ipc_connecter.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ipc_connecter.cpp' object='libzmq_la-ipc_connecter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ipc_connecter.lo `test -f 'ipc_connecter.cpp' || echo '$(srcdir)/'`ipc_connecter.cpp libzmq_la-ipc_listener.lo: ipc_listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ipc_listener.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ipc_listener.Tpo -c -o libzmq_la-ipc_listener.lo `test -f 'ipc_listener.cpp' || echo '$(srcdir)/'`ipc_listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-ipc_listener.Tpo $(DEPDIR)/libzmq_la-ipc_listener.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ipc_listener.cpp' object='libzmq_la-ipc_listener.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ipc_listener.lo `test -f 'ipc_listener.cpp' || echo '$(srcdir)/'`ipc_listener.cpp libzmq_la-kqueue.lo: kqueue.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-kqueue.lo -MD -MP -MF $(DEPDIR)/libzmq_la-kqueue.Tpo -c -o libzmq_la-kqueue.lo `test -f 'kqueue.cpp' || echo '$(srcdir)/'`kqueue.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-kqueue.Tpo $(DEPDIR)/libzmq_la-kqueue.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='kqueue.cpp' object='libzmq_la-kqueue.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-kqueue.lo `test -f 'kqueue.cpp' || echo '$(srcdir)/'`kqueue.cpp libzmq_la-lb.lo: lb.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-lb.lo -MD -MP -MF $(DEPDIR)/libzmq_la-lb.Tpo -c -o libzmq_la-lb.lo `test -f 'lb.cpp' || echo '$(srcdir)/'`lb.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-lb.Tpo $(DEPDIR)/libzmq_la-lb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='lb.cpp' object='libzmq_la-lb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-lb.lo `test -f 'lb.cpp' || echo '$(srcdir)/'`lb.cpp libzmq_la-mailbox.lo: mailbox.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-mailbox.lo -MD -MP -MF $(DEPDIR)/libzmq_la-mailbox.Tpo -c -o libzmq_la-mailbox.lo `test -f 'mailbox.cpp' || echo '$(srcdir)/'`mailbox.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-mailbox.Tpo $(DEPDIR)/libzmq_la-mailbox.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mailbox.cpp' object='libzmq_la-mailbox.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-mailbox.lo `test -f 'mailbox.cpp' || echo '$(srcdir)/'`mailbox.cpp libzmq_la-mechanism.lo: mechanism.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-mechanism.lo -MD -MP -MF $(DEPDIR)/libzmq_la-mechanism.Tpo -c -o libzmq_la-mechanism.lo `test -f 'mechanism.cpp' || echo '$(srcdir)/'`mechanism.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-mechanism.Tpo $(DEPDIR)/libzmq_la-mechanism.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mechanism.cpp' object='libzmq_la-mechanism.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-mechanism.lo `test -f 'mechanism.cpp' || echo '$(srcdir)/'`mechanism.cpp libzmq_la-msg.lo: msg.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-msg.lo -MD -MP -MF $(DEPDIR)/libzmq_la-msg.Tpo -c -o libzmq_la-msg.lo `test -f 'msg.cpp' || echo '$(srcdir)/'`msg.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-msg.Tpo $(DEPDIR)/libzmq_la-msg.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='msg.cpp' object='libzmq_la-msg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-msg.lo `test -f 'msg.cpp' || echo '$(srcdir)/'`msg.cpp libzmq_la-mtrie.lo: mtrie.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-mtrie.lo -MD -MP -MF $(DEPDIR)/libzmq_la-mtrie.Tpo -c -o libzmq_la-mtrie.lo `test -f 'mtrie.cpp' || echo '$(srcdir)/'`mtrie.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-mtrie.Tpo $(DEPDIR)/libzmq_la-mtrie.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mtrie.cpp' object='libzmq_la-mtrie.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-mtrie.lo `test -f 'mtrie.cpp' || echo '$(srcdir)/'`mtrie.cpp libzmq_la-null_mechanism.lo: null_mechanism.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-null_mechanism.lo -MD -MP -MF $(DEPDIR)/libzmq_la-null_mechanism.Tpo -c -o libzmq_la-null_mechanism.lo `test -f 'null_mechanism.cpp' || echo '$(srcdir)/'`null_mechanism.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-null_mechanism.Tpo $(DEPDIR)/libzmq_la-null_mechanism.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='null_mechanism.cpp' object='libzmq_la-null_mechanism.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-null_mechanism.lo `test -f 'null_mechanism.cpp' || echo '$(srcdir)/'`null_mechanism.cpp libzmq_la-object.lo: object.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-object.lo -MD -MP -MF $(DEPDIR)/libzmq_la-object.Tpo -c -o libzmq_la-object.lo `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-object.Tpo $(DEPDIR)/libzmq_la-object.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='object.cpp' object='libzmq_la-object.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-object.lo `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp libzmq_la-options.lo: options.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-options.lo -MD -MP -MF $(DEPDIR)/libzmq_la-options.Tpo -c -o libzmq_la-options.lo `test -f 'options.cpp' || echo '$(srcdir)/'`options.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-options.Tpo $(DEPDIR)/libzmq_la-options.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='options.cpp' object='libzmq_la-options.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-options.lo `test -f 'options.cpp' || echo '$(srcdir)/'`options.cpp libzmq_la-own.lo: own.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-own.lo -MD -MP -MF $(DEPDIR)/libzmq_la-own.Tpo -c -o libzmq_la-own.lo `test -f 'own.cpp' || echo '$(srcdir)/'`own.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-own.Tpo $(DEPDIR)/libzmq_la-own.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='own.cpp' object='libzmq_la-own.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-own.lo `test -f 'own.cpp' || echo '$(srcdir)/'`own.cpp libzmq_la-pair.lo: pair.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pair.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pair.Tpo -c -o libzmq_la-pair.lo `test -f 'pair.cpp' || echo '$(srcdir)/'`pair.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pair.Tpo $(DEPDIR)/libzmq_la-pair.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pair.cpp' object='libzmq_la-pair.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pair.lo `test -f 'pair.cpp' || echo '$(srcdir)/'`pair.cpp libzmq_la-pgm_receiver.lo: pgm_receiver.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_receiver.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_receiver.Tpo -c -o libzmq_la-pgm_receiver.lo `test -f 'pgm_receiver.cpp' || echo '$(srcdir)/'`pgm_receiver.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pgm_receiver.Tpo $(DEPDIR)/libzmq_la-pgm_receiver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pgm_receiver.cpp' object='libzmq_la-pgm_receiver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_receiver.lo `test -f 'pgm_receiver.cpp' || echo '$(srcdir)/'`pgm_receiver.cpp libzmq_la-pgm_sender.lo: pgm_sender.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_sender.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_sender.Tpo -c -o libzmq_la-pgm_sender.lo `test -f 'pgm_sender.cpp' || echo '$(srcdir)/'`pgm_sender.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pgm_sender.Tpo $(DEPDIR)/libzmq_la-pgm_sender.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pgm_sender.cpp' object='libzmq_la-pgm_sender.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_sender.lo `test -f 'pgm_sender.cpp' || echo '$(srcdir)/'`pgm_sender.cpp libzmq_la-pgm_socket.lo: pgm_socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_socket.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_socket.Tpo -c -o libzmq_la-pgm_socket.lo `test -f 'pgm_socket.cpp' || echo '$(srcdir)/'`pgm_socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pgm_socket.Tpo $(DEPDIR)/libzmq_la-pgm_socket.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pgm_socket.cpp' object='libzmq_la-pgm_socket.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_socket.lo `test -f 'pgm_socket.cpp' || echo '$(srcdir)/'`pgm_socket.cpp libzmq_la-pipe.lo: pipe.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pipe.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pipe.Tpo -c -o libzmq_la-pipe.lo `test -f 'pipe.cpp' || echo '$(srcdir)/'`pipe.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pipe.Tpo $(DEPDIR)/libzmq_la-pipe.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pipe.cpp' object='libzmq_la-pipe.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pipe.lo `test -f 'pipe.cpp' || echo '$(srcdir)/'`pipe.cpp libzmq_la-plain_mechanism.lo: plain_mechanism.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-plain_mechanism.lo -MD -MP -MF $(DEPDIR)/libzmq_la-plain_mechanism.Tpo -c -o libzmq_la-plain_mechanism.lo `test -f 'plain_mechanism.cpp' || echo '$(srcdir)/'`plain_mechanism.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-plain_mechanism.Tpo $(DEPDIR)/libzmq_la-plain_mechanism.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plain_mechanism.cpp' object='libzmq_la-plain_mechanism.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-plain_mechanism.lo `test -f 'plain_mechanism.cpp' || echo '$(srcdir)/'`plain_mechanism.cpp libzmq_la-poll.lo: poll.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-poll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-poll.Tpo -c -o libzmq_la-poll.lo `test -f 'poll.cpp' || echo '$(srcdir)/'`poll.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-poll.Tpo $(DEPDIR)/libzmq_la-poll.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poll.cpp' object='libzmq_la-poll.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-poll.lo `test -f 'poll.cpp' || echo '$(srcdir)/'`poll.cpp libzmq_la-poller_base.lo: poller_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-poller_base.lo -MD -MP -MF $(DEPDIR)/libzmq_la-poller_base.Tpo -c -o libzmq_la-poller_base.lo `test -f 'poller_base.cpp' || echo '$(srcdir)/'`poller_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-poller_base.Tpo $(DEPDIR)/libzmq_la-poller_base.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poller_base.cpp' object='libzmq_la-poller_base.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-poller_base.lo `test -f 'poller_base.cpp' || echo '$(srcdir)/'`poller_base.cpp libzmq_la-pull.lo: pull.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pull.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pull.Tpo -c -o libzmq_la-pull.lo `test -f 'pull.cpp' || echo '$(srcdir)/'`pull.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pull.Tpo $(DEPDIR)/libzmq_la-pull.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pull.cpp' object='libzmq_la-pull.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pull.lo `test -f 'pull.cpp' || echo '$(srcdir)/'`pull.cpp libzmq_la-push.lo: push.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-push.lo -MD -MP -MF $(DEPDIR)/libzmq_la-push.Tpo -c -o libzmq_la-push.lo `test -f 'push.cpp' || echo '$(srcdir)/'`push.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-push.Tpo $(DEPDIR)/libzmq_la-push.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='push.cpp' object='libzmq_la-push.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-push.lo `test -f 'push.cpp' || echo '$(srcdir)/'`push.cpp libzmq_la-proxy.lo: proxy.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-proxy.lo -MD -MP -MF $(DEPDIR)/libzmq_la-proxy.Tpo -c -o libzmq_la-proxy.lo `test -f 'proxy.cpp' || echo '$(srcdir)/'`proxy.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-proxy.Tpo $(DEPDIR)/libzmq_la-proxy.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='proxy.cpp' object='libzmq_la-proxy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-proxy.lo `test -f 'proxy.cpp' || echo '$(srcdir)/'`proxy.cpp libzmq_la-reaper.lo: reaper.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-reaper.lo -MD -MP -MF $(DEPDIR)/libzmq_la-reaper.Tpo -c -o libzmq_la-reaper.lo `test -f 'reaper.cpp' || echo '$(srcdir)/'`reaper.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-reaper.Tpo $(DEPDIR)/libzmq_la-reaper.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='reaper.cpp' object='libzmq_la-reaper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-reaper.lo `test -f 'reaper.cpp' || echo '$(srcdir)/'`reaper.cpp libzmq_la-pub.lo: pub.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pub.Tpo -c -o libzmq_la-pub.lo `test -f 'pub.cpp' || echo '$(srcdir)/'`pub.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pub.Tpo $(DEPDIR)/libzmq_la-pub.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pub.cpp' object='libzmq_la-pub.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pub.lo `test -f 'pub.cpp' || echo '$(srcdir)/'`pub.cpp libzmq_la-random.lo: random.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-random.lo -MD -MP -MF $(DEPDIR)/libzmq_la-random.Tpo -c -o libzmq_la-random.lo `test -f 'random.cpp' || echo '$(srcdir)/'`random.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-random.Tpo $(DEPDIR)/libzmq_la-random.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='random.cpp' object='libzmq_la-random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-random.lo `test -f 'random.cpp' || echo '$(srcdir)/'`random.cpp libzmq_la-rep.lo: rep.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-rep.lo -MD -MP -MF $(DEPDIR)/libzmq_la-rep.Tpo -c -o libzmq_la-rep.lo `test -f 'rep.cpp' || echo '$(srcdir)/'`rep.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-rep.Tpo $(DEPDIR)/libzmq_la-rep.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rep.cpp' object='libzmq_la-rep.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-rep.lo `test -f 'rep.cpp' || echo '$(srcdir)/'`rep.cpp libzmq_la-req.lo: req.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-req.lo -MD -MP -MF $(DEPDIR)/libzmq_la-req.Tpo -c -o libzmq_la-req.lo `test -f 'req.cpp' || echo '$(srcdir)/'`req.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-req.Tpo $(DEPDIR)/libzmq_la-req.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='req.cpp' object='libzmq_la-req.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-req.lo `test -f 'req.cpp' || echo '$(srcdir)/'`req.cpp libzmq_la-select.lo: select.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-select.lo -MD -MP -MF $(DEPDIR)/libzmq_la-select.Tpo -c -o libzmq_la-select.lo `test -f 'select.cpp' || echo '$(srcdir)/'`select.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-select.Tpo $(DEPDIR)/libzmq_la-select.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='select.cpp' object='libzmq_la-select.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-select.lo `test -f 'select.cpp' || echo '$(srcdir)/'`select.cpp libzmq_la-session_base.lo: session_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-session_base.lo -MD -MP -MF $(DEPDIR)/libzmq_la-session_base.Tpo -c -o libzmq_la-session_base.lo `test -f 'session_base.cpp' || echo '$(srcdir)/'`session_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-session_base.Tpo $(DEPDIR)/libzmq_la-session_base.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='session_base.cpp' object='libzmq_la-session_base.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-session_base.lo `test -f 'session_base.cpp' || echo '$(srcdir)/'`session_base.cpp libzmq_la-signaler.lo: signaler.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-signaler.lo -MD -MP -MF $(DEPDIR)/libzmq_la-signaler.Tpo -c -o libzmq_la-signaler.lo `test -f 'signaler.cpp' || echo '$(srcdir)/'`signaler.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-signaler.Tpo $(DEPDIR)/libzmq_la-signaler.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='signaler.cpp' object='libzmq_la-signaler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-signaler.lo `test -f 'signaler.cpp' || echo '$(srcdir)/'`signaler.cpp libzmq_la-socket_base.lo: socket_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-socket_base.lo -MD -MP -MF $(DEPDIR)/libzmq_la-socket_base.Tpo -c -o libzmq_la-socket_base.lo `test -f 'socket_base.cpp' || echo '$(srcdir)/'`socket_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-socket_base.Tpo $(DEPDIR)/libzmq_la-socket_base.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='socket_base.cpp' object='libzmq_la-socket_base.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-socket_base.lo `test -f 'socket_base.cpp' || echo '$(srcdir)/'`socket_base.cpp libzmq_la-stream.lo: stream.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-stream.lo -MD -MP -MF $(DEPDIR)/libzmq_la-stream.Tpo -c -o libzmq_la-stream.lo `test -f 'stream.cpp' || echo '$(srcdir)/'`stream.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-stream.Tpo $(DEPDIR)/libzmq_la-stream.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stream.cpp' object='libzmq_la-stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-stream.lo `test -f 'stream.cpp' || echo '$(srcdir)/'`stream.cpp libzmq_la-stream_engine.lo: stream_engine.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-stream_engine.lo -MD -MP -MF $(DEPDIR)/libzmq_la-stream_engine.Tpo -c -o libzmq_la-stream_engine.lo `test -f 'stream_engine.cpp' || echo '$(srcdir)/'`stream_engine.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-stream_engine.Tpo $(DEPDIR)/libzmq_la-stream_engine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stream_engine.cpp' object='libzmq_la-stream_engine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-stream_engine.lo `test -f 'stream_engine.cpp' || echo '$(srcdir)/'`stream_engine.cpp libzmq_la-sub.lo: sub.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-sub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-sub.Tpo -c -o libzmq_la-sub.lo `test -f 'sub.cpp' || echo '$(srcdir)/'`sub.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-sub.Tpo $(DEPDIR)/libzmq_la-sub.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sub.cpp' object='libzmq_la-sub.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-sub.lo `test -f 'sub.cpp' || echo '$(srcdir)/'`sub.cpp libzmq_la-tcp.lo: tcp.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp.Tpo -c -o libzmq_la-tcp.lo `test -f 'tcp.cpp' || echo '$(srcdir)/'`tcp.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp.Tpo $(DEPDIR)/libzmq_la-tcp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tcp.cpp' object='libzmq_la-tcp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp.lo `test -f 'tcp.cpp' || echo '$(srcdir)/'`tcp.cpp libzmq_la-tcp_address.lo: tcp_address.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_address.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_address.Tpo -c -o libzmq_la-tcp_address.lo `test -f 'tcp_address.cpp' || echo '$(srcdir)/'`tcp_address.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp_address.Tpo $(DEPDIR)/libzmq_la-tcp_address.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tcp_address.cpp' object='libzmq_la-tcp_address.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_address.lo `test -f 'tcp_address.cpp' || echo '$(srcdir)/'`tcp_address.cpp libzmq_la-tcp_connecter.lo: tcp_connecter.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_connecter.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_connecter.Tpo -c -o libzmq_la-tcp_connecter.lo `test -f 'tcp_connecter.cpp' || echo '$(srcdir)/'`tcp_connecter.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp_connecter.Tpo $(DEPDIR)/libzmq_la-tcp_connecter.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tcp_connecter.cpp' object='libzmq_la-tcp_connecter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_connecter.lo `test -f 'tcp_connecter.cpp' || echo '$(srcdir)/'`tcp_connecter.cpp libzmq_la-tcp_listener.lo: tcp_listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_listener.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_listener.Tpo -c -o libzmq_la-tcp_listener.lo `test -f 'tcp_listener.cpp' || echo '$(srcdir)/'`tcp_listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp_listener.Tpo $(DEPDIR)/libzmq_la-tcp_listener.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tcp_listener.cpp' object='libzmq_la-tcp_listener.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_listener.lo `test -f 'tcp_listener.cpp' || echo '$(srcdir)/'`tcp_listener.cpp libzmq_la-thread.lo: thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-thread.lo -MD -MP -MF $(DEPDIR)/libzmq_la-thread.Tpo -c -o libzmq_la-thread.lo `test -f 'thread.cpp' || echo '$(srcdir)/'`thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-thread.Tpo $(DEPDIR)/libzmq_la-thread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='thread.cpp' object='libzmq_la-thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-thread.lo `test -f 'thread.cpp' || echo '$(srcdir)/'`thread.cpp libzmq_la-trie.lo: trie.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-trie.lo -MD -MP -MF $(DEPDIR)/libzmq_la-trie.Tpo -c -o libzmq_la-trie.lo `test -f 'trie.cpp' || echo '$(srcdir)/'`trie.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-trie.Tpo $(DEPDIR)/libzmq_la-trie.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='trie.cpp' object='libzmq_la-trie.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-trie.lo `test -f 'trie.cpp' || echo '$(srcdir)/'`trie.cpp libzmq_la-xpub.lo: xpub.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xpub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xpub.Tpo -c -o libzmq_la-xpub.lo `test -f 'xpub.cpp' || echo '$(srcdir)/'`xpub.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xpub.Tpo $(DEPDIR)/libzmq_la-xpub.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xpub.cpp' object='libzmq_la-xpub.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xpub.lo `test -f 'xpub.cpp' || echo '$(srcdir)/'`xpub.cpp libzmq_la-router.lo: router.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-router.lo -MD -MP -MF $(DEPDIR)/libzmq_la-router.Tpo -c -o libzmq_la-router.lo `test -f 'router.cpp' || echo '$(srcdir)/'`router.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-router.Tpo $(DEPDIR)/libzmq_la-router.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='router.cpp' object='libzmq_la-router.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-router.lo `test -f 'router.cpp' || echo '$(srcdir)/'`router.cpp libzmq_la-dealer.lo: dealer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-dealer.lo -MD -MP -MF $(DEPDIR)/libzmq_la-dealer.Tpo -c -o libzmq_la-dealer.lo `test -f 'dealer.cpp' || echo '$(srcdir)/'`dealer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-dealer.Tpo $(DEPDIR)/libzmq_la-dealer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dealer.cpp' object='libzmq_la-dealer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-dealer.lo `test -f 'dealer.cpp' || echo '$(srcdir)/'`dealer.cpp libzmq_la-v1_decoder.lo: v1_decoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-v1_decoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-v1_decoder.Tpo -c -o libzmq_la-v1_decoder.lo `test -f 'v1_decoder.cpp' || echo '$(srcdir)/'`v1_decoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-v1_decoder.Tpo $(DEPDIR)/libzmq_la-v1_decoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='v1_decoder.cpp' object='libzmq_la-v1_decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-v1_decoder.lo `test -f 'v1_decoder.cpp' || echo '$(srcdir)/'`v1_decoder.cpp libzmq_la-v1_encoder.lo: v1_encoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-v1_encoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-v1_encoder.Tpo -c -o libzmq_la-v1_encoder.lo `test -f 'v1_encoder.cpp' || echo '$(srcdir)/'`v1_encoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-v1_encoder.Tpo $(DEPDIR)/libzmq_la-v1_encoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='v1_encoder.cpp' object='libzmq_la-v1_encoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-v1_encoder.lo `test -f 'v1_encoder.cpp' || echo '$(srcdir)/'`v1_encoder.cpp libzmq_la-v2_decoder.lo: v2_decoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-v2_decoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-v2_decoder.Tpo -c -o libzmq_la-v2_decoder.lo `test -f 'v2_decoder.cpp' || echo '$(srcdir)/'`v2_decoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-v2_decoder.Tpo $(DEPDIR)/libzmq_la-v2_decoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='v2_decoder.cpp' object='libzmq_la-v2_decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-v2_decoder.lo `test -f 'v2_decoder.cpp' || echo '$(srcdir)/'`v2_decoder.cpp libzmq_la-v2_encoder.lo: v2_encoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-v2_encoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-v2_encoder.Tpo -c -o libzmq_la-v2_encoder.lo `test -f 'v2_encoder.cpp' || echo '$(srcdir)/'`v2_encoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-v2_encoder.Tpo $(DEPDIR)/libzmq_la-v2_encoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='v2_encoder.cpp' object='libzmq_la-v2_encoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-v2_encoder.lo `test -f 'v2_encoder.cpp' || echo '$(srcdir)/'`v2_encoder.cpp libzmq_la-xsub.lo: xsub.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xsub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xsub.Tpo -c -o libzmq_la-xsub.lo `test -f 'xsub.cpp' || echo '$(srcdir)/'`xsub.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xsub.Tpo $(DEPDIR)/libzmq_la-xsub.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xsub.cpp' object='libzmq_la-xsub.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xsub.lo `test -f 'xsub.cpp' || echo '$(srcdir)/'`xsub.cpp libzmq_la-zmq.lo: zmq.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq.Tpo -c -o libzmq_la-zmq.lo `test -f 'zmq.cpp' || echo '$(srcdir)/'`zmq.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq.Tpo $(DEPDIR)/libzmq_la-zmq.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='zmq.cpp' object='libzmq_la-zmq.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq.lo `test -f 'zmq.cpp' || echo '$(srcdir)/'`zmq.cpp libzmq_la-zmq_utils.lo: zmq_utils.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_utils.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_utils.Tpo -c -o libzmq_la-zmq_utils.lo `test -f 'zmq_utils.cpp' || echo '$(srcdir)/'`zmq_utils.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq_utils.Tpo $(DEPDIR)/libzmq_la-zmq_utils.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='zmq_utils.cpp' object='libzmq_la-zmq_utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_utils.lo `test -f 'zmq_utils.cpp' || echo '$(srcdir)/'`zmq_utils.cpp libzmq_la-raw_decoder.lo: raw_decoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-raw_decoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-raw_decoder.Tpo -c -o libzmq_la-raw_decoder.lo `test -f 'raw_decoder.cpp' || echo '$(srcdir)/'`raw_decoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-raw_decoder.Tpo $(DEPDIR)/libzmq_la-raw_decoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='raw_decoder.cpp' object='libzmq_la-raw_decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-raw_decoder.lo `test -f 'raw_decoder.cpp' || echo '$(srcdir)/'`raw_decoder.cpp libzmq_la-raw_encoder.lo: raw_encoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-raw_encoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-raw_encoder.Tpo -c -o libzmq_la-raw_encoder.lo `test -f 'raw_encoder.cpp' || echo '$(srcdir)/'`raw_encoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-raw_encoder.Tpo $(DEPDIR)/libzmq_la-raw_encoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='raw_encoder.cpp' object='libzmq_la-raw_encoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-raw_encoder.lo `test -f 'raw_encoder.cpp' || echo '$(srcdir)/'`raw_encoder.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) platform.hpp.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) platform.hpp.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) platform.hpp.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) platform.hpp.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) platform.hpp installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags dist-hook distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-pkgconfigDATA dist-hook: -rm $(distdir)/platform.hpp # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq3-4.0.4+dfsg.orig/src/object.cpp0000644000175000017500000002133512240736636016511 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "object.hpp" #include "ctx.hpp" #include "err.hpp" #include "pipe.hpp" #include "io_thread.hpp" #include "session_base.hpp" #include "socket_base.hpp" zmq::object_t::object_t (ctx_t *ctx_, uint32_t tid_) : ctx (ctx_), tid (tid_) { } zmq::object_t::object_t (object_t *parent_) : ctx (parent_->ctx), tid (parent_->tid) { } zmq::object_t::~object_t () { } uint32_t zmq::object_t::get_tid () { return tid; } void zmq::object_t::set_tid(uint32_t id) { tid = id; } zmq::ctx_t *zmq::object_t::get_ctx () { return ctx; } void zmq::object_t::process_command (command_t &cmd_) { switch (cmd_.type) { case command_t::activate_read: process_activate_read (); break; case command_t::activate_write: process_activate_write (cmd_.args.activate_write.msgs_read); break; case command_t::stop: process_stop (); break; case command_t::plug: process_plug (); process_seqnum (); break; case command_t::own: process_own (cmd_.args.own.object); process_seqnum (); break; case command_t::attach: process_attach (cmd_.args.attach.engine); process_seqnum (); break; case command_t::bind: process_bind (cmd_.args.bind.pipe); process_seqnum (); break; case command_t::hiccup: process_hiccup (cmd_.args.hiccup.pipe); break; case command_t::pipe_term: process_pipe_term (); break; case command_t::pipe_term_ack: process_pipe_term_ack (); break; case command_t::term_req: process_term_req (cmd_.args.term_req.object); break; case command_t::term: process_term (cmd_.args.term.linger); break; case command_t::term_ack: process_term_ack (); break; case command_t::reap: process_reap (cmd_.args.reap.socket); break; case command_t::reaped: process_reaped (); break; case command_t::inproc_connected: process_seqnum (); break; case command_t::done: default: zmq_assert (false); } } int zmq::object_t::register_endpoint (const char *addr_, endpoint_t &endpoint_) { return ctx->register_endpoint (addr_, endpoint_); } void zmq::object_t::unregister_endpoints (socket_base_t *socket_) { return ctx->unregister_endpoints (socket_); } zmq::endpoint_t zmq::object_t::find_endpoint (const char *addr_) { return ctx->find_endpoint (addr_); } void zmq::object_t::pend_connection (const char *addr_, pending_connection_t &pending_connection_) { ctx->pend_connection (addr_, pending_connection_); } void zmq::object_t::connect_pending (const char *addr_, zmq::socket_base_t *bind_socket_) { return ctx->connect_pending(addr_, bind_socket_); } void zmq::object_t::destroy_socket (socket_base_t *socket_) { ctx->destroy_socket (socket_); } zmq::io_thread_t *zmq::object_t::choose_io_thread (uint64_t affinity_) { return ctx->choose_io_thread (affinity_); } void zmq::object_t::send_stop () { // 'stop' command goes always from administrative thread to // the current object. command_t cmd; cmd.destination = this; cmd.type = command_t::stop; ctx->send_command (tid, cmd); } void zmq::object_t::send_plug (own_t *destination_, bool inc_seqnum_) { if (inc_seqnum_) destination_->inc_seqnum (); command_t cmd; cmd.destination = destination_; cmd.type = command_t::plug; send_command (cmd); } void zmq::object_t::send_own (own_t *destination_, own_t *object_) { destination_->inc_seqnum (); command_t cmd; cmd.destination = destination_; cmd.type = command_t::own; cmd.args.own.object = object_; send_command (cmd); } void zmq::object_t::send_attach (session_base_t *destination_, i_engine *engine_, bool inc_seqnum_) { if (inc_seqnum_) destination_->inc_seqnum (); command_t cmd; cmd.destination = destination_; cmd.type = command_t::attach; cmd.args.attach.engine = engine_; send_command (cmd); } void zmq::object_t::send_bind (own_t *destination_, pipe_t *pipe_, bool inc_seqnum_) { if (inc_seqnum_) destination_->inc_seqnum (); command_t cmd; cmd.destination = destination_; cmd.type = command_t::bind; cmd.args.bind.pipe = pipe_; send_command (cmd); } void zmq::object_t::send_activate_read (pipe_t *destination_) { command_t cmd; cmd.destination = destination_; cmd.type = command_t::activate_read; send_command (cmd); } void zmq::object_t::send_activate_write (pipe_t *destination_, uint64_t msgs_read_) { command_t cmd; cmd.destination = destination_; cmd.type = command_t::activate_write; cmd.args.activate_write.msgs_read = msgs_read_; send_command (cmd); } void zmq::object_t::send_hiccup (pipe_t *destination_, void *pipe_) { command_t cmd; cmd.destination = destination_; cmd.type = command_t::hiccup; cmd.args.hiccup.pipe = pipe_; send_command (cmd); } void zmq::object_t::send_pipe_term (pipe_t *destination_) { command_t cmd; cmd.destination = destination_; cmd.type = command_t::pipe_term; send_command (cmd); } void zmq::object_t::send_pipe_term_ack (pipe_t *destination_) { command_t cmd; cmd.destination = destination_; cmd.type = command_t::pipe_term_ack; send_command (cmd); } void zmq::object_t::send_term_req (own_t *destination_, own_t *object_) { command_t cmd; cmd.destination = destination_; cmd.type = command_t::term_req; cmd.args.term_req.object = object_; send_command (cmd); } void zmq::object_t::send_term (own_t *destination_, int linger_) { command_t cmd; cmd.destination = destination_; cmd.type = command_t::term; cmd.args.term.linger = linger_; send_command (cmd); } void zmq::object_t::send_term_ack (own_t *destination_) { command_t cmd; cmd.destination = destination_; cmd.type = command_t::term_ack; send_command (cmd); } void zmq::object_t::send_reap (class socket_base_t *socket_) { command_t cmd; cmd.destination = ctx->get_reaper (); cmd.type = command_t::reap; cmd.args.reap.socket = socket_; send_command (cmd); } void zmq::object_t::send_reaped () { command_t cmd; cmd.destination = ctx->get_reaper (); cmd.type = command_t::reaped; send_command (cmd); } void zmq::object_t::send_inproc_connected (zmq::socket_base_t *socket_) { command_t cmd; cmd.destination = socket_; cmd.type = command_t::inproc_connected; send_command (cmd); } void zmq::object_t::send_done () { command_t cmd; cmd.destination = NULL; cmd.type = command_t::done; ctx->send_command (ctx_t::term_tid, cmd); } void zmq::object_t::process_stop () { zmq_assert (false); } void zmq::object_t::process_plug () { zmq_assert (false); } void zmq::object_t::process_own (own_t *) { zmq_assert (false); } void zmq::object_t::process_attach (i_engine *) { zmq_assert (false); } void zmq::object_t::process_bind (pipe_t *) { zmq_assert (false); } void zmq::object_t::process_activate_read () { zmq_assert (false); } void zmq::object_t::process_activate_write (uint64_t) { zmq_assert (false); } void zmq::object_t::process_hiccup (void *) { zmq_assert (false); } void zmq::object_t::process_pipe_term () { zmq_assert (false); } void zmq::object_t::process_pipe_term_ack () { zmq_assert (false); } void zmq::object_t::process_term_req (own_t *) { zmq_assert (false); } void zmq::object_t::process_term (int) { zmq_assert (false); } void zmq::object_t::process_term_ack () { zmq_assert (false); } void zmq::object_t::process_reap (class socket_base_t *) { zmq_assert (false); } void zmq::object_t::process_reaped () { zmq_assert (false); } void zmq::object_t::process_seqnum () { zmq_assert (false); } void zmq::object_t::send_command (command_t &cmd_) { ctx->send_command (cmd_.destination->get_tid (), cmd_); } zeromq3-4.0.4+dfsg.orig/src/tcp.hpp0000644000175000017500000000246712240736636016043 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TCP_HPP_INCLUDED__ #define __ZMQ_TCP_HPP_INCLUDED__ #include "fd.hpp" namespace zmq { // Tunes the supplied TCP socket for the best latency. void tune_tcp_socket (fd_t s_); // Sets the socket send buffer size. void set_tcp_send_buffer (fd_t sockfd_, int bufsize_); // Sets the socket receive buffer size. void set_tcp_receive_buffer (fd_t sockfd_, int bufsize_); // Tunes TCP keep-alives void tune_tcp_keepalives (fd_t s_, int keepalive_, int keepalive_cnt_, int keepalive_idle_, int keepalive_intvl_); } #endif zeromq3-4.0.4+dfsg.orig/src/address.hpp0000644000175000017500000000271012240736636016671 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ADDRESS_HPP_INCLUDED__ #define __ZMQ_ADDRESS_HPP_INCLUDED__ #include namespace zmq { class tcp_address_t; #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS class ipc_address_t; #endif struct address_t { address_t (const std::string &protocol_, const std::string &address_); ~address_t (); const std::string protocol; const std::string address; // Protocol specific resolved address union { tcp_address_t *tcp_addr; #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS ipc_address_t *ipc_addr; #endif } resolved; int to_string (std::string &addr_) const; }; } #endif zeromq3-4.0.4+dfsg.orig/src/msg.cpp0000644000175000017500000001667012240736636016037 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "msg.hpp" #include "../include/zmq.h" #include #include #include #include "stdint.hpp" #include "likely.hpp" #include "err.hpp" // Check whether the sizes of public representation of the message (zmq_msg_t) // and private representation of the message (zmq::msg_t) match. typedef char zmq_msg_size_check [2 * ((sizeof (zmq::msg_t) == sizeof (zmq_msg_t)) != 0) - 1]; bool zmq::msg_t::check () { return u.base.type >= type_min && u.base.type <= type_max; } int zmq::msg_t::init () { u.vsm.type = type_vsm; u.vsm.flags = 0; u.vsm.size = 0; return 0; } int zmq::msg_t::init_size (size_t size_) { if (size_ <= max_vsm_size) { u.vsm.type = type_vsm; u.vsm.flags = 0; u.vsm.size = (unsigned char) size_; } else { u.lmsg.type = type_lmsg; u.lmsg.flags = 0; u.lmsg.content = (content_t*) malloc (sizeof (content_t) + size_); if (unlikely (!u.lmsg.content)) { errno = ENOMEM; return -1; } u.lmsg.content->data = u.lmsg.content + 1; u.lmsg.content->size = size_; u.lmsg.content->ffn = NULL; u.lmsg.content->hint = NULL; new (&u.lmsg.content->refcnt) zmq::atomic_counter_t (); } return 0; } int zmq::msg_t::init_data (void *data_, size_t size_, msg_free_fn *ffn_, void *hint_) { // If data is NULL and size is not 0, a segfault // would occur once the data is accessed assert (data_ != NULL || size_ == 0); // Initialize constant message if there's no need to deallocate if(ffn_ == NULL) { u.cmsg.type = type_cmsg; u.cmsg.flags = 0; u.cmsg.data = data_; u.cmsg.size = size_; } else { u.lmsg.type = type_lmsg; u.lmsg.flags = 0; u.lmsg.content = (content_t*) malloc (sizeof (content_t)); if (!u.lmsg.content) { errno = ENOMEM; return -1; } u.lmsg.content->data = data_; u.lmsg.content->size = size_; u.lmsg.content->ffn = ffn_; u.lmsg.content->hint = hint_; new (&u.lmsg.content->refcnt) zmq::atomic_counter_t (); } return 0; } int zmq::msg_t::init_delimiter () { u.delimiter.type = type_delimiter; u.delimiter.flags = 0; return 0; } int zmq::msg_t::close () { // Check the validity of the message. if (unlikely (!check ())) { errno = EFAULT; return -1; } if (u.base.type == type_lmsg) { // If the content is not shared, or if it is shared and the reference // count has dropped to zero, deallocate it. if (!(u.lmsg.flags & msg_t::shared) || !u.lmsg.content->refcnt.sub (1)) { // We used "placement new" operator to initialize the reference // counter so we call the destructor explicitly now. u.lmsg.content->refcnt.~atomic_counter_t (); if (u.lmsg.content->ffn) u.lmsg.content->ffn (u.lmsg.content->data, u.lmsg.content->hint); free (u.lmsg.content); } } // Make the message invalid. u.base.type = 0; return 0; } int zmq::msg_t::move (msg_t &src_) { // Check the validity of the source. if (unlikely (!src_.check ())) { errno = EFAULT; return -1; } int rc = close (); if (unlikely (rc < 0)) return rc; *this = src_; rc = src_.init (); if (unlikely (rc < 0)) return rc; return 0; } int zmq::msg_t::copy (msg_t &src_) { // Check the validity of the source. if (unlikely (!src_.check ())) { errno = EFAULT; return -1; } int rc = close (); if (unlikely (rc < 0)) return rc; if (src_.u.base.type == type_lmsg) { // One reference is added to shared messages. Non-shared messages // are turned into shared messages and reference count is set to 2. if (src_.u.lmsg.flags & msg_t::shared) src_.u.lmsg.content->refcnt.add (1); else { src_.u.lmsg.flags |= msg_t::shared; src_.u.lmsg.content->refcnt.set (2); } } *this = src_; return 0; } void *zmq::msg_t::data () { // Check the validity of the message. zmq_assert (check ()); switch (u.base.type) { case type_vsm: return u.vsm.data; case type_lmsg: return u.lmsg.content->data; case type_cmsg: return u.cmsg.data; default: zmq_assert (false); return NULL; } } size_t zmq::msg_t::size () { // Check the validity of the message. zmq_assert (check ()); switch (u.base.type) { case type_vsm: return u.vsm.size; case type_lmsg: return u.lmsg.content->size; case type_cmsg: return u.cmsg.size; default: zmq_assert (false); return 0; } } unsigned char zmq::msg_t::flags () { return u.base.flags; } void zmq::msg_t::set_flags (unsigned char flags_) { u.base.flags |= flags_; } void zmq::msg_t::reset_flags (unsigned char flags_) { u.base.flags &= ~flags_; } bool zmq::msg_t::is_identity () const { return (u.base.flags & identity) == identity; } bool zmq::msg_t::is_delimiter () { return u.base.type == type_delimiter; } bool zmq::msg_t::is_vsm () { return u.base.type == type_vsm; } bool zmq::msg_t::is_cmsg () { return u.base.type == type_cmsg; } void zmq::msg_t::add_refs (int refs_) { zmq_assert (refs_ >= 0); // No copies required. if (!refs_) return; // VSMs, CMSGS and delimiters can be copied straight away. The only // message type that needs special care are long messages. if (u.base.type == type_lmsg) { if (u.lmsg.flags & msg_t::shared) u.lmsg.content->refcnt.add (refs_); else { u.lmsg.content->refcnt.set (refs_ + 1); u.lmsg.flags |= msg_t::shared; } } } bool zmq::msg_t::rm_refs (int refs_) { zmq_assert (refs_ >= 0); // No copies required. if (!refs_) return true; // If there's only one reference close the message. if (u.base.type != type_lmsg || !(u.lmsg.flags & msg_t::shared)) { close (); return false; } // The only message type that needs special care are long messages. if (!u.lmsg.content->refcnt.sub (refs_)) { // We used "placement new" operator to initialize the reference // counter so we call the destructor explicitly now. u.lmsg.content->refcnt.~atomic_counter_t (); if (u.lmsg.content->ffn) u.lmsg.content->ffn (u.lmsg.content->data, u.lmsg.content->hint); free (u.lmsg.content); return false; } return true; } zeromq3-4.0.4+dfsg.orig/src/curve_client.cpp0000644000175000017500000003011412240736636017720 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #ifdef HAVE_LIBSODIUM #include #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "msg.hpp" #include "session_base.hpp" #include "err.hpp" #include "curve_client.hpp" #include "wire.hpp" zmq::curve_client_t::curve_client_t (const options_t &options_) : mechanism_t (options_), state (send_hello) { memcpy (public_key, options_.curve_public_key, crypto_box_PUBLICKEYBYTES); memcpy (secret_key, options_.curve_secret_key, crypto_box_SECRETKEYBYTES); memcpy (server_key, options_.curve_server_key, crypto_box_PUBLICKEYBYTES); // Generate short-term key pair const int rc = crypto_box_keypair (cn_public, cn_secret); zmq_assert (rc == 0); } zmq::curve_client_t::~curve_client_t () { } int zmq::curve_client_t::next_handshake_command (msg_t *msg_) { int rc = 0; switch (state) { case send_hello: rc = produce_hello (msg_); if (rc == 0) state = expect_welcome; break; case send_initiate: rc = produce_initiate (msg_); if (rc == 0) state = expect_ready; break; default: errno = EAGAIN; rc = -1; } return rc; } int zmq::curve_client_t::process_handshake_command (msg_t *msg_) { int rc = 0; switch (state) { case expect_welcome: rc = process_welcome (msg_); if (rc == 0) state = send_initiate; break; case expect_ready: rc = process_ready (msg_); if (rc == 0) state = connected; break; default: errno = EPROTO; rc = -1; break; } if (rc == 0) { rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); } return rc; } int zmq::curve_client_t::encode (msg_t *msg_) { zmq_assert (state == connected); uint8_t flags = 0; if (msg_->flags () & msg_t::more) flags |= 0x01; uint8_t message_nonce [crypto_box_NONCEBYTES]; memcpy (message_nonce, "CurveZMQMESSAGEC", 16); memcpy (message_nonce + 16, &cn_nonce, 8); const size_t mlen = crypto_box_ZEROBYTES + 1 + msg_->size (); uint8_t *message_plaintext = static_cast (malloc (mlen)); alloc_assert (message_plaintext); memset (message_plaintext, 0, crypto_box_ZEROBYTES); message_plaintext [crypto_box_ZEROBYTES] = flags; memcpy (message_plaintext + crypto_box_ZEROBYTES + 1, msg_->data (), msg_->size ()); uint8_t *message_box = static_cast (malloc (mlen)); alloc_assert (message_box); int rc = crypto_box_afternm (message_box, message_plaintext, mlen, message_nonce, cn_precom); zmq_assert (rc == 0); rc = msg_->close (); zmq_assert (rc == 0); rc = msg_->init_size (16 + mlen - crypto_box_BOXZEROBYTES); zmq_assert (rc == 0); uint8_t *message = static_cast (msg_->data ()); memcpy (message, "\x07MESSAGE", 8); memcpy (message + 8, &cn_nonce, 8); memcpy (message + 16, message_box + crypto_box_BOXZEROBYTES, mlen - crypto_box_BOXZEROBYTES); free (message_plaintext); free (message_box); cn_nonce++; return 0; } int zmq::curve_client_t::decode (msg_t *msg_) { zmq_assert (state == connected); if (msg_->size () < 33) { errno = EPROTO; return -1; } const uint8_t *message = static_cast (msg_->data ()); if (memcmp (message, "\x07MESSAGE", 8)) { errno = EPROTO; return -1; } uint8_t message_nonce [crypto_box_NONCEBYTES]; memcpy (message_nonce, "CurveZMQMESSAGES", 16); memcpy (message_nonce + 16, message + 8, 8); const size_t clen = crypto_box_BOXZEROBYTES + (msg_->size () - 16); uint8_t *message_plaintext = static_cast (malloc (clen)); alloc_assert (message_plaintext); uint8_t *message_box = static_cast (malloc (clen)); alloc_assert (message_box); memset (message_box, 0, crypto_box_BOXZEROBYTES); memcpy (message_box + crypto_box_BOXZEROBYTES, message + 16, msg_->size () - 16); int rc = crypto_box_open_afternm (message_plaintext, message_box, clen, message_nonce, cn_precom); if (rc == 0) { rc = msg_->close (); zmq_assert (rc == 0); rc = msg_->init_size (clen - 1 - crypto_box_ZEROBYTES); zmq_assert (rc == 0); const uint8_t flags = message_plaintext [crypto_box_ZEROBYTES]; if (flags & 0x01) msg_->set_flags (msg_t::more); memcpy (msg_->data (), message_plaintext + crypto_box_ZEROBYTES + 1, msg_->size ()); } else errno = EPROTO; free (message_plaintext); free (message_box); return rc; } bool zmq::curve_client_t::is_handshake_complete () const { return state == connected; } int zmq::curve_client_t::produce_hello (msg_t *msg_) { uint8_t hello_nonce [crypto_box_NONCEBYTES]; uint8_t hello_plaintext [crypto_box_ZEROBYTES + 64]; uint8_t hello_box [crypto_box_BOXZEROBYTES + 80]; // Prepare the full nonce memcpy (hello_nonce, "CurveZMQHELLO---", 16); memcpy (hello_nonce + 16, &cn_nonce, 8); // Create Box [64 * %x0](C'->S) memset (hello_plaintext, 0, sizeof hello_plaintext); int rc = crypto_box (hello_box, hello_plaintext, sizeof hello_plaintext, hello_nonce, server_key, cn_secret); zmq_assert (rc == 0); rc = msg_->init_size (200); errno_assert (rc == 0); uint8_t *hello = static_cast (msg_->data ()); memcpy (hello, "\x05HELLO", 6); // CurveZMQ major and minor version numbers memcpy (hello + 6, "\1\0", 2); // Anti-amplification padding memset (hello + 8, 0, 72); // Client public connection key memcpy (hello + 80, cn_public, crypto_box_PUBLICKEYBYTES); // Short nonce, prefixed by "CurveZMQHELLO---" memcpy (hello + 112, hello_nonce + 16, 8); // Signature, Box [64 * %x0](C'->S) memcpy (hello + 120, hello_box + crypto_box_BOXZEROBYTES, 80); cn_nonce++; return 0; } int zmq::curve_client_t::process_welcome (msg_t *msg_) { if (msg_->size () != 168) { errno = EPROTO; return -1; } const uint8_t * welcome = static_cast (msg_->data ()); if (memcmp (welcome, "\x07WELCOME", 8)) { errno = EPROTO; return -1; } uint8_t welcome_nonce [crypto_box_NONCEBYTES]; uint8_t welcome_plaintext [crypto_box_ZEROBYTES + 128]; uint8_t welcome_box [crypto_box_BOXZEROBYTES + 144]; // Open Box [S' + cookie](C'->S) memset (welcome_box, 0, crypto_box_BOXZEROBYTES); memcpy (welcome_box + crypto_box_BOXZEROBYTES, welcome + 24, 144); memcpy (welcome_nonce, "WELCOME-", 8); memcpy (welcome_nonce + 8, welcome + 8, 16); int rc = crypto_box_open (welcome_plaintext, welcome_box, sizeof welcome_box, welcome_nonce, server_key, cn_secret); if (rc != 0) { errno = EPROTO; return -1; } memcpy (cn_server, welcome_plaintext + crypto_box_ZEROBYTES, 32); memcpy (cn_cookie, welcome_plaintext + crypto_box_ZEROBYTES + 32, 16 + 80); // Message independent precomputation rc = crypto_box_beforenm (cn_precom, cn_server, cn_secret); zmq_assert (rc == 0); return 0; } int zmq::curve_client_t::produce_initiate (msg_t *msg_) { uint8_t vouch_nonce [crypto_box_NONCEBYTES]; uint8_t vouch_plaintext [crypto_box_ZEROBYTES + 64]; uint8_t vouch_box [crypto_box_BOXZEROBYTES + 80]; // Create vouch = Box [C',S](C->S') memset (vouch_plaintext, 0, crypto_box_ZEROBYTES); memcpy (vouch_plaintext + crypto_box_ZEROBYTES, cn_public, 32); memcpy (vouch_plaintext + crypto_box_ZEROBYTES + 32, server_key, 32); memcpy (vouch_nonce, "VOUCH---", 8); randombytes (vouch_nonce + 8, 16); int rc = crypto_box (vouch_box, vouch_plaintext, sizeof vouch_plaintext, vouch_nonce, cn_server, secret_key); zmq_assert (rc == 0); // Assume here that metadata is limited to 256 bytes uint8_t initiate_nonce [crypto_box_NONCEBYTES]; uint8_t initiate_plaintext [crypto_box_ZEROBYTES + 128 + 256]; uint8_t initiate_box [crypto_box_BOXZEROBYTES + 144 + 256]; // Create Box [C + vouch + metadata](C'->S') memset (initiate_plaintext, 0, crypto_box_ZEROBYTES); memcpy (initiate_plaintext + crypto_box_ZEROBYTES, public_key, 32); memcpy (initiate_plaintext + crypto_box_ZEROBYTES + 32, vouch_nonce + 8, 16); memcpy (initiate_plaintext + crypto_box_ZEROBYTES + 48, vouch_box + crypto_box_BOXZEROBYTES, 80); // Metadata starts after vouch uint8_t *ptr = initiate_plaintext + crypto_box_ZEROBYTES + 128; // Add socket type property const char *socket_type = socket_type_string (options.type); ptr += add_property (ptr, "Socket-Type", socket_type, strlen (socket_type)); // Add identity property if (options.type == ZMQ_REQ || options.type == ZMQ_DEALER || options.type == ZMQ_ROUTER) ptr += add_property (ptr, "Identity", options.identity, options.identity_size); const size_t mlen = ptr - initiate_plaintext; memcpy (initiate_nonce, "CurveZMQINITIATE", 16); memcpy (initiate_nonce + 16, &cn_nonce, 8); rc = crypto_box (initiate_box, initiate_plaintext, mlen, initiate_nonce, cn_server, cn_secret); zmq_assert (rc == 0); rc = msg_->init_size (113 + mlen - crypto_box_BOXZEROBYTES); errno_assert (rc == 0); uint8_t *initiate = static_cast (msg_->data ()); memcpy (initiate, "\x08INITIATE", 9); // Cookie provided by the server in the WELCOME command memcpy (initiate + 9, cn_cookie, 96); // Short nonce, prefixed by "CurveZMQINITIATE" memcpy (initiate + 105, &cn_nonce, 8); // Box [C + vouch + metadata](C'->S') memcpy (initiate + 113, initiate_box + crypto_box_BOXZEROBYTES, mlen - crypto_box_BOXZEROBYTES); cn_nonce++; return 0; } int zmq::curve_client_t::process_ready (msg_t *msg_) { if (msg_->size () < 30) { errno = EPROTO; return -1; } const uint8_t *ready = static_cast (msg_->data ()); if (memcmp (ready, "\x05READY", 6)) { errno = EPROTO; return -1; } const size_t clen = (msg_->size () - 14) + crypto_box_BOXZEROBYTES; uint8_t ready_nonce [crypto_box_NONCEBYTES]; uint8_t ready_plaintext [crypto_box_ZEROBYTES + 256]; uint8_t ready_box [crypto_box_BOXZEROBYTES + 16 + 256]; memset (ready_box, 0, crypto_box_BOXZEROBYTES); memcpy (ready_box + crypto_box_BOXZEROBYTES, ready + 14, clen - crypto_box_BOXZEROBYTES); memcpy (ready_nonce, "CurveZMQREADY---", 16); memcpy (ready_nonce + 16, ready + 6, 8); int rc = crypto_box_open_afternm (ready_plaintext, ready_box, clen, ready_nonce, cn_precom); if (rc != 0) { errno = EPROTO; return -1; } rc = parse_metadata (ready_plaintext + crypto_box_ZEROBYTES, clen - crypto_box_ZEROBYTES); return rc; } #endif zeromq3-4.0.4+dfsg.orig/src/yqueue.hpp0000644000175000017500000001447312240736636016572 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_YQUEUE_HPP_INCLUDED__ #define __ZMQ_YQUEUE_HPP_INCLUDED__ #include #include #include "err.hpp" #include "atomic_ptr.hpp" namespace zmq { // yqueue is an efficient queue implementation. The main goal is // to minimise number of allocations/deallocations needed. Thus yqueue // allocates/deallocates elements in batches of N. // // yqueue allows one thread to use push/back function and another one // to use pop/front functions. However, user must ensure that there's no // pop on the empty queue and that both threads don't access the same // element in unsynchronised manner. // // T is the type of the object in the queue. // N is granularity of the queue (how many pushes have to be done till // actual memory allocation is required). template class yqueue_t { public: // Create the queue. inline yqueue_t () { begin_chunk = (chunk_t*) malloc (sizeof (chunk_t)); alloc_assert (begin_chunk); begin_pos = 0; back_chunk = NULL; back_pos = 0; end_chunk = begin_chunk; end_pos = 0; } // Destroy the queue. inline ~yqueue_t () { while (true) { if (begin_chunk == end_chunk) { free (begin_chunk); break; } chunk_t *o = begin_chunk; begin_chunk = begin_chunk->next; free (o); } chunk_t *sc = spare_chunk.xchg (NULL); free (sc); } // Returns reference to the front element of the queue. // If the queue is empty, behaviour is undefined. inline T &front () { return begin_chunk->values [begin_pos]; } // Returns reference to the back element of the queue. // If the queue is empty, behaviour is undefined. inline T &back () { return back_chunk->values [back_pos]; } // Adds an element to the back end of the queue. inline void push () { back_chunk = end_chunk; back_pos = end_pos; if (++end_pos != N) return; chunk_t *sc = spare_chunk.xchg (NULL); if (sc) { end_chunk->next = sc; sc->prev = end_chunk; } else { end_chunk->next = (chunk_t*) malloc (sizeof (chunk_t)); alloc_assert (end_chunk->next); end_chunk->next->prev = end_chunk; } end_chunk = end_chunk->next; end_pos = 0; } // Removes element from the back end of the queue. In other words // it rollbacks last push to the queue. Take care: Caller is // responsible for destroying the object being unpushed. // The caller must also guarantee that the queue isn't empty when // unpush is called. It cannot be done automatically as the read // side of the queue can be managed by different, completely // unsynchronised thread. inline void unpush () { // First, move 'back' one position backwards. if (back_pos) --back_pos; else { back_pos = N - 1; back_chunk = back_chunk->prev; } // Now, move 'end' position backwards. Note that obsolete end chunk // is not used as a spare chunk. The analysis shows that doing so // would require free and atomic operation per chunk deallocated // instead of a simple free. if (end_pos) --end_pos; else { end_pos = N - 1; end_chunk = end_chunk->prev; free (end_chunk->next); end_chunk->next = NULL; } } // Removes an element from the front end of the queue. inline void pop () { if (++ begin_pos == N) { chunk_t *o = begin_chunk; begin_chunk = begin_chunk->next; begin_chunk->prev = NULL; begin_pos = 0; // 'o' has been more recently used than spare_chunk, // so for cache reasons we'll get rid of the spare and // use 'o' as the spare. chunk_t *cs = spare_chunk.xchg (o); free (cs); } } private: // Individual memory chunk to hold N elements. struct chunk_t { T values [N]; chunk_t *prev; chunk_t *next; }; // Back position may point to invalid memory if the queue is empty, // while begin & end positions are always valid. Begin position is // accessed exclusively be queue reader (front/pop), while back and // end positions are accessed exclusively by queue writer (back/push). chunk_t *begin_chunk; int begin_pos; chunk_t *back_chunk; int back_pos; chunk_t *end_chunk; int end_pos; // People are likely to produce and consume at similar rates. In // this scenario holding onto the most recently freed chunk saves // us from having to call malloc/free. atomic_ptr_t spare_chunk; // Disable copying of yqueue. yqueue_t (const yqueue_t&); const yqueue_t &operator = (const yqueue_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/fq.hpp0000644000175000017500000000373712240736636015664 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_FQ_HPP_INCLUDED__ #define __ZMQ_FQ_HPP_INCLUDED__ #include "array.hpp" #include "pipe.hpp" #include "msg.hpp" namespace zmq { // Class manages a set of inbound pipes. On receive it performs fair // queueing so that senders gone berserk won't cause denial of // service for decent senders. class fq_t { public: fq_t (); ~fq_t (); void attach (pipe_t *pipe_); void activated (pipe_t *pipe_); void pipe_terminated (pipe_t *pipe_); int recv (msg_t *msg_); int recvpipe (msg_t *msg_, pipe_t **pipe_); bool has_in (); private: // Inbound pipes. typedef array_t pipes_t; pipes_t pipes; // Number of active pipes. All the active pipes are located at the // beginning of the pipes array. pipes_t::size_type active; // Index of the next bound pipe to read a message from. pipes_t::size_type current; // If true, part of a multipart message was already received, but // there are following parts still waiting in the current pipe. bool more; fq_t (const fq_t&); const fq_t &operator = (const fq_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/options.cpp0000644000175000017500000004146112240736636016740 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "options.hpp" #include "err.hpp" #include "../include/zmq_utils.h" zmq::options_t::options_t () : sndhwm (1000), rcvhwm (1000), affinity (0), identity_size (0), rate (100), recovery_ivl (10000), multicast_hops (1), sndbuf (0), rcvbuf (0), type (-1), linger (-1), reconnect_ivl (100), reconnect_ivl_max (0), backlog (100), maxmsgsize (-1), rcvtimeo (-1), sndtimeo (-1), ipv6 (0), immediate (0), filter (false), recv_identity (false), raw_sock (false), tcp_keepalive (-1), tcp_keepalive_cnt (-1), tcp_keepalive_idle (-1), tcp_keepalive_intvl (-1), mechanism (ZMQ_NULL), as_server (0), socket_id (0), conflate (false) { } int zmq::options_t::setsockopt (int option_, const void *optval_, size_t optvallen_) { bool is_int = (optvallen_ == sizeof (int)); int value = is_int? *((int *) optval_): 0; switch (option_) { case ZMQ_SNDHWM: if (is_int && value >= 0) { sndhwm = value; return 0; } break; case ZMQ_RCVHWM: if (is_int && value >= 0) { rcvhwm = value; return 0; } break; case ZMQ_AFFINITY: if (optvallen_ == sizeof (uint64_t)) { affinity = *((uint64_t*) optval_); return 0; } break; case ZMQ_IDENTITY: // Empty identity is invalid as well as identity longer than // 255 bytes. Identity starting with binary zero is invalid // as these are used for auto-generated identities. if (optvallen_ > 0 && optvallen_ < 256 && *((const unsigned char *) optval_) != 0) { identity_size = optvallen_; memcpy (identity, optval_, identity_size); return 0; } break; case ZMQ_RATE: if (is_int && value > 0) { rate = value; return 0; } break; case ZMQ_RECOVERY_IVL: if (is_int && value >= 0) { recovery_ivl = value; return 0; } break; case ZMQ_SNDBUF: if (is_int && value >= 0) { sndbuf = value; return 0; } break; case ZMQ_RCVBUF: if (is_int && value >= 0) { rcvbuf = value; return 0; } break; case ZMQ_LINGER: if (is_int && value >= -1) { linger = value; return 0; } break; case ZMQ_RECONNECT_IVL: if (is_int && value >= -1) { reconnect_ivl = value; return 0; } break; case ZMQ_RECONNECT_IVL_MAX: if (is_int && value >= 0) { reconnect_ivl_max = value; return 0; } break; case ZMQ_BACKLOG: if (is_int && value >= 0) { backlog = value; return 0; } break; case ZMQ_MAXMSGSIZE: if (optvallen_ == sizeof (int64_t)) { maxmsgsize = *((int64_t *) optval_); return 0; } break; case ZMQ_MULTICAST_HOPS: if (is_int && value > 0) { multicast_hops = value; return 0; } break; case ZMQ_RCVTIMEO: if (is_int && value >= -1) { rcvtimeo = value; return 0; } break; case ZMQ_SNDTIMEO: if (is_int && value >= -1) { sndtimeo = value; return 0; } break; /* Deprecated in favor of ZMQ_IPV6 */ case ZMQ_IPV4ONLY: if (is_int && (value == 0 || value == 1)) { ipv6 = (value == 0); return 0; } break; /* To replace the somewhat surprising IPV4ONLY */ case ZMQ_IPV6: if (is_int && (value == 0 || value == 1)) { ipv6 = (value != 0); return 0; } break; case ZMQ_TCP_KEEPALIVE: if (is_int && (value >= -1 || value <= 1)) { tcp_keepalive = value; return 0; } break; case ZMQ_TCP_KEEPALIVE_CNT: if (is_int && (value == -1 || value >= 0)) { tcp_keepalive_cnt = value; return 0; } break; case ZMQ_TCP_KEEPALIVE_IDLE: if (is_int && (value == -1 || value >= 0)) { tcp_keepalive_idle = value; return 0; } break; case ZMQ_TCP_KEEPALIVE_INTVL: if (is_int && (value == -1 || value >= 0)) { tcp_keepalive_intvl = value; return 0; } break; case ZMQ_IMMEDIATE: if (is_int && (value == 0 || value == 1)) { immediate = value; return 0; } break; case ZMQ_TCP_ACCEPT_FILTER: if (optvallen_ == 0 && optval_ == NULL) { tcp_accept_filters.clear (); return 0; } else if (optvallen_ > 0 && optvallen_ < 256 && optval_ != NULL && *((const char*) optval_) != 0) { std::string filter_str ((const char *) optval_, optvallen_); tcp_address_mask_t mask; int rc = mask.resolve (filter_str.c_str (), ipv6); if (rc == 0) { tcp_accept_filters.push_back (mask); return 0; } } break; case ZMQ_PLAIN_SERVER: if (is_int && (value == 0 || value == 1)) { as_server = value; mechanism = value? ZMQ_PLAIN: ZMQ_NULL; return 0; } break; case ZMQ_PLAIN_USERNAME: if (optvallen_ == 0 && optval_ == NULL) { mechanism = ZMQ_NULL; return 0; } else if (optvallen_ > 0 && optvallen_ < 256 && optval_ != NULL) { plain_username.assign ((const char *) optval_, optvallen_); as_server = 0; mechanism = ZMQ_PLAIN; return 0; } break; case ZMQ_PLAIN_PASSWORD: if (optvallen_ == 0 && optval_ == NULL) { mechanism = ZMQ_NULL; return 0; } else if (optvallen_ > 0 && optvallen_ < 256 && optval_ != NULL) { plain_password.assign ((const char *) optval_, optvallen_); as_server = 0; mechanism = ZMQ_PLAIN; return 0; } break; case ZMQ_ZAP_DOMAIN: if (optvallen_ < 256) { zap_domain.assign ((const char *) optval_, optvallen_); return 0; } break; // If libsodium isn't installed, these options provoke EINVAL # ifdef HAVE_LIBSODIUM case ZMQ_CURVE_SERVER: if (is_int && (value == 0 || value == 1)) { as_server = value; mechanism = value? ZMQ_CURVE: ZMQ_NULL; return 0; } break; case ZMQ_CURVE_PUBLICKEY: if (optvallen_ == CURVE_KEYSIZE) { memcpy (curve_public_key, optval_, CURVE_KEYSIZE); mechanism = ZMQ_CURVE; return 0; } else if (optvallen_ == CURVE_KEYSIZE_Z85) { zmq_z85_decode (curve_public_key, (char *) optval_); mechanism = ZMQ_CURVE; return 0; } break; case ZMQ_CURVE_SECRETKEY: if (optvallen_ == CURVE_KEYSIZE) { memcpy (curve_secret_key, optval_, CURVE_KEYSIZE); mechanism = ZMQ_CURVE; return 0; } else if (optvallen_ == CURVE_KEYSIZE_Z85) { zmq_z85_decode (curve_secret_key, (char *) optval_); mechanism = ZMQ_CURVE; return 0; } break; case ZMQ_CURVE_SERVERKEY: if (optvallen_ == CURVE_KEYSIZE) { memcpy (curve_server_key, optval_, CURVE_KEYSIZE); as_server = 0; mechanism = ZMQ_CURVE; return 0; } else if (optvallen_ == CURVE_KEYSIZE_Z85) { zmq_z85_decode (curve_server_key, (char *) optval_); as_server = 0; mechanism = ZMQ_CURVE; return 0; } break; # endif case ZMQ_CONFLATE: if (is_int && (value == 0 || value == 1)) { conflate = (value != 0); return 0; } break; default: break; } errno = EINVAL; return -1; } int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) { bool is_int = (*optvallen_ == sizeof (int)); int *value = (int *) optval_; switch (option_) { case ZMQ_SNDHWM: if (is_int) { *value = sndhwm; return 0; } break; case ZMQ_RCVHWM: if (is_int) { *value = rcvhwm; return 0; } break; case ZMQ_AFFINITY: if (*optvallen_ == sizeof (uint64_t)) { *((uint64_t *) optval_) = affinity; return 0; } break; case ZMQ_IDENTITY: if (*optvallen_ >= identity_size) { memcpy (optval_, identity, identity_size); *optvallen_ = identity_size; return 0; } break; case ZMQ_RATE: if (is_int) { *value = rate; return 0; } break; case ZMQ_RECOVERY_IVL: if (is_int) { *value = recovery_ivl; return 0; } break; case ZMQ_SNDBUF: if (is_int) { *value = sndbuf; return 0; } break; case ZMQ_RCVBUF: if (is_int) { *value = rcvbuf; return 0; } break; case ZMQ_TYPE: if (is_int) { *value = type; return 0; } break; case ZMQ_LINGER: if (is_int) { *value = linger; return 0; } break; case ZMQ_RECONNECT_IVL: if (is_int) { *value = reconnect_ivl; return 0; } break; case ZMQ_RECONNECT_IVL_MAX: if (is_int) { *value = reconnect_ivl_max; return 0; } break; case ZMQ_BACKLOG: if (is_int) { *value = backlog; return 0; } break; case ZMQ_MAXMSGSIZE: if (*optvallen_ == sizeof (int64_t)) { *((int64_t *) optval_) = maxmsgsize; *optvallen_ = sizeof (int64_t); return 0; } break; case ZMQ_MULTICAST_HOPS: if (is_int) { *value = multicast_hops; return 0; } break; case ZMQ_RCVTIMEO: if (is_int) { *value = rcvtimeo; return 0; } break; case ZMQ_SNDTIMEO: if (is_int) { *value = sndtimeo; return 0; } break; case ZMQ_IPV4ONLY: if (is_int) { *value = 1 - ipv6; return 0; } break; case ZMQ_IPV6: if (is_int) { *value = ipv6; return 0; } break; case ZMQ_IMMEDIATE: if (is_int) { *value = immediate; return 0; } break; case ZMQ_TCP_KEEPALIVE: if (is_int) { *value = tcp_keepalive; return 0; } break; case ZMQ_TCP_KEEPALIVE_CNT: if (is_int) { *value = tcp_keepalive_cnt; return 0; } break; case ZMQ_TCP_KEEPALIVE_IDLE: if (is_int) { *value = tcp_keepalive_idle; return 0; } break; case ZMQ_TCP_KEEPALIVE_INTVL: if (is_int) { *value = tcp_keepalive_intvl; return 0; } break; case ZMQ_MECHANISM: if (is_int) { *value = mechanism; return 0; } break; case ZMQ_PLAIN_SERVER: if (is_int) { *value = as_server && mechanism == ZMQ_PLAIN; return 0; } break; case ZMQ_PLAIN_USERNAME: if (*optvallen_ >= plain_username.size () + 1) { memcpy (optval_, plain_username.c_str (), plain_username.size () + 1); *optvallen_ = plain_username.size () + 1; return 0; } break; case ZMQ_PLAIN_PASSWORD: if (*optvallen_ >= plain_password.size () + 1) { memcpy (optval_, plain_password.c_str (), plain_password.size () + 1); *optvallen_ = plain_password.size () + 1; return 0; } break; case ZMQ_ZAP_DOMAIN: if (*optvallen_ >= zap_domain.size () + 1) { memcpy (optval_, zap_domain.c_str (), zap_domain.size () + 1); *optvallen_ = zap_domain.size () + 1; return 0; } break; // If libsodium isn't installed, these options provoke EINVAL # ifdef HAVE_LIBSODIUM case ZMQ_CURVE_SERVER: if (is_int) { *value = as_server && mechanism == ZMQ_CURVE; return 0; } break; case ZMQ_CURVE_PUBLICKEY: if (*optvallen_ == CURVE_KEYSIZE) { memcpy (optval_, curve_public_key, CURVE_KEYSIZE); return 0; } else if (*optvallen_ == CURVE_KEYSIZE_Z85 + 1) { zmq_z85_encode ((char *) optval_, curve_public_key, CURVE_KEYSIZE); return 0; } break; case ZMQ_CURVE_SECRETKEY: if (*optvallen_ == CURVE_KEYSIZE) { memcpy (optval_, curve_secret_key, CURVE_KEYSIZE); return 0; } else if (*optvallen_ == CURVE_KEYSIZE_Z85 + 1) { zmq_z85_encode ((char *) optval_, curve_secret_key, CURVE_KEYSIZE); return 0; } break; case ZMQ_CURVE_SERVERKEY: if (*optvallen_ == CURVE_KEYSIZE) { memcpy (optval_, curve_server_key, CURVE_KEYSIZE); return 0; } else if (*optvallen_ == CURVE_KEYSIZE_Z85 + 1) { zmq_z85_encode ((char *) optval_, curve_server_key, CURVE_KEYSIZE); return 0; } break; # endif case ZMQ_CONFLATE: if (is_int) { *value = conflate; return 0; } break; } errno = EINVAL; return -1; } zeromq3-4.0.4+dfsg.orig/src/tcp_address.hpp0000644000175000017500000000533512240736636017545 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TCP_ADDRESS_HPP_INCLUDED__ #define __ZMQ_TCP_ADDRESS_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #endif namespace zmq { class tcp_address_t { public: tcp_address_t (); tcp_address_t (const sockaddr *sa, socklen_t sa_len); virtual ~tcp_address_t (); // This function translates textual TCP address into an address // strcuture. If 'local' is true, names are resolved as local interface // names. If it is false, names are resolved as remote hostnames. // If 'ipv6' is true, the name may resolve to IPv6 address. int resolve (const char *name_, bool local_, bool ipv6_); // The opposite to resolve() virtual int to_string (std::string &addr_); #if defined ZMQ_HAVE_WINDOWS unsigned short family () const; #else sa_family_t family () const; #endif const sockaddr *addr () const; socklen_t addrlen () const; protected: int resolve_nic_name (const char *nic_, bool ipv6_); int resolve_interface (const char *interface_, bool ipv6_); int resolve_hostname (const char *hostname_, bool ipv6_); union { sockaddr generic; sockaddr_in ipv4; sockaddr_in6 ipv6; } address; }; class tcp_address_mask_t : public tcp_address_t { public: tcp_address_mask_t (); // This function enhances tcp_address_t::resolve() with ability to parse // additional cidr-like(/xx) mask value at the end of the name string. // Works only with remote hostnames. int resolve (const char *name_, bool ipv6_); // The opposite to resolve() int to_string (std::string &addr_); int mask () const; bool match_address (const struct sockaddr *ss, const socklen_t ss_len) const; private: int address_mask; }; } #endif zeromq3-4.0.4+dfsg.orig/src/v2_protocol.hpp0000644000175000017500000000215412240736636017516 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_V2_PROTOCOL_HPP_INCLUDED__ #define __ZMQ_V2_PROTOCOL_HPP_INCLUDED__ namespace zmq { // Definition of constants for ZMTP/2.0 transport protocol. class v2_protocol_t { public: // Message flags. enum { more_flag = 1, large_flag = 2, command_flag = 4 }; }; } #endif zeromq3-4.0.4+dfsg.orig/src/zmq.cpp0000644000175000017500000007042712240736636016060 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #define ZMQ_TYPE_UNSAFE #include "platform.hpp" #if defined ZMQ_FORCE_SELECT #define ZMQ_POLL_BASED_ON_SELECT #elif defined ZMQ_FORCE_POLL #define ZMQ_POLL_BASED_ON_POLL #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ defined ZMQ_HAVE_NETBSD #define ZMQ_POLL_BASED_ON_POLL #elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS ||\ defined ZMQ_HAVE_CYGWIN #define ZMQ_POLL_BASED_ON_SELECT #endif // On AIX platform, poll.h has to be included first to get consistent // definition of pollfd structure (AIX uses 'reqevents' and 'retnevents' // instead of 'events' and 'revents' and defines macros to map from POSIX-y // names to AIX-specific names). #if defined ZMQ_POLL_BASED_ON_POLL #include #endif // zmq.h must be included *after* poll.h for AIX to build properly #include "../include/zmq.h" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #endif // XSI vector I/O #if defined ZMQ_HAVE_UIO #include #else struct iovec { void *iov_base; size_t iov_len; }; #endif #include #include #include #include "proxy.hpp" #include "socket_base.hpp" #include "stdint.hpp" #include "config.hpp" #include "likely.hpp" #include "clock.hpp" #include "ctx.hpp" #include "err.hpp" #include "msg.hpp" #include "fd.hpp" #if !defined ZMQ_HAVE_WINDOWS #include #endif #if defined ZMQ_HAVE_OPENPGM #define __PGM_WININT_H__ #include #endif // Compile time check whether msg_t fits into zmq_msg_t. typedef char check_msg_t_size [sizeof (zmq::msg_t) == sizeof (zmq_msg_t) ? 1 : -1]; void zmq_version (int *major_, int *minor_, int *patch_) { *major_ = ZMQ_VERSION_MAJOR; *minor_ = ZMQ_VERSION_MINOR; *patch_ = ZMQ_VERSION_PATCH; } const char *zmq_strerror (int errnum_) { return zmq::errno_to_string (errnum_); } int zmq_errno (void) { return errno; } // New context API void *zmq_ctx_new (void) { #if defined ZMQ_HAVE_OPENPGM // Init PGM transport. Ensure threading and timer are enabled. Find PGM // protocol ID. Note that if you want to use gettimeofday and sleep for // openPGM timing, set environment variables PGM_TIMER to "GTOD" and // PGM_SLEEP to "USLEEP". pgm_error_t *pgm_error = NULL; const bool ok = pgm_init (&pgm_error); if (ok != TRUE) { // Invalid parameters don't set pgm_error_t zmq_assert (pgm_error != NULL); if (pgm_error->domain == PGM_ERROR_DOMAIN_TIME && ( pgm_error->code == PGM_ERROR_FAILED)) { // Failed to access RTC or HPET device. pgm_error_free (pgm_error); errno = EINVAL; return NULL; } // PGM_ERROR_DOMAIN_ENGINE: WSAStartup errors or missing WSARecvMsg. zmq_assert (false); } #endif #ifdef ZMQ_HAVE_WINDOWS // Intialise Windows sockets. Note that WSAStartup can be called multiple // times given that WSACleanup will be called for each WSAStartup. // We do this before the ctx constructor since its embedded mailbox_t // object needs Winsock to be up and running. WORD version_requested = MAKEWORD (2, 2); WSADATA wsa_data; int rc = WSAStartup (version_requested, &wsa_data); zmq_assert (rc == 0); zmq_assert (LOBYTE (wsa_data.wVersion) == 2 && HIBYTE (wsa_data.wVersion) == 2); #endif // Create 0MQ context. zmq::ctx_t *ctx = new (std::nothrow) zmq::ctx_t; alloc_assert (ctx); return ctx; } int zmq_ctx_term (void *ctx_) { if (!ctx_ || !((zmq::ctx_t*) ctx_)->check_tag ()) { errno = EFAULT; return -1; } int rc = ((zmq::ctx_t*) ctx_)->terminate (); int en = errno; // Shut down only if termination was not interrupted by a signal. if (!rc || en != EINTR) { #ifdef ZMQ_HAVE_WINDOWS // On Windows, uninitialise socket layer. rc = WSACleanup (); wsa_assert (rc != SOCKET_ERROR); #endif #if defined ZMQ_HAVE_OPENPGM // Shut down the OpenPGM library. if (pgm_shutdown () != TRUE) zmq_assert (false); #endif } errno = en; return rc; } int zmq_ctx_shutdown (void *ctx_) { if (!ctx_ || !((zmq::ctx_t*) ctx_)->check_tag ()) { errno = EFAULT; return -1; } return ((zmq::ctx_t*) ctx_)->shutdown (); } int zmq_ctx_set (void *ctx_, int option_, int optval_) { if (!ctx_ || !((zmq::ctx_t*) ctx_)->check_tag ()) { errno = EFAULT; return -1; } return ((zmq::ctx_t*) ctx_)->set (option_, optval_); } int zmq_ctx_get (void *ctx_, int option_) { if (!ctx_ || !((zmq::ctx_t*) ctx_)->check_tag ()) { errno = EFAULT; return -1; } return ((zmq::ctx_t*) ctx_)->get (option_); } // Stable/legacy context API void *zmq_init (int io_threads_) { if (io_threads_ >= 0) { void *ctx = zmq_ctx_new (); zmq_ctx_set (ctx, ZMQ_IO_THREADS, io_threads_); return ctx; } errno = EINVAL; return NULL; } int zmq_term (void *ctx_) { return zmq_ctx_term (ctx_); } int zmq_ctx_destroy (void *ctx_) { return zmq_ctx_term (ctx_); } // Sockets void *zmq_socket (void *ctx_, int type_) { if (!ctx_ || !((zmq::ctx_t*) ctx_)->check_tag ()) { errno = EFAULT; return NULL; } zmq::ctx_t *ctx = (zmq::ctx_t*) ctx_; zmq::socket_base_t *s = ctx->create_socket (type_); return (void *) s; } int zmq_close (void *s_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } ((zmq::socket_base_t*) s_)->close (); return 0; } int zmq_setsockopt (void *s_, int option_, const void *optval_, size_t optvallen_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; int result = s->setsockopt (option_, optval_, optvallen_); return result; } int zmq_getsockopt (void *s_, int option_, void *optval_, size_t *optvallen_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; int result = s->getsockopt (option_, optval_, optvallen_); return result; } int zmq_socket_monitor (void *s_, const char *addr_, int events_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; int result = s->monitor (addr_, events_); return result; } int zmq_bind (void *s_, const char *addr_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; int result = s->bind (addr_); return result; } int zmq_connect (void *s_, const char *addr_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; int result = s->connect (addr_); return result; } int zmq_unbind (void *s_, const char *addr_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; return s->term_endpoint (addr_); } int zmq_disconnect (void *s_, const char *addr_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; return s->term_endpoint (addr_); } // Sending functions. static int s_sendmsg (zmq::socket_base_t *s_, zmq_msg_t *msg_, int flags_) { int sz = (int) zmq_msg_size (msg_); int rc = s_->send ((zmq::msg_t*) msg_, flags_); if (unlikely (rc < 0)) return -1; return sz; } /* To be deprecated once zmq_msg_send() is stable */ int zmq_sendmsg (void *s_, zmq_msg_t *msg_, int flags_) { return zmq_msg_send (msg_, s_, flags_); } int zmq_send (void *s_, const void *buf_, size_t len_, int flags_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq_msg_t msg; int rc = zmq_msg_init_size (&msg, len_); if (rc != 0) return -1; memcpy (zmq_msg_data (&msg), buf_, len_); zmq::socket_base_t *s = (zmq::socket_base_t *) s_; rc = s_sendmsg (s, &msg, flags_); if (unlikely (rc < 0)) { int err = errno; int rc2 = zmq_msg_close (&msg); errno_assert (rc2 == 0); errno = err; return -1; } // Note the optimisation here. We don't close the msg object as it is // empty anyway. This may change when implementation of zmq_msg_t changes. return rc; } int zmq_send_const (void *s_, const void *buf_, size_t len_, int flags_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq_msg_t msg; int rc = zmq_msg_init_data (&msg, (void*)buf_, len_, NULL, NULL); if (rc != 0) return -1; zmq::socket_base_t *s = (zmq::socket_base_t *) s_; rc = s_sendmsg (s, &msg, flags_); if (unlikely (rc < 0)) { int err = errno; int rc2 = zmq_msg_close (&msg); errno_assert (rc2 == 0); errno = err; return -1; } // Note the optimisation here. We don't close the msg object as it is // empty anyway. This may change when implementation of zmq_msg_t changes. return rc; } // Send multiple messages. // TODO: this function has no man page // // If flag bit ZMQ_SNDMORE is set the vector is treated as // a single multi-part message, i.e. the last message has // ZMQ_SNDMORE bit switched off. // int zmq_sendiov (void *s_, iovec *a_, size_t count_, int flags_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } int rc = 0; zmq_msg_t msg; zmq::socket_base_t *s = (zmq::socket_base_t *) s_; for (size_t i = 0; i < count_; ++i) { rc = zmq_msg_init_size (&msg, a_[i].iov_len); if (rc != 0) { rc = -1; break; } memcpy (zmq_msg_data (&msg), a_[i].iov_base, a_[i].iov_len); if (i == count_ - 1) flags_ = flags_ & ~ZMQ_SNDMORE; rc = s_sendmsg (s, &msg, flags_); if (unlikely (rc < 0)) { int err = errno; int rc2 = zmq_msg_close (&msg); errno_assert (rc2 == 0); errno = err; rc = -1; break; } } return rc; } // Receiving functions. static int s_recvmsg (zmq::socket_base_t *s_, zmq_msg_t *msg_, int flags_) { int rc = s_->recv ((zmq::msg_t*) msg_, flags_); if (unlikely (rc < 0)) return -1; return (int) zmq_msg_size (msg_); } /* To be deprecated once zmq_msg_recv() is stable */ int zmq_recvmsg (void *s_, zmq_msg_t *msg_, int flags_) { return zmq_msg_recv (msg_, s_, flags_); } int zmq_recv (void *s_, void *buf_, size_t len_, int flags_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq_msg_t msg; int rc = zmq_msg_init (&msg); errno_assert (rc == 0); zmq::socket_base_t *s = (zmq::socket_base_t *) s_; int nbytes = s_recvmsg (s, &msg, flags_); if (unlikely (nbytes < 0)) { int err = errno; rc = zmq_msg_close (&msg); errno_assert (rc == 0); errno = err; return -1; } // At the moment an oversized message is silently truncated. // TODO: Build in a notification mechanism to report the overflows. size_t to_copy = size_t (nbytes) < len_ ? size_t (nbytes) : len_; memcpy (buf_, zmq_msg_data (&msg), to_copy); rc = zmq_msg_close (&msg); errno_assert (rc == 0); return nbytes; } // Receive a multi-part message // // Receives up to *count_ parts of a multi-part message. // Sets *count_ to the actual number of parts read. // ZMQ_RCVMORE is set to indicate if a complete multi-part message was read. // Returns number of message parts read, or -1 on error. // // Note: even if -1 is returned, some parts of the message // may have been read. Therefore the client must consult // *count_ to retrieve message parts successfully read, // even if -1 is returned. // // The iov_base* buffers of each iovec *a_ filled in by this // function may be freed using free(). // TODO: this function has no man page // int zmq_recviov (void *s_, iovec *a_, size_t *count_, int flags_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; size_t count = *count_; int nread = 0; bool recvmore = true; *count_ = 0; for (size_t i = 0; recvmore && i < count; ++i) { zmq_msg_t msg; int rc = zmq_msg_init (&msg); errno_assert (rc == 0); int nbytes = s_recvmsg (s, &msg, flags_); if (unlikely (nbytes < 0)) { int err = errno; rc = zmq_msg_close (&msg); errno_assert (rc == 0); errno = err; nread = -1; break; } a_[i].iov_len = zmq_msg_size (&msg); a_[i].iov_base = malloc(a_[i].iov_len); if (unlikely (!a_[i].iov_base)) { errno = ENOMEM; return -1; } memcpy(a_[i].iov_base,static_cast (zmq_msg_data (&msg)), a_[i].iov_len); // Assume zmq_socket ZMQ_RVCMORE is properly set. recvmore = ((zmq::msg_t*) (void *) &msg)->flags () & zmq::msg_t::more; rc = zmq_msg_close(&msg); errno_assert (rc == 0); ++*count_; ++nread; } return nread; } // Message manipulators. int zmq_msg_init (zmq_msg_t *msg_) { return ((zmq::msg_t*) msg_)->init (); } int zmq_msg_init_size (zmq_msg_t *msg_, size_t size_) { return ((zmq::msg_t*) msg_)->init_size (size_); } int zmq_msg_init_data (zmq_msg_t *msg_, void *data_, size_t size_, zmq_free_fn *ffn_, void *hint_) { return ((zmq::msg_t*) msg_)->init_data (data_, size_, ffn_, hint_); } int zmq_msg_send (zmq_msg_t *msg_, void *s_, int flags_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; int result = s_sendmsg (s, msg_, flags_); return result; } int zmq_msg_recv (zmq_msg_t *msg_, void *s_, int flags_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } zmq::socket_base_t *s = (zmq::socket_base_t *) s_; int result = s_recvmsg (s, msg_, flags_); return result; } int zmq_msg_close (zmq_msg_t *msg_) { return ((zmq::msg_t*) msg_)->close (); } int zmq_msg_move (zmq_msg_t *dest_, zmq_msg_t *src_) { return ((zmq::msg_t*) dest_)->move (*(zmq::msg_t*) src_); } int zmq_msg_copy (zmq_msg_t *dest_, zmq_msg_t *src_) { return ((zmq::msg_t*) dest_)->copy (*(zmq::msg_t*) src_); } void *zmq_msg_data (zmq_msg_t *msg_) { return ((zmq::msg_t*) msg_)->data (); } size_t zmq_msg_size (zmq_msg_t *msg_) { return ((zmq::msg_t*) msg_)->size (); } int zmq_msg_more (zmq_msg_t *msg_) { return zmq_msg_get (msg_, ZMQ_MORE); } int zmq_msg_get (zmq_msg_t *msg_, int option_) { switch (option_) { case ZMQ_MORE: return (((zmq::msg_t*) msg_)->flags () & zmq::msg_t::more)? 1: 0; default: errno = EINVAL; return -1; } } int zmq_msg_set (zmq_msg_t *, int, int) { // No options supported at present errno = EINVAL; return -1; } // Polling. int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) { #if defined ZMQ_POLL_BASED_ON_POLL if (unlikely (nitems_ < 0)) { errno = EINVAL; return -1; } if (unlikely (nitems_ == 0)) { if (timeout_ == 0) return 0; #if defined ZMQ_HAVE_WINDOWS Sleep (timeout_ > 0 ? timeout_ : INFINITE); return 0; #elif defined ZMQ_HAVE_ANDROID usleep (timeout_ * 1000); return 0; #else return usleep (timeout_ * 1000); #endif } if (!items_) { errno = EFAULT; return -1; } zmq::clock_t clock; uint64_t now = 0; uint64_t end = 0; pollfd spollfds[ZMQ_POLLITEMS_DFLT]; pollfd *pollfds = spollfds; if (nitems_ > ZMQ_POLLITEMS_DFLT) { pollfds = (pollfd*) malloc (nitems_ * sizeof (pollfd)); alloc_assert (pollfds); } // Build pollset for poll () system call. for (int i = 0; i != nitems_; i++) { // If the poll item is a 0MQ socket, we poll on the file descriptor // retrieved by the ZMQ_FD socket option. if (items_ [i].socket) { size_t zmq_fd_size = sizeof (zmq::fd_t); if (zmq_getsockopt (items_ [i].socket, ZMQ_FD, &pollfds [i].fd, &zmq_fd_size) == -1) { if (pollfds != spollfds) free (pollfds); return -1; } pollfds [i].events = items_ [i].events ? POLLIN : 0; } // Else, the poll item is a raw file descriptor. Just convert the // events to normal POLLIN/POLLOUT for poll (). else { pollfds [i].fd = items_ [i].fd; pollfds [i].events = (items_ [i].events & ZMQ_POLLIN ? POLLIN : 0) | (items_ [i].events & ZMQ_POLLOUT ? POLLOUT : 0); } } bool first_pass = true; int nevents = 0; while (true) { // Compute the timeout for the subsequent poll. int timeout; if (first_pass) timeout = 0; else if (timeout_ < 0) timeout = -1; else timeout = end - now; // Wait for events. while (true) { int rc = poll (pollfds, nitems_, timeout); if (rc == -1 && errno == EINTR) { if (pollfds != spollfds) free (pollfds); return -1; } errno_assert (rc >= 0); break; } // Check for the events. for (int i = 0; i != nitems_; i++) { items_ [i].revents = 0; // The poll item is a 0MQ socket. Retrieve pending events // using the ZMQ_EVENTS socket option. if (items_ [i].socket) { size_t zmq_events_size = sizeof (uint32_t); uint32_t zmq_events; if (zmq_getsockopt (items_ [i].socket, ZMQ_EVENTS, &zmq_events, &zmq_events_size) == -1) { if (pollfds != spollfds) free (pollfds); return -1; } if ((items_ [i].events & ZMQ_POLLOUT) && (zmq_events & ZMQ_POLLOUT)) items_ [i].revents |= ZMQ_POLLOUT; if ((items_ [i].events & ZMQ_POLLIN) && (zmq_events & ZMQ_POLLIN)) items_ [i].revents |= ZMQ_POLLIN; } // Else, the poll item is a raw file descriptor, simply convert // the events to zmq_pollitem_t-style format. else { if (pollfds [i].revents & POLLIN) items_ [i].revents |= ZMQ_POLLIN; if (pollfds [i].revents & POLLOUT) items_ [i].revents |= ZMQ_POLLOUT; if (pollfds [i].revents & ~(POLLIN | POLLOUT)) items_ [i].revents |= ZMQ_POLLERR; } if (items_ [i].revents) nevents++; } // If timout is zero, exit immediately whether there are events or not. if (timeout_ == 0) break; // If there are events to return, we can exit immediately. if (nevents) break; // At this point we are meant to wait for events but there are none. // If timeout is infinite we can just loop until we get some events. if (timeout_ < 0) { if (first_pass) first_pass = false; continue; } // The timeout is finite and there are no events. In the first pass // we get a timestamp of when the polling have begun. (We assume that // first pass have taken negligible time). We also compute the time // when the polling should time out. if (first_pass) { now = clock.now_ms (); end = now + timeout_; if (now == end) break; first_pass = false; continue; } // Find out whether timeout have expired. now = clock.now_ms (); if (now >= end) break; } if (pollfds != spollfds) free (pollfds); return nevents; #elif defined ZMQ_POLL_BASED_ON_SELECT if (unlikely (nitems_ < 0)) { errno = EINVAL; return -1; } if (unlikely (nitems_ == 0)) { if (timeout_ == 0) return 0; #if defined ZMQ_HAVE_WINDOWS Sleep (timeout_ > 0 ? timeout_ : INFINITE); return 0; #else return usleep (timeout_ * 1000); #endif } zmq::clock_t clock; uint64_t now = 0; uint64_t end = 0; // Ensure we do not attempt to select () on more than FD_SETSIZE // file descriptors. zmq_assert (nitems_ <= FD_SETSIZE); fd_set pollset_in; FD_ZERO (&pollset_in); fd_set pollset_out; FD_ZERO (&pollset_out); fd_set pollset_err; FD_ZERO (&pollset_err); zmq::fd_t maxfd = 0; // Build the fd_sets for passing to select (). for (int i = 0; i != nitems_; i++) { // If the poll item is a 0MQ socket we are interested in input on the // notification file descriptor retrieved by the ZMQ_FD socket option. if (items_ [i].socket) { size_t zmq_fd_size = sizeof (zmq::fd_t); zmq::fd_t notify_fd; if (zmq_getsockopt (items_ [i].socket, ZMQ_FD, ¬ify_fd, &zmq_fd_size) == -1) return -1; if (items_ [i].events) { FD_SET (notify_fd, &pollset_in); if (maxfd < notify_fd) maxfd = notify_fd; } } // Else, the poll item is a raw file descriptor. Convert the poll item // events to the appropriate fd_sets. else { if (items_ [i].events & ZMQ_POLLIN) FD_SET (items_ [i].fd, &pollset_in); if (items_ [i].events & ZMQ_POLLOUT) FD_SET (items_ [i].fd, &pollset_out); if (items_ [i].events & ZMQ_POLLERR) FD_SET (items_ [i].fd, &pollset_err); if (maxfd < items_ [i].fd) maxfd = items_ [i].fd; } } bool first_pass = true; int nevents = 0; fd_set inset, outset, errset; while (true) { // Compute the timeout for the subsequent poll. timeval timeout; timeval *ptimeout; if (first_pass) { timeout.tv_sec = 0; timeout.tv_usec = 0; ptimeout = &timeout; } else if (timeout_ < 0) ptimeout = NULL; else { timeout.tv_sec = (long) ((end - now) / 1000); timeout.tv_usec = (long) ((end - now) % 1000 * 1000); ptimeout = &timeout; } // Wait for events. Ignore interrupts if there's infinite timeout. while (true) { memcpy (&inset, &pollset_in, sizeof (fd_set)); memcpy (&outset, &pollset_out, sizeof (fd_set)); memcpy (&errset, &pollset_err, sizeof (fd_set)); #if defined ZMQ_HAVE_WINDOWS int rc = select (0, &inset, &outset, &errset, ptimeout); if (unlikely (rc == SOCKET_ERROR)) { errno = zmq::wsa_error_to_errno (WSAGetLastError ()); wsa_assert (errno == ENOTSOCK); return -1; } #else int rc = select (maxfd + 1, &inset, &outset, &errset, ptimeout); if (unlikely (rc == -1)) { errno_assert (errno == EINTR || errno == EBADF); return -1; } #endif break; } // Check for the events. for (int i = 0; i != nitems_; i++) { items_ [i].revents = 0; // The poll item is a 0MQ socket. Retrieve pending events // using the ZMQ_EVENTS socket option. if (items_ [i].socket) { size_t zmq_events_size = sizeof (uint32_t); uint32_t zmq_events; if (zmq_getsockopt (items_ [i].socket, ZMQ_EVENTS, &zmq_events, &zmq_events_size) == -1) return -1; if ((items_ [i].events & ZMQ_POLLOUT) && (zmq_events & ZMQ_POLLOUT)) items_ [i].revents |= ZMQ_POLLOUT; if ((items_ [i].events & ZMQ_POLLIN) && (zmq_events & ZMQ_POLLIN)) items_ [i].revents |= ZMQ_POLLIN; } // Else, the poll item is a raw file descriptor, simply convert // the events to zmq_pollitem_t-style format. else { if (FD_ISSET (items_ [i].fd, &inset)) items_ [i].revents |= ZMQ_POLLIN; if (FD_ISSET (items_ [i].fd, &outset)) items_ [i].revents |= ZMQ_POLLOUT; if (FD_ISSET (items_ [i].fd, &errset)) items_ [i].revents |= ZMQ_POLLERR; } if (items_ [i].revents) nevents++; } // If timout is zero, exit immediately whether there are events or not. if (timeout_ == 0) break; // If there are events to return, we can exit immediately. if (nevents) break; // At this point we are meant to wait for events but there are none. // If timeout is infinite we can just loop until we get some events. if (timeout_ < 0) { if (first_pass) first_pass = false; continue; } // The timeout is finite and there are no events. In the first pass // we get a timestamp of when the polling have begun. (We assume that // first pass have taken negligible time). We also compute the time // when the polling should time out. if (first_pass) { now = clock.now_ms (); end = now + timeout_; if (now == end) break; first_pass = false; continue; } // Find out whether timeout have expired. now = clock.now_ms (); if (now >= end) break; } return nevents; #else // Exotic platforms that support neither poll() nor select(). errno = ENOTSUP; return -1; #endif } #if defined ZMQ_POLL_BASED_ON_SELECT #undef ZMQ_POLL_BASED_ON_SELECT #endif #if defined ZMQ_POLL_BASED_ON_POLL #undef ZMQ_POLL_BASED_ON_POLL #endif // The proxy functionality int zmq_proxy (void *frontend_, void *backend_, void *control_) { if (!frontend_ || !backend_) { errno = EFAULT; return -1; } return zmq::proxy ( (zmq::socket_base_t*) frontend_, (zmq::socket_base_t*) backend_, (zmq::socket_base_t*) control_); } // The deprecated device functionality int zmq_device (int /* type */, void *frontend_, void *backend_) { return zmq::proxy ( (zmq::socket_base_t*) frontend_, (zmq::socket_base_t*) backend_, NULL); } zeromq3-4.0.4+dfsg.orig/src/lb.cpp0000644000175000017500000000715612240736636015645 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "lb.hpp" #include "pipe.hpp" #include "err.hpp" #include "msg.hpp" zmq::lb_t::lb_t () : active (0), current (0), more (false), dropping (false) { } zmq::lb_t::~lb_t () { zmq_assert (pipes.empty ()); } void zmq::lb_t::attach (pipe_t *pipe_) { pipes.push_back (pipe_); activated (pipe_); } void zmq::lb_t::pipe_terminated (pipe_t *pipe_) { pipes_t::size_type index = pipes.index (pipe_); // If we are in the middle of multipart message and current pipe // have disconnected, we have to drop the remainder of the message. if (index == current && more) dropping = true; // Remove the pipe from the list; adjust number of active pipes // accordingly. if (index < active) { active--; pipes.swap (index, active); if (current == active) current = 0; } pipes.erase (pipe_); } void zmq::lb_t::activated (pipe_t *pipe_) { // Move the pipe to the list of active pipes. pipes.swap (pipes.index (pipe_), active); active++; } int zmq::lb_t::send (msg_t *msg_) { return sendpipe (msg_, NULL); } int zmq::lb_t::sendpipe (msg_t *msg_, pipe_t **pipe_) { // Drop the message if required. If we are at the end of the message // switch back to non-dropping mode. if (dropping) { more = msg_->flags () & msg_t::more ? true : false; dropping = more; int rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); return 0; } while (active > 0) { if (pipes [current]->write (msg_)) { if (pipe_) *pipe_ = pipes [current]; break; } zmq_assert (!more); active--; if (current < active) pipes.swap (current, active); else current = 0; } // If there are no pipes we cannot send the message. if (active == 0) { errno = EAGAIN; return -1; } // If it's final part of the message we can flush it downstream and // continue round-robining (load balance). more = msg_->flags () & msg_t::more? true: false; if (!more) { pipes [current]->flush (); current = (current + 1) % active; } // Detach the message from the data buffer. int rc = msg_->init (); errno_assert (rc == 0); return 0; } bool zmq::lb_t::has_out () { // If one part of the message was already written we can definitely // write the rest of the message. if (more) return true; while (active > 0) { // Check whether a pipe has room for another message. if (pipes [current]->check_write ()) return true; // Deactivate the pipe. active--; pipes.swap (current, active); if (current == active) current = 0; } return false; } zeromq3-4.0.4+dfsg.orig/src/devpoll.cpp0000644000175000017500000001177012240736636016712 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "devpoll.hpp" #if defined ZMQ_USE_DEVPOLL #include #include #include #include #include #include #include #include #include #include "devpoll.hpp" #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" zmq::devpoll_t::devpoll_t () : stopping (false) { devpoll_fd = open ("/dev/poll", O_RDWR); errno_assert (devpoll_fd != -1); } zmq::devpoll_t::~devpoll_t () { worker.stop (); close (devpoll_fd); } void zmq::devpoll_t::devpoll_ctl (fd_t fd_, short events_) { struct pollfd pfd = {fd_, events_, 0}; ssize_t rc = write (devpoll_fd, &pfd, sizeof pfd); zmq_assert (rc == sizeof pfd); } zmq::devpoll_t::handle_t zmq::devpoll_t::add_fd (fd_t fd_, i_poll_events *reactor_) { // If the file descriptor table is too small expand it. fd_table_t::size_type sz = fd_table.size (); if (sz <= (fd_table_t::size_type) fd_) { fd_table.resize (fd_ + 1); while (sz != (fd_table_t::size_type) (fd_ + 1)) { fd_table [sz].valid = false; ++sz; } } zmq_assert (!fd_table [fd_].valid); fd_table [fd_].events = 0; fd_table [fd_].reactor = reactor_; fd_table [fd_].valid = true; fd_table [fd_].accepted = false; devpoll_ctl (fd_, 0); pending_list.push_back (fd_); // Increase the load metric of the thread. adjust_load (1); return fd_; } void zmq::devpoll_t::rm_fd (handle_t handle_) { zmq_assert (fd_table [handle_].valid); devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].valid = false; // Decrease the load metric of the thread. adjust_load (-1); } void zmq::devpoll_t::set_pollin (handle_t handle_) { devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].events |= POLLIN; devpoll_ctl (handle_, fd_table [handle_].events); } void zmq::devpoll_t::reset_pollin (handle_t handle_) { devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].events &= ~((short) POLLIN); devpoll_ctl (handle_, fd_table [handle_].events); } void zmq::devpoll_t::set_pollout (handle_t handle_) { devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].events |= POLLOUT; devpoll_ctl (handle_, fd_table [handle_].events); } void zmq::devpoll_t::reset_pollout (handle_t handle_) { devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].events &= ~((short) POLLOUT); devpoll_ctl (handle_, fd_table [handle_].events); } void zmq::devpoll_t::start () { worker.start (worker_routine, this); } void zmq::devpoll_t::stop () { stopping = true; } int zmq::devpoll_t::max_fds () { return -1; } void zmq::devpoll_t::loop () { while (!stopping) { struct pollfd ev_buf [max_io_events]; struct dvpoll poll_req; for (pending_list_t::size_type i = 0; i < pending_list.size (); i ++) fd_table [pending_list [i]].accepted = true; pending_list.clear (); // Execute any due timers. int timeout = (int) execute_timers (); // Wait for events. // On Solaris, we can retrieve no more then (OPEN_MAX - 1) events. poll_req.dp_fds = &ev_buf [0]; #if defined ZMQ_HAVE_SOLARIS poll_req.dp_nfds = std::min ((int) max_io_events, OPEN_MAX - 1); #else poll_req.dp_nfds = max_io_events; #endif poll_req.dp_timeout = timeout ? timeout : -1; int n = ioctl (devpoll_fd, DP_POLL, &poll_req); if (n == -1 && errno == EINTR) continue; errno_assert (n != -1); for (int i = 0; i < n; i ++) { fd_entry_t *fd_ptr = &fd_table [ev_buf [i].fd]; if (!fd_ptr->valid || !fd_ptr->accepted) continue; if (ev_buf [i].revents & (POLLERR | POLLHUP)) fd_ptr->reactor->in_event (); if (!fd_ptr->valid || !fd_ptr->accepted) continue; if (ev_buf [i].revents & POLLOUT) fd_ptr->reactor->out_event (); if (!fd_ptr->valid || !fd_ptr->accepted) continue; if (ev_buf [i].revents & POLLIN) fd_ptr->reactor->in_event (); } } } void zmq::devpoll_t::worker_routine (void *arg_) { ((devpoll_t*) arg_)->loop (); } #endif zeromq3-4.0.4+dfsg.orig/src/tcp_address.cpp0000644000175000017500000004225512240736636017542 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "tcp_address.hpp" #include "platform.hpp" #include "stdint.hpp" #include "err.hpp" #include "ip.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #endif // Some platforms (notably Darwin/OSX and NetBSD) do not define all AI_ // flags for getaddrinfo(). This can be worked around safely by defining // these to 0. #ifndef AI_ADDRCONFIG #define AI_ADDRCONFIG 0 #endif #if defined ZMQ_HAVE_SOLARIS #include #include #include #include // On Solaris platform, network interface name can be queried by ioctl. int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_) { // TODO: Unused parameter, IPv6 support not implemented for Solaris. (void) ipv6_; // Create a socket. int fd = open_socket (AF_INET, SOCK_DGRAM, 0); errno_assert (fd != -1); // Retrieve number of interfaces. lifnum ifn; ifn.lifn_family = AF_INET; ifn.lifn_flags = 0; int rc = ioctl (fd, SIOCGLIFNUM, (char*) &ifn); errno_assert (rc != -1); // Allocate memory to get interface names. size_t ifr_size = sizeof (struct lifreq) * ifn.lifn_count; char *ifr = (char*) malloc (ifr_size); alloc_assert (ifr); // Retrieve interface names. lifconf ifc; ifc.lifc_family = AF_INET; ifc.lifc_flags = 0; ifc.lifc_len = ifr_size; ifc.lifc_buf = ifr; rc = ioctl (fd, SIOCGLIFCONF, (char*) &ifc); errno_assert (rc != -1); // Find the interface with the specified name and AF_INET family. bool found = false; lifreq *ifrp = ifc.lifc_req; for (int n = 0; n < (int) (ifc.lifc_len / sizeof (lifreq)); n ++, ifrp ++) { if (!strcmp (nic_, ifrp->lifr_name)) { rc = ioctl (fd, SIOCGLIFADDR, (char*) ifrp); errno_assert (rc != -1); if (ifrp->lifr_addr.ss_family == AF_INET) { address.ipv4 = *(sockaddr_in*) &ifrp->lifr_addr; found = true; break; } } } // Clean-up. free (ifr); close (fd); if (!found) { errno = ENODEV; return -1; } return 0; } #elif defined ZMQ_HAVE_AIX || defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_ANDROID #include #include #include #include int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_) { // TODO: Unused parameter, IPv6 support not implemented for AIX or HP/UX. (void) ipv6_; // Create a socket. int sd = open_socket (AF_INET, SOCK_DGRAM, 0); errno_assert (sd != -1); struct ifreq ifr; // Copy interface name for ioctl get. strncpy (ifr.ifr_name, nic_, sizeof (ifr.ifr_name)); // Fetch interface address. int rc = ioctl (sd, SIOCGIFADDR, (caddr_t) &ifr, sizeof (struct ifreq)); // Clean up. close (sd); if (rc == -1) { errno = ENODEV; return -1; } memcpy (&address.ipv4.sin_addr, &((sockaddr_in*) &ifr.ifr_addr)->sin_addr, sizeof (in_addr)); return 0; } #elif ((defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_OPENBSD ||\ defined ZMQ_HAVE_QNXNTO || defined ZMQ_HAVE_NETBSD)\ && defined ZMQ_HAVE_IFADDRS) #include // On these platforms, network interface name can be queried // using getifaddrs function. int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_) { // Get the addresses. ifaddrs *ifa = NULL; int rc = getifaddrs (&ifa); errno_assert (rc == 0); zmq_assert (ifa != NULL); // Find the corresponding network interface. bool found = false; for (ifaddrs *ifp = ifa; ifp != NULL ;ifp = ifp->ifa_next) { if (ifp->ifa_addr == NULL) continue; int family = ifp->ifa_addr->sa_family; if ((family == AF_INET || (ipv6_ && family == AF_INET6)) && !strcmp (nic_, ifp->ifa_name)) { memcpy (&address, ifp->ifa_addr, (family == AF_INET) ? sizeof (struct sockaddr_in) : sizeof (struct sockaddr_in6)); found = true; break; } } // Clean-up; freeifaddrs (ifa); if (!found) { errno = ENODEV; return -1; } return 0; } #else // On other platforms we assume there are no sane interface names. // This is true especially of Windows. int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_) { // All unused parameters. (void) nic_; (void) ipv6_; errno = ENODEV; return -1; } #endif int zmq::tcp_address_t::resolve_interface (const char *interface_, bool ipv6_) { // Initialize temporary output pointers with storage address. sockaddr_storage ss; sockaddr *out_addr = (sockaddr*) &ss; size_t out_addrlen; // Initialise IP-format family/port and populate temporary output pointers // with the address. if (ipv6_) { sockaddr_in6 ip6_addr; memset (&ip6_addr, 0, sizeof (ip6_addr)); ip6_addr.sin6_family = AF_INET6; memcpy (&ip6_addr.sin6_addr, &in6addr_any, sizeof (in6addr_any)); out_addrlen = sizeof ip6_addr; memcpy (out_addr, &ip6_addr, out_addrlen); } else { sockaddr_in ip4_addr; memset (&ip4_addr, 0, sizeof (ip4_addr)); ip4_addr.sin_family = AF_INET; ip4_addr.sin_addr.s_addr = htonl (INADDR_ANY); out_addrlen = sizeof ip4_addr; memcpy (out_addr, &ip4_addr, out_addrlen); } // "*" resolves to INADDR_ANY or in6addr_any. if (strcmp (interface_, "*") == 0) { zmq_assert (out_addrlen <= sizeof address); memcpy (&address, out_addr, out_addrlen); return 0; } // Try to resolve the string as a NIC name. int rc = resolve_nic_name (interface_, ipv6_); if (rc != 0 && errno != ENODEV) return rc; if (rc == 0) return 0; // There's no such interface name. Assume literal address. #if defined ZMQ_HAVE_OPENVMS && defined __ia64 __addrinfo64 *res = NULL; __addrinfo64 req; #else addrinfo *res = NULL; addrinfo req; #endif memset (&req, 0, sizeof (req)); // Choose IPv4 or IPv6 protocol family. Note that IPv6 allows for // IPv4-in-IPv6 addresses. req.ai_family = ipv6_? AF_INET6: AF_INET; // Arbitrary, not used in the output, but avoids duplicate results. req.ai_socktype = SOCK_STREAM; // Restrict hostname/service to literals to avoid any DNS lookups or // service-name irregularity due to indeterminate socktype. req.ai_flags = AI_PASSIVE | AI_NUMERICHOST; #if defined AI_V4MAPPED && !defined ZMQ_HAVE_FREEBSD // In this API we only require IPv4-mapped addresses when // no native IPv6 interfaces are available (~AI_ALL). // This saves an additional DNS roundtrip for IPv4 addresses. // Note: While the AI_V4MAPPED flag is defined on FreeBSD system, // it is not supported here. See libzmq issue #331. if (req.ai_family == AF_INET6) req.ai_flags |= AI_V4MAPPED; #endif // Resolve the literal address. Some of the error info is lost in case // of error, however, there's no way to report EAI errors via errno. rc = getaddrinfo (interface_, NULL, &req, &res); if (rc) { errno = ENODEV; return -1; } // Use the first result. zmq_assert (res != NULL); zmq_assert ((size_t) (res->ai_addrlen) <= sizeof (address)); memcpy (&address, res->ai_addr, res->ai_addrlen); // Cleanup getaddrinfo after copying the possibly referenced result. freeaddrinfo (res); return 0; } int zmq::tcp_address_t::resolve_hostname (const char *hostname_, bool ipv6_) { // Set up the query. #if defined ZMQ_HAVE_OPENVMS && defined __ia64 && __INITIAL_POINTER_SIZE == 64 __addrinfo64 req; #else addrinfo req; #endif memset (&req, 0, sizeof (req)); // Choose IPv4 or IPv6 protocol family. Note that IPv6 allows for // IPv4-in-IPv6 addresses. req.ai_family = ipv6_? AF_INET6: AF_INET; // Need to choose one to avoid duplicate results from getaddrinfo() - this // doesn't really matter, since it's not included in the addr-output. req.ai_socktype = SOCK_STREAM; #if defined AI_V4MAPPED && !defined ZMQ_HAVE_FREEBSD // In this API we only require IPv4-mapped addresses when // no native IPv6 interfaces are available. // This saves an additional DNS roundtrip for IPv4 addresses. // Note: While the AI_V4MAPPED flag is defined on FreeBSD system, // it is not supported here. See libzmq issue #331. if (req.ai_family == AF_INET6) req.ai_flags |= AI_V4MAPPED; #endif // Resolve host name. Some of the error info is lost in case of error, // however, there's no way to report EAI errors via errno. #if defined ZMQ_HAVE_OPENVMS && defined __ia64 && __INITIAL_POINTER_SIZE == 64 __addrinfo64 *res; #else addrinfo *res; #endif int rc = getaddrinfo (hostname_, NULL, &req, &res); if (rc) { switch (rc) { case EAI_MEMORY: errno = ENOMEM; break; default: errno = EINVAL; break; } return -1; } // Copy first result to output addr with hostname and service. zmq_assert ((size_t) (res->ai_addrlen) <= sizeof (address)); memcpy (&address, res->ai_addr, res->ai_addrlen); freeaddrinfo (res); return 0; } zmq::tcp_address_t::tcp_address_t () { memset (&address, 0, sizeof (address)); } zmq::tcp_address_t::tcp_address_t (const sockaddr *sa, socklen_t sa_len) { zmq_assert(sa && sa_len > 0); memset (&address, 0, sizeof (address)); if (sa->sa_family == AF_INET && sa_len >= (socklen_t) sizeof (address.ipv4)) memcpy(&address.ipv4, sa, sizeof (address.ipv4)); else if (sa->sa_family == AF_INET6 && sa_len >= (socklen_t) sizeof (address.ipv6)) memcpy(&address.ipv6, sa, sizeof (address.ipv6)); } zmq::tcp_address_t::~tcp_address_t () { } int zmq::tcp_address_t::resolve (const char *name_, bool local_, bool ipv6_) { // Find the ':' at end that separates address from the port number. const char *delimiter = strrchr (name_, ':'); if (!delimiter) { errno = EINVAL; return -1; } // Separate the address/port. std::string addr_str (name_, delimiter - name_); std::string port_str (delimiter + 1); // Remove square brackets around the address, if any. if (addr_str.size () >= 2 && addr_str [0] == '[' && addr_str [addr_str.size () - 1] == ']') addr_str = addr_str.substr (1, addr_str.size () - 2); // Allow 0 specifically, to detect invalid port error in atoi if not uint16_t port; if (port_str == "*" || port_str == "0") // Resolve wildcard to 0 to allow autoselection of port port = 0; else { // Parse the port number (0 is not a valid port). port = (uint16_t) atoi (port_str.c_str ()); if (port == 0) { errno = EINVAL; return -1; } } // Resolve the IP address. int rc; if (local_) rc = resolve_interface (addr_str.c_str (), ipv6_); else rc = resolve_hostname (addr_str.c_str (), ipv6_); if (rc != 0) return -1; // Set the port into the address structure. if (address.generic.sa_family == AF_INET6) address.ipv6.sin6_port = htons (port); else address.ipv4.sin_port = htons (port); return 0; } int zmq::tcp_address_t::to_string (std::string &addr_) { if (address.generic.sa_family != AF_INET && address.generic.sa_family != AF_INET6) { addr_.clear (); return -1; } // not using service resolv because of https://github.com/zeromq/libzmq/commit/1824574f9b5a8ce786853320e3ea09fe1f822bc4 char hbuf[NI_MAXHOST]; int rc = getnameinfo (addr (), addrlen (), hbuf, sizeof (hbuf), NULL, 0, NI_NUMERICHOST); if (rc != 0) { addr_.clear (); return rc; } if (address.generic.sa_family == AF_INET6) { std::stringstream s; s << "tcp://[" << hbuf << "]:" << ntohs (address.ipv6.sin6_port); addr_ = s.str (); } else { std::stringstream s; s << "tcp://" << hbuf << ":" << ntohs (address.ipv4.sin_port); addr_ = s.str (); }; return 0; } const sockaddr *zmq::tcp_address_t::addr () const { return &address.generic; } socklen_t zmq::tcp_address_t::addrlen () const { if (address.generic.sa_family == AF_INET6) return (socklen_t) sizeof (address.ipv6); else return (socklen_t) sizeof (address.ipv4); } #if defined ZMQ_HAVE_WINDOWS unsigned short zmq::tcp_address_t::family () const #else sa_family_t zmq::tcp_address_t::family () const #endif { return address.generic.sa_family; } zmq::tcp_address_mask_t::tcp_address_mask_t () : tcp_address_t () { address_mask = -1; } int zmq::tcp_address_mask_t::mask () const { return address_mask; } int zmq::tcp_address_mask_t::resolve (const char *name_, bool ipv6_) { // Find '/' at the end that separates address from the cidr mask number. // Allow empty mask clause and threat it like '/32' for ipv4 or '/128' for ipv6. std::string addr_str, mask_str; const char *delimiter = strrchr (name_, '/'); if (delimiter != NULL) { addr_str.assign (name_, delimiter - name_); mask_str.assign (delimiter + 1); if (mask_str.empty ()) { errno = EINVAL; return -1; } } else addr_str.assign (name_); // Parse address part using standard routines. int rc = tcp_address_t::resolve_hostname (addr_str.c_str (), ipv6_); if (rc != 0) return rc; // Parse the cidr mask number. if (mask_str.empty ()) { if (address.generic.sa_family == AF_INET6) address_mask = 128; else address_mask = 32; } else if (mask_str == "0") { address_mask = 0; } else { int mask = atoi (mask_str.c_str ()); if ( (mask < 1) || (address.generic.sa_family == AF_INET6 && mask > 128) || (address.generic.sa_family != AF_INET6 && mask > 32) ) { errno = EINVAL; return -1; } address_mask = mask; } return 0; } int zmq::tcp_address_mask_t::to_string (std::string &addr_) { if (address.generic.sa_family != AF_INET && address.generic.sa_family != AF_INET6) { addr_.clear (); return -1; } if (address_mask == -1) { addr_.clear (); return -1; } char hbuf[NI_MAXHOST]; int rc = getnameinfo (addr (), addrlen (), hbuf, sizeof (hbuf), NULL, 0, NI_NUMERICHOST); if (rc != 0) { addr_.clear (); return rc; } if (address.generic.sa_family == AF_INET6) { std::stringstream s; s << "[" << hbuf << "]/" << address_mask; addr_ = s.str (); } else { std::stringstream s; s << hbuf << "/" << address_mask; addr_ = s.str (); }; return 0; } bool zmq::tcp_address_mask_t::match_address (const struct sockaddr *ss, const socklen_t ss_len) const { zmq_assert (address_mask != -1 && ss != NULL && ss_len >= (socklen_t) sizeof (struct sockaddr)); if (ss->sa_family != address.generic.sa_family) return false; if (address_mask > 0) { int mask; const uint8_t *our_bytes, *their_bytes; if (ss->sa_family == AF_INET6) { zmq_assert (ss_len == sizeof (struct sockaddr_in6)); their_bytes = (const uint8_t *) &(((const struct sockaddr_in6 *) ss)->sin6_addr); our_bytes = (const uint8_t *) &address.ipv6.sin6_addr; mask = sizeof (struct in6_addr) * 8; } else { zmq_assert (ss_len == sizeof (struct sockaddr_in)); their_bytes = (const uint8_t *) &(((const struct sockaddr_in *) ss)->sin_addr); our_bytes = (const uint8_t *) &address.ipv4.sin_addr; mask = sizeof (struct in_addr) * 8; } if (address_mask < mask) mask = address_mask; size_t full_bytes = mask / 8; if (memcmp(our_bytes, their_bytes, full_bytes)) return false; uint8_t last_byte_bits = (0xffU << (8 - (mask % 8))) & 0xffU; if (last_byte_bits) { if ((their_bytes[full_bytes] & last_byte_bits) != (our_bytes[full_bytes] & last_byte_bits)) return false; } } return true; } zeromq3-4.0.4+dfsg.orig/src/tcp_connecter.hpp0000644000175000017500000000716712240736636020105 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __TCP_CONNECTER_HPP_INCLUDED__ #define __TCP_CONNECTER_HPP_INCLUDED__ #include "fd.hpp" #include "own.hpp" #include "stdint.hpp" #include "io_object.hpp" #include "../include/zmq.h" namespace zmq { class io_thread_t; class session_base_t; struct address_t; class tcp_connecter_t : public own_t, public io_object_t { public: // If 'delayed_start' is true connecter first waits for a while, // then starts connection process. tcp_connecter_t (zmq::io_thread_t *io_thread_, zmq::session_base_t *session_, const options_t &options_, const address_t *addr_, bool delayed_start_); ~tcp_connecter_t (); private: // ID of the timer used to delay the reconnection. enum {reconnect_timer_id = 1}; // Handlers for incoming commands. void process_plug (); void process_term (int linger_); // Handlers for I/O events. void in_event (); void out_event (); void timer_event (int id_); // Internal function to start the actual connection establishment. void start_connecting (); // Internal function to add a reconnect timer void add_reconnect_timer(); // Internal function to return a reconnect backoff delay. // Will modify the current_reconnect_ivl used for next call // Returns the currently used interval int get_new_reconnect_ivl (); // Open TCP connecting socket. Returns -1 in case of error, // 0 if connect was successfull immediately. Returns -1 with // EAGAIN errno if async connect was launched. int open (); // Close the connecting socket. void close (); // Get the file descriptor of newly created connection. Returns // retired_fd if the connection was unsuccessfull. fd_t connect (); // Address to connect to. Owned by session_base_t. const address_t *addr; // Underlying socket. fd_t s; // Handle corresponding to the listening socket. handle_t handle; // If true file descriptor is registered with the poller and 'handle' // contains valid value. bool handle_valid; // If true, connecter is waiting a while before trying to connect. const bool delayed_start; // True iff a timer has been started. bool timer_started; // Reference to the session we belong to. zmq::session_base_t *session; // Current reconnect ivl, updated for backoff strategy int current_reconnect_ivl; // String representation of endpoint to connect to std::string endpoint; // Socket zmq::socket_base_t *socket; tcp_connecter_t (const tcp_connecter_t&); const tcp_connecter_t &operator = (const tcp_connecter_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/Makefile.am0000644000175000017500000000731212307430611016556 0ustar ghedoghedolib_LTLIBRARIES = libzmq.la pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libzmq.pc include_HEADERS = ../include/zmq.h ../include/zmq_utils.h libzmq_la_SOURCES = \ address.hpp \ array.hpp \ atomic_counter.hpp \ atomic_ptr.hpp \ blob.hpp \ clock.hpp \ command.hpp \ config.hpp \ ctx.hpp \ curve_client.hpp \ curve_server.hpp \ decoder.hpp \ devpoll.hpp \ dist.hpp \ encoder.hpp \ epoll.hpp \ err.hpp \ fd.hpp \ fq.hpp \ i_encoder.hpp \ i_decoder.hpp \ i_engine.hpp \ i_poll_events.hpp \ io_object.hpp \ io_thread.hpp \ ip.hpp \ ipc_address.hpp \ ipc_connecter.hpp \ ipc_listener.hpp \ i_engine.hpp \ i_poll_events.hpp \ kqueue.hpp \ lb.hpp \ likely.hpp \ mailbox.hpp \ mechanism.hpp \ msg.hpp \ mtrie.hpp \ mutex.hpp \ null_mechanism.hpp \ object.hpp \ options.hpp \ own.hpp \ pgm_receiver.hpp \ pgm_sender.hpp \ pgm_socket.hpp \ pipe.hpp \ plain_mechanism.hpp \ platform.hpp \ poll.hpp \ poller.hpp \ poller_base.hpp \ pair.hpp \ proxy.hpp \ pub.hpp \ pull.hpp \ push.hpp \ random.hpp \ reaper.hpp \ rep.hpp \ req.hpp \ select.hpp \ session_base.hpp \ signaler.hpp \ socket_base.hpp \ stdint.hpp \ stream.hpp \ stream_engine.hpp \ sub.hpp \ tcp.hpp \ tcp_address.hpp \ tcp_connecter.hpp \ tcp_listener.hpp \ thread.hpp \ trie.hpp \ windows.hpp \ wire.hpp \ xpub.hpp \ router.hpp \ dealer.hpp \ xsub.hpp \ ypipe.hpp \ ypipe_base.hpp \ yqueue.hpp \ address.cpp \ clock.cpp \ ctx.cpp \ curve_client.cpp \ curve_server.cpp \ devpoll.cpp \ dist.cpp \ epoll.cpp \ err.cpp \ fq.cpp \ io_object.cpp \ io_thread.cpp \ ip.cpp \ ipc_address.cpp \ ipc_connecter.cpp \ ipc_listener.cpp \ kqueue.cpp \ lb.cpp \ mailbox.cpp \ mechanism.cpp \ msg.cpp \ mtrie.cpp \ null_mechanism.cpp \ object.cpp \ options.cpp \ own.cpp \ pair.cpp \ pgm_receiver.cpp \ pgm_sender.cpp \ pgm_socket.cpp \ pipe.cpp \ plain_mechanism.cpp \ poll.cpp \ poller_base.cpp \ pull.cpp \ push.cpp \ proxy.cpp \ reaper.cpp \ pub.cpp \ random.cpp \ rep.cpp \ req.cpp \ select.cpp \ session_base.cpp \ signaler.cpp \ socket_base.cpp \ stream.cpp \ stream_engine.cpp \ sub.cpp \ tcp.cpp \ tcp_address.cpp \ tcp_connecter.cpp \ tcp_listener.cpp \ thread.cpp \ trie.cpp \ xpub.cpp \ router.cpp \ dealer.cpp \ v1_decoder.cpp \ v1_encoder.cpp \ v1_decoder.hpp \ v1_encoder.hpp \ v2_decoder.cpp \ v2_decoder.hpp \ v2_encoder.cpp \ v2_encoder.hpp \ v2_protocol.hpp \ xsub.cpp \ zmq.cpp \ zmq_utils.cpp \ raw_decoder.hpp \ raw_decoder.cpp \ raw_encoder.hpp \ raw_encoder.cpp \ ypipe_conflate.hpp \ dbuffer.hpp if ON_MINGW libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ else if ON_ANDROID libzmq_la_LDFLAGS = -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ else if ON_LINUX libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl,--version-script=$(srcdir)/libzmq.vers else libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ -Wl endif endif endif EXTRA_DIST = libzmq.vers libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ if BUILD_PGM libzmq_la_CPPFLAGS = -I$(top_srcdir)/@pgm_srcdir@/include/ libzmq_la_LIBADD = $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la endif dist-hook: -rm $(distdir)/platform.hpp zeromq3-4.0.4+dfsg.orig/src/curve_client.hpp0000644000175000017500000000557612240736636017743 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_CURVE_CLIENT_HPP_INCLUDED__ #define __ZMQ_CURVE_CLIENT_HPP_INCLUDED__ #include "platform.hpp" #ifdef HAVE_LIBSODIUM #include #if crypto_box_NONCEBYTES != 24 \ || crypto_box_PUBLICKEYBYTES != 32 \ || crypto_box_SECRETKEYBYTES != 32 \ || crypto_box_ZEROBYTES != 32 \ || crypto_box_BOXZEROBYTES != 16 #error "libsodium not built properly" #endif #include "mechanism.hpp" #include "options.hpp" namespace zmq { class msg_t; class session_base_t; class curve_client_t : public mechanism_t { public: curve_client_t (const options_t &options_); virtual ~curve_client_t (); // mechanism implementation virtual int next_handshake_command (msg_t *msg_); virtual int process_handshake_command (msg_t *msg_); virtual int encode (msg_t *msg_); virtual int decode (msg_t *msg_); virtual bool is_handshake_complete () const; private: enum state_t { send_hello, expect_welcome, send_initiate, expect_ready, connected }; // Current FSM state state_t state; // Our public key (C) uint8_t public_key [crypto_box_PUBLICKEYBYTES]; // Our secret key (c) uint8_t secret_key [crypto_box_SECRETKEYBYTES]; // Our short-term public key (C') uint8_t cn_public [crypto_box_PUBLICKEYBYTES]; // Our short-term secret key (c') uint8_t cn_secret [crypto_box_SECRETKEYBYTES]; // Server's public key (S) uint8_t server_key [crypto_box_PUBLICKEYBYTES]; // Server's short-term public key (S') uint8_t cn_server [crypto_box_PUBLICKEYBYTES]; // Cookie received from server uint8_t cn_cookie [16 + 80]; // Intermediary buffer used to seepd up boxing and unboxing. uint8_t cn_precom [crypto_box_BEFORENMBYTES]; // Nonce uint64_t cn_nonce; int produce_hello (msg_t *msg_); int process_welcome (msg_t *msg_); int produce_initiate (msg_t *msg_); int process_ready (msg_t *msg_); }; } #endif #endif zeromq3-4.0.4+dfsg.orig/src/xpub.cpp0000644000175000017500000001252412240736636016221 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "xpub.hpp" #include "pipe.hpp" #include "err.hpp" #include "msg.hpp" zmq::xpub_t::xpub_t (class ctx_t *parent_, uint32_t tid_, int sid_) : socket_base_t (parent_, tid_, sid_), verbose(false), more (false) { options.type = ZMQ_XPUB; } zmq::xpub_t::~xpub_t () { } void zmq::xpub_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { zmq_assert (pipe_); dist.attach (pipe_); // If subscribe_to_all_ is specified, the caller would like to subscribe // to all data on this pipe, implicitly. if (subscribe_to_all_) subscriptions.add (NULL, 0, pipe_); // The pipe is active when attached. Let's read the subscriptions from // it, if any. xread_activated (pipe_); } void zmq::xpub_t::xread_activated (pipe_t *pipe_) { // There are some subscriptions waiting. Let's process them. msg_t sub; while (pipe_->read (&sub)) { // Apply the subscription to the trie unsigned char *const data = (unsigned char *) sub.data (); const size_t size = sub.size (); if (size > 0 && (*data == 0 || *data == 1)) { bool unique; if (*data == 0) unique = subscriptions.rm (data + 1, size - 1, pipe_); else unique = subscriptions.add (data + 1, size - 1, pipe_); // If the subscription is not a duplicate store it so that it can be // passed to used on next recv call. (Unsubscribe is not verbose.) if (options.type == ZMQ_XPUB && (unique || (*data && verbose))) { pending_data.push_back (blob_t (data, size)); pending_flags.push_back (0); } } else { // Process user message coming upstream from xsub socket pending_data.push_back (blob_t (data, size)); pending_flags.push_back (sub.flags ()); } sub.close (); } } void zmq::xpub_t::xwrite_activated (pipe_t *pipe_) { dist.activated (pipe_); } int zmq::xpub_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { if (option_ != ZMQ_XPUB_VERBOSE) { errno = EINVAL; return -1; } if (optvallen_ != sizeof (int) || *static_cast (optval_) < 0) { errno = EINVAL; return -1; } verbose = (*static_cast (optval_) != 0); return 0; } void zmq::xpub_t::xpipe_terminated (pipe_t *pipe_) { // Remove the pipe from the trie. If there are topics that nobody // is interested in anymore, send corresponding unsubscriptions // upstream. subscriptions.rm (pipe_, send_unsubscription, this); dist.pipe_terminated (pipe_); } void zmq::xpub_t::mark_as_matching (pipe_t *pipe_, void *arg_) { xpub_t *self = (xpub_t*) arg_; self->dist.match (pipe_); } int zmq::xpub_t::xsend (msg_t *msg_) { bool msg_more = msg_->flags () & msg_t::more ? true : false; // For the first part of multi-part message, find the matching pipes. if (!more) subscriptions.match ((unsigned char*) msg_->data (), msg_->size (), mark_as_matching, this); // Send the message to all the pipes that were marked as matching // in the previous step. int rc = dist.send_to_matching (msg_); if (rc != 0) return rc; // If we are at the end of multi-part message we can mark all the pipes // as non-matching. if (!msg_more) dist.unmatch (); more = msg_more; return 0; } bool zmq::xpub_t::xhas_out () { return dist.has_out (); } int zmq::xpub_t::xrecv (msg_t *msg_) { // If there is at least one if (pending_data.empty ()) { errno = EAGAIN; return -1; } int rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init_size (pending_data.front ().size ()); errno_assert (rc == 0); memcpy (msg_->data (), pending_data.front ().data (), pending_data.front ().size ()); msg_->set_flags (pending_flags.front ()); pending_data.pop_front (); pending_flags.pop_front (); return 0; } bool zmq::xpub_t::xhas_in () { return !pending_data.empty (); } void zmq::xpub_t::send_unsubscription (unsigned char *data_, size_t size_, void *arg_) { xpub_t *self = (xpub_t*) arg_; if (self->options.type != ZMQ_PUB) { // Place the unsubscription to the queue of pending (un)sunscriptions // to be retrived by the user later on. blob_t unsub (size_ + 1, 0); unsub [0] = 0; memcpy (&unsub [1], data_, size_); self->pending_data.push_back (unsub); self->pending_flags.push_back (0); } } zeromq3-4.0.4+dfsg.orig/src/precompiled.hpp0000644000175000017500000000232312240736636017547 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PRECOMPILED_HPP_INCLUDED__ #define __ZMQ_PRECOMPILED_HPP_INCLUDED__ #ifdef _MSC_VER // Windows headers #include "platform.hpp" #include "windows.hpp" #include #include #include #include #include // standard C++ headers #include #include #include #include #include // 0MQ definitions and exported functions #include "../include/zmq.h" #endif // _MSC_VER #endif zeromq3-4.0.4+dfsg.orig/src/req.hpp0000644000175000017500000000617412240736636016043 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_REQ_HPP_INCLUDED__ #define __ZMQ_REQ_HPP_INCLUDED__ #include "dealer.hpp" #include "stdint.hpp" namespace zmq { class ctx_t; class msg_t; class io_thread_t; class socket_base_t; class req_t : public dealer_t { public: req_t (zmq::ctx_t *parent_, uint32_t tid_, int sid_); ~req_t (); // Overloads of functions from socket_base_t. int xsend (zmq::msg_t *msg_); int xrecv (zmq::msg_t *msg_); bool xhas_in (); bool xhas_out (); int xsetsockopt (int option_, const void *optval_, size_t optvallen_); void xpipe_terminated (zmq::pipe_t *pipe_); protected: // Receive only from the pipe the request was sent to, discarding // frames from other pipes. int recv_reply_pipe (zmq::msg_t *msg_); private: // If true, request was already sent and reply wasn't received yet or // was raceived partially. bool receiving_reply; // If true, we are starting to send/recv a message. The first part // of the message must be empty message part (backtrace stack bottom). bool message_begins; // The pipe the request was sent to and where the reply is expected. zmq::pipe_t *reply_pipe; // Whether request id frames shall be sent and expected. bool request_id_frames_enabled; // The current request id. It is incremented every time before a new // request is sent. uint32_t request_id; // If false, send() will reset its internal state and terminate the // reply_pipe's connection instead of failing if a previous request is // still pending. bool strict; req_t (const req_t&); const req_t &operator = (const req_t&); }; class req_session_t : public session_base_t { public: req_session_t (zmq::io_thread_t *io_thread_, bool connect_, zmq::socket_base_t *socket_, const options_t &options_, const address_t *addr_); ~req_session_t (); // Overloads of the functions from session_base_t. int push_msg (msg_t *msg_); void reset (); private: enum { bottom, body } state; req_session_t (const req_session_t&); const req_session_t &operator = (const req_session_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/epoll.cpp0000644000175000017500000001113312240736636016351 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "epoll.hpp" #if defined ZMQ_USE_EPOLL #include #include #include #include #include #include #include "epoll.hpp" #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" zmq::epoll_t::epoll_t () : stopping (false) { epoll_fd = epoll_create (1); errno_assert (epoll_fd != -1); } zmq::epoll_t::~epoll_t () { // Wait till the worker thread exits. worker.stop (); close (epoll_fd); for (retired_t::iterator it = retired.begin (); it != retired.end (); ++it) delete *it; } zmq::epoll_t::handle_t zmq::epoll_t::add_fd (fd_t fd_, i_poll_events *events_) { poll_entry_t *pe = new (std::nothrow) poll_entry_t; alloc_assert (pe); // The memset is not actually needed. It's here to prevent debugging // tools to complain about using uninitialised memory. memset (pe, 0, sizeof (poll_entry_t)); pe->fd = fd_; pe->ev.events = 0; pe->ev.data.ptr = pe; pe->events = events_; int rc = epoll_ctl (epoll_fd, EPOLL_CTL_ADD, fd_, &pe->ev); errno_assert (rc != -1); // Increase the load metric of the thread. adjust_load (1); return pe; } void zmq::epoll_t::rm_fd (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; int rc = epoll_ctl (epoll_fd, EPOLL_CTL_DEL, pe->fd, &pe->ev); errno_assert (rc != -1); pe->fd = retired_fd; retired.push_back (pe); // Decrease the load metric of the thread. adjust_load (-1); } void zmq::epoll_t::set_pollin (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; pe->ev.events |= EPOLLIN; int rc = epoll_ctl (epoll_fd, EPOLL_CTL_MOD, pe->fd, &pe->ev); errno_assert (rc != -1); } void zmq::epoll_t::reset_pollin (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; pe->ev.events &= ~((short) EPOLLIN); int rc = epoll_ctl (epoll_fd, EPOLL_CTL_MOD, pe->fd, &pe->ev); errno_assert (rc != -1); } void zmq::epoll_t::set_pollout (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; pe->ev.events |= EPOLLOUT; int rc = epoll_ctl (epoll_fd, EPOLL_CTL_MOD, pe->fd, &pe->ev); errno_assert (rc != -1); } void zmq::epoll_t::reset_pollout (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; pe->ev.events &= ~((short) EPOLLOUT); int rc = epoll_ctl (epoll_fd, EPOLL_CTL_MOD, pe->fd, &pe->ev); errno_assert (rc != -1); } void zmq::epoll_t::start () { worker.start (worker_routine, this); } void zmq::epoll_t::stop () { stopping = true; } int zmq::epoll_t::max_fds () { return -1; } void zmq::epoll_t::loop () { epoll_event ev_buf [max_io_events]; while (!stopping) { // Execute any due timers. int timeout = (int) execute_timers (); // Wait for events. int n = epoll_wait (epoll_fd, &ev_buf [0], max_io_events, timeout ? timeout : -1); if (n == -1) { errno_assert (errno == EINTR); continue; } for (int i = 0; i < n; i ++) { poll_entry_t *pe = ((poll_entry_t*) ev_buf [i].data.ptr); if (pe->fd == retired_fd) continue; if (ev_buf [i].events & (EPOLLERR | EPOLLHUP)) pe->events->in_event (); if (pe->fd == retired_fd) continue; if (ev_buf [i].events & EPOLLOUT) pe->events->out_event (); if (pe->fd == retired_fd) continue; if (ev_buf [i].events & EPOLLIN) pe->events->in_event (); } // Destroy retired event sources. for (retired_t::iterator it = retired.begin (); it != retired.end (); ++it) delete *it; retired.clear (); } } void zmq::epoll_t::worker_routine (void *arg_) { ((epoll_t*) arg_)->loop (); } #endif zeromq3-4.0.4+dfsg.orig/src/stream_engine.cpp0000644000175000017500000006034212307426216020056 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #include #include #include #endif #include #include #include "stream_engine.hpp" #include "io_thread.hpp" #include "session_base.hpp" #include "v1_encoder.hpp" #include "v1_decoder.hpp" #include "v2_encoder.hpp" #include "v2_decoder.hpp" #include "null_mechanism.hpp" #include "plain_mechanism.hpp" #include "curve_client.hpp" #include "curve_server.hpp" #include "raw_decoder.hpp" #include "raw_encoder.hpp" #include "config.hpp" #include "err.hpp" #include "ip.hpp" #include "likely.hpp" #include "wire.hpp" zmq::stream_engine_t::stream_engine_t (fd_t fd_, const options_t &options_, const std::string &endpoint_) : s (fd_), inpos (NULL), insize (0), decoder (NULL), outpos (NULL), outsize (0), encoder (NULL), handshaking (true), greeting_size (v2_greeting_size), greeting_bytes_read (0), session (NULL), options (options_), endpoint (endpoint_), plugged (false), read_msg (&stream_engine_t::read_identity), write_msg (&stream_engine_t::write_identity), io_error (false), subscription_required (false), mechanism (NULL), input_stopped (false), output_stopped (false), socket (NULL) { int rc = tx_msg.init (); errno_assert (rc == 0); // Put the socket into non-blocking mode. unblock_socket (s); if (!get_peer_ip_address (s, peer_address)) peer_address = ""; #ifdef SO_NOSIGPIPE // Make sure that SIGPIPE signal is not generated when writing to a // connection that was already closed by the peer. int set = 1; rc = setsockopt (s, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof (int)); errno_assert (rc == 0); #endif } zmq::stream_engine_t::~stream_engine_t () { zmq_assert (!plugged); if (s != retired_fd) { #ifdef ZMQ_HAVE_WINDOWS int rc = closesocket (s); wsa_assert (rc != SOCKET_ERROR); #else int rc = close (s); errno_assert (rc == 0); #endif s = retired_fd; } int rc = tx_msg.close (); errno_assert (rc == 0); delete encoder; delete decoder; delete mechanism; } void zmq::stream_engine_t::plug (io_thread_t *io_thread_, session_base_t *session_) { zmq_assert (!plugged); plugged = true; // Connect to session object. zmq_assert (!session); zmq_assert (session_); session = session_; socket = session-> get_socket (); // Connect to I/O threads poller object. io_object_t::plug (io_thread_); handle = add_fd (s); io_error = false; if (options.raw_sock) { // no handshaking for raw sock, instantiate raw encoder and decoders encoder = new (std::nothrow) raw_encoder_t (out_batch_size); alloc_assert (encoder); decoder = new (std::nothrow) raw_decoder_t (in_batch_size); alloc_assert (decoder); // disable handshaking for raw socket handshaking = false; read_msg = &stream_engine_t::pull_msg_from_session; write_msg = &stream_engine_t::push_msg_to_session; } else { // Send the 'length' and 'flags' fields of the identity message. // The 'length' field is encoded in the long format. outpos = greeting_send; outpos [outsize++] = 0xff; put_uint64 (&outpos [outsize], options.identity_size + 1); outsize += 8; outpos [outsize++] = 0x7f; } set_pollin (handle); set_pollout (handle); // Flush all the data that may have been already received downstream. in_event (); } void zmq::stream_engine_t::unplug () { zmq_assert (plugged); plugged = false; // Cancel all fd subscriptions. if (!io_error) rm_fd (handle); // Disconnect from I/O threads poller object. io_object_t::unplug (); session = NULL; } void zmq::stream_engine_t::terminate () { unplug (); delete this; } void zmq::stream_engine_t::in_event () { assert (!io_error); // If still handshaking, receive and process the greeting message. if (unlikely (handshaking)) if (!handshake ()) return; zmq_assert (decoder); // If there has been an I/O error, stop polling. if (input_stopped) { rm_fd (handle); io_error = true; return; } // If there's no data to process in the buffer... if (!insize) { // Retrieve the buffer and read as much data as possible. // Note that buffer can be arbitrarily large. However, we assume // the underlying TCP layer has fixed buffer size and thus the // number of bytes read will be always limited. size_t bufsize = 0; decoder->get_buffer (&inpos, &bufsize); int const rc = read (inpos, bufsize); if (rc == 0) { error (); return; } if (rc == -1) { if (errno != EAGAIN) error (); return; } // Adjust input size insize = static_cast (rc); } int rc = 0; size_t processed = 0; while (insize > 0) { rc = decoder->decode (inpos, insize, processed); zmq_assert (processed <= insize); inpos += processed; insize -= processed; if (rc == 0 || rc == -1) break; rc = (this->*write_msg) (decoder->msg ()); if (rc == -1) break; } // Tear down the connection if we have failed to decode input data // or the session has rejected the message. if (rc == -1) { if (errno != EAGAIN) { error (); return; } input_stopped = true; reset_pollin (handle); } session->flush (); } void zmq::stream_engine_t::out_event () { zmq_assert (!io_error); // If write buffer is empty, try to read new data from the encoder. if (!outsize) { // Even when we stop polling as soon as there is no // data to send, the poller may invoke out_event one // more time due to 'speculative write' optimisation. if (unlikely (encoder == NULL)) { zmq_assert (handshaking); return; } outpos = NULL; outsize = encoder->encode (&outpos, 0); while (outsize < out_batch_size) { if ((this->*read_msg) (&tx_msg) == -1) break; encoder->load_msg (&tx_msg); unsigned char *bufptr = outpos + outsize; size_t n = encoder->encode (&bufptr, out_batch_size - outsize); zmq_assert (n > 0); if (outpos == NULL) outpos = bufptr; outsize += n; } // If there is no data to send, stop polling for output. if (outsize == 0) { output_stopped = true; reset_pollout (handle); return; } } // If there are any data to write in write buffer, write as much as // possible to the socket. Note that amount of data to write can be // arbitrarily large. However, we assume that underlying TCP layer has // limited transmission buffer and thus the actual number of bytes // written should be reasonably modest. int nbytes = write (outpos, outsize); // IO error has occurred. We stop waiting for output events. // The engine is not terminated until we detect input error; // this is necessary to prevent losing incoming messages. if (nbytes == -1) { reset_pollout (handle); return; } outpos += nbytes; outsize -= nbytes; // If we are still handshaking and there are no data // to send, stop polling for output. if (unlikely (handshaking)) if (outsize == 0) reset_pollout (handle); } void zmq::stream_engine_t::restart_output () { if (unlikely (io_error)) return; if (likely (output_stopped)) { set_pollout (handle); output_stopped = false; } // Speculative write: The assumption is that at the moment new message // was sent by the user the socket is probably available for writing. // Thus we try to write the data to socket avoiding polling for POLLOUT. // Consequently, the latency should be better in request/reply scenarios. out_event (); } void zmq::stream_engine_t::restart_input () { zmq_assert (input_stopped); zmq_assert (session != NULL); zmq_assert (decoder != NULL); int rc = (this->*write_msg) (decoder->msg ()); if (rc == -1) { if (errno == EAGAIN) session->flush (); else error (); return; } while (insize > 0) { size_t processed = 0; rc = decoder->decode (inpos, insize, processed); zmq_assert (processed <= insize); inpos += processed; insize -= processed; if (rc == 0 || rc == -1) break; rc = (this->*write_msg) (decoder->msg ()); if (rc == -1) break; } if (rc == -1 && errno == EAGAIN) session->flush (); else if (rc == -1 || io_error) error (); else { input_stopped = false; set_pollin (handle); session->flush (); // Speculative read. in_event (); } } bool zmq::stream_engine_t::handshake () { zmq_assert (handshaking); zmq_assert (greeting_bytes_read < greeting_size); // Receive the greeting. while (greeting_bytes_read < greeting_size) { const int n = read (greeting_recv + greeting_bytes_read, greeting_size - greeting_bytes_read); if (n == 0) { error (); return false; } if (n == -1) { if (errno != EAGAIN) error (); return false; } greeting_bytes_read += n; // We have received at least one byte from the peer. // If the first byte is not 0xff, we know that the // peer is using unversioned protocol. if (greeting_recv [0] != 0xff) break; if (greeting_bytes_read < signature_size) continue; // Inspect the right-most bit of the 10th byte (which coincides // with the 'flags' field if a regular message was sent). // Zero indicates this is a header of identity message // (i.e. the peer is using the unversioned protocol). if (!(greeting_recv [9] & 0x01)) break; // The peer is using versioned protocol. // Send the major version number. if (outpos + outsize == greeting_send + signature_size) { if (outsize == 0) set_pollout (handle); outpos [outsize++] = 3; // Major version number } if (greeting_bytes_read > signature_size) { if (outpos + outsize == greeting_send + signature_size + 1) { if (outsize == 0) set_pollout (handle); // Use ZMTP/2.0 to talk to older peers. if (greeting_recv [10] == ZMTP_1_0 || greeting_recv [10] == ZMTP_2_0) outpos [outsize++] = options.type; else { outpos [outsize++] = 0; // Minor version number memset (outpos + outsize, 0, 20); zmq_assert (options.mechanism == ZMQ_NULL || options.mechanism == ZMQ_PLAIN || options.mechanism == ZMQ_CURVE); if (options.mechanism == ZMQ_NULL) memcpy (outpos + outsize, "NULL", 4); else if (options.mechanism == ZMQ_PLAIN) memcpy (outpos + outsize, "PLAIN", 5); else memcpy (outpos + outsize, "CURVE", 5); outsize += 20; memset (outpos + outsize, 0, 32); outsize += 32; greeting_size = v3_greeting_size; } } } } // Position of the revision field in the greeting. const size_t revision_pos = 10; // Is the peer using ZMTP/1.0 with no revision number? // If so, we send and receive rest of identity message if (greeting_recv [0] != 0xff || !(greeting_recv [9] & 0x01)) { encoder = new (std::nothrow) v1_encoder_t (out_batch_size); alloc_assert (encoder); decoder = new (std::nothrow) v1_decoder_t (in_batch_size, options.maxmsgsize); alloc_assert (decoder); // We have already sent the message header. // Since there is no way to tell the encoder to // skip the message header, we simply throw that // header data away. const size_t header_size = options.identity_size + 1 >= 255 ? 10 : 2; unsigned char tmp [10], *bufferp = tmp; // Prepare the identity message and load it into encoder. // Then consume bytes we have already sent to the peer. const int rc = tx_msg.init_size (options.identity_size); zmq_assert (rc == 0); memcpy (tx_msg.data (), options.identity, options.identity_size); encoder->load_msg (&tx_msg); size_t buffer_size = encoder->encode (&bufferp, header_size); zmq_assert (buffer_size == header_size); // Make sure the decoder sees the data we have already received. inpos = greeting_recv; insize = greeting_bytes_read; // To allow for interoperability with peers that do not forward // their subscriptions, we inject a phantom subscription message // message into the incoming message stream. if (options.type == ZMQ_PUB || options.type == ZMQ_XPUB) subscription_required = true; // We are sending our identity now and the next message // will come from the socket. read_msg = &stream_engine_t::pull_msg_from_session; // We are expecting identity message. write_msg = &stream_engine_t::write_identity; } else if (greeting_recv [revision_pos] == ZMTP_1_0) { encoder = new (std::nothrow) v1_encoder_t ( out_batch_size); alloc_assert (encoder); decoder = new (std::nothrow) v1_decoder_t ( in_batch_size, options.maxmsgsize); alloc_assert (decoder); } else if (greeting_recv [revision_pos] == ZMTP_2_0) { encoder = new (std::nothrow) v2_encoder_t (out_batch_size); alloc_assert (encoder); decoder = new (std::nothrow) v2_decoder_t ( in_batch_size, options.maxmsgsize); alloc_assert (decoder); } else { encoder = new (std::nothrow) v2_encoder_t (out_batch_size); alloc_assert (encoder); decoder = new (std::nothrow) v2_decoder_t ( in_batch_size, options.maxmsgsize); alloc_assert (decoder); if (memcmp (greeting_recv + 12, "NULL\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 20) == 0) { mechanism = new (std::nothrow) null_mechanism_t (session, peer_address, options); alloc_assert (mechanism); } else if (memcmp (greeting_recv + 12, "PLAIN\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 20) == 0) { mechanism = new (std::nothrow) plain_mechanism_t (session, peer_address, options); alloc_assert (mechanism); } #ifdef HAVE_LIBSODIUM else if (memcmp (greeting_recv + 12, "CURVE\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 20) == 0) { if (options.as_server) mechanism = new (std::nothrow) curve_server_t (session, peer_address, options); else mechanism = new (std::nothrow) curve_client_t (options); alloc_assert (mechanism); } #endif else { error (); return false; } read_msg = &stream_engine_t::next_handshake_command; write_msg = &stream_engine_t::process_handshake_command; } // Start polling for output if necessary. if (outsize == 0) set_pollout (handle); // Handshaking was successful. // Switch into the normal message flow. handshaking = false; return true; } int zmq::stream_engine_t::read_identity (msg_t *msg_) { int rc = msg_->init_size (options.identity_size); errno_assert (rc == 0); if (options.identity_size > 0) memcpy (msg_->data (), options.identity, options.identity_size); read_msg = &stream_engine_t::pull_msg_from_session; return 0; } int zmq::stream_engine_t::write_identity (msg_t *msg_) { if (options.recv_identity) { msg_->set_flags (msg_t::identity); int rc = session->push_msg (msg_); errno_assert (rc == 0); } else { int rc = msg_->close (); errno_assert (rc == 0); rc = msg_->init (); errno_assert (rc == 0); } if (subscription_required) write_msg = &stream_engine_t::write_subscription_msg; else write_msg = &stream_engine_t::push_msg_to_session; return 0; } int zmq::stream_engine_t::next_handshake_command (msg_t *msg_) { zmq_assert (mechanism != NULL); const int rc = mechanism->next_handshake_command (msg_); if (rc == 0) { msg_->set_flags (msg_t::command); if (mechanism->is_handshake_complete ()) mechanism_ready (); } return rc; } int zmq::stream_engine_t::process_handshake_command (msg_t *msg_) { zmq_assert (mechanism != NULL); const int rc = mechanism->process_handshake_command (msg_); if (rc == 0) { if (mechanism->is_handshake_complete ()) mechanism_ready (); if (output_stopped) restart_output (); } return rc; } void zmq::stream_engine_t::zap_msg_available () { zmq_assert (mechanism != NULL); const int rc = mechanism->zap_msg_available (); if (rc == -1) { error (); return; } if (input_stopped) restart_input (); if (output_stopped) restart_output (); } void zmq::stream_engine_t::mechanism_ready () { if (options.recv_identity) { msg_t identity; mechanism->peer_identity (&identity); const int rc = session->push_msg (&identity); if (rc == -1 && errno == EAGAIN) { // If the write is failing at this stage with // an EAGAIN the pipe must be being shut down, // so we can just bail out of the identity set. return; } errno_assert (rc == 0); session->flush (); } read_msg = &stream_engine_t::pull_and_encode; write_msg = &stream_engine_t::decode_and_push; } int zmq::stream_engine_t::pull_msg_from_session (msg_t *msg_) { return session->pull_msg (msg_); } int zmq::stream_engine_t::push_msg_to_session (msg_t *msg_) { return session->push_msg (msg_); } int zmq::stream_engine_t::pull_and_encode (msg_t *msg_) { zmq_assert (mechanism != NULL); if (session->pull_msg (msg_) == -1) return -1; if (mechanism->encode (msg_) == -1) return -1; return 0; } int zmq::stream_engine_t::decode_and_push (msg_t *msg_) { zmq_assert (mechanism != NULL); if (mechanism->decode (msg_) == -1) return -1; if (session->push_msg (msg_) == -1) { if (errno == EAGAIN) write_msg = &stream_engine_t::push_one_then_decode_and_push; return -1; } return 0; } int zmq::stream_engine_t::push_one_then_decode_and_push (msg_t *msg_) { const int rc = session->push_msg (msg_); if (rc == 0) write_msg = &stream_engine_t::decode_and_push; return rc; } int zmq::stream_engine_t::write_subscription_msg (msg_t *msg_) { msg_t subscription; // Inject the subscription message, so that also // ZMQ 2.x peers receive published messages. int rc = subscription.init_size (1); errno_assert (rc == 0); *(unsigned char*) subscription.data () = 1; rc = session->push_msg (&subscription); if (rc == -1) return -1; write_msg = &stream_engine_t::push_msg_to_session; return push_msg_to_session (msg_); } void zmq::stream_engine_t::error () { zmq_assert (session); socket->event_disconnected (endpoint, s); session->flush (); session->detach (); unplug (); delete this; } int zmq::stream_engine_t::write (const void *data_, size_t size_) { #ifdef ZMQ_HAVE_WINDOWS int nbytes = send (s, (char*) data_, (int) size_, 0); // If not a single byte can be written to the socket in non-blocking mode // we'll get an error (this may happen during the speculative write). if (nbytes == SOCKET_ERROR && WSAGetLastError () == WSAEWOULDBLOCK) return 0; // Signalise peer failure. if (nbytes == SOCKET_ERROR && ( WSAGetLastError () == WSAENETDOWN || WSAGetLastError () == WSAENETRESET || WSAGetLastError () == WSAEHOSTUNREACH || WSAGetLastError () == WSAECONNABORTED || WSAGetLastError () == WSAETIMEDOUT || WSAGetLastError () == WSAECONNRESET)) return -1; wsa_assert (nbytes != SOCKET_ERROR); return nbytes; #else ssize_t nbytes = send (s, data_, size_, 0); // Several errors are OK. When speculative write is being done we may not // be able to write a single byte from the socket. Also, SIGSTOP issued // by a debugging tool can result in EINTR error. if (nbytes == -1 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) return 0; // Signalise peer failure. if (nbytes == -1) { errno_assert (errno != EACCES && errno != EBADF && errno != EDESTADDRREQ && errno != EFAULT && errno != EINVAL && errno != EISCONN && errno != EMSGSIZE && errno != ENOMEM && errno != ENOTSOCK && errno != EOPNOTSUPP); return -1; } return static_cast (nbytes); #endif } int zmq::stream_engine_t::read (void *data_, size_t size_) { #ifdef ZMQ_HAVE_WINDOWS const int rc = recv (s, (char*) data_, (int) size_, 0); // If not a single byte can be read from the socket in non-blocking mode // we'll get an error (this may happen during the speculative read). if (rc == SOCKET_ERROR) { if (WSAGetLastError () == WSAEWOULDBLOCK) errno = EAGAIN; else { wsa_assert (WSAGetLastError () == WSAENETDOWN || WSAGetLastError () == WSAENETRESET || WSAGetLastError () == WSAECONNABORTED || WSAGetLastError () == WSAETIMEDOUT || WSAGetLastError () == WSAECONNRESET || WSAGetLastError () == WSAECONNREFUSED || WSAGetLastError () == WSAENOTCONN); errno = wsa_error_to_errno (WSAGetLastError ()); } } return rc == SOCKET_ERROR? -1: rc; #else const ssize_t rc = recv (s, data_, size_, 0); // Several errors are OK. When speculative read is being done we may not // be able to read a single byte from the socket. Also, SIGSTOP issued // by a debugging tool can result in EINTR error. if (rc == -1) { errno_assert (errno != EBADF && errno != EFAULT && errno != EINVAL && errno != ENOMEM && errno != ENOTSOCK); if (errno == EWOULDBLOCK || errno == EINTR) errno = EAGAIN; } return static_cast (rc); #endif } zeromq3-4.0.4+dfsg.orig/src/v2_decoder.cpp0000644000175000017500000001032112240736636017250 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "v2_protocol.hpp" #include "v2_decoder.hpp" #include "likely.hpp" #include "wire.hpp" #include "err.hpp" zmq::v2_decoder_t::v2_decoder_t (size_t bufsize_, int64_t maxmsgsize_) : decoder_base_t (bufsize_), msg_flags (0), maxmsgsize (maxmsgsize_) { int rc = in_progress.init (); errno_assert (rc == 0); // At the beginning, read one byte and go to flags_ready state. next_step (tmpbuf, 1, &v2_decoder_t::flags_ready); } zmq::v2_decoder_t::~v2_decoder_t () { int rc = in_progress.close (); errno_assert (rc == 0); } int zmq::v2_decoder_t::flags_ready () { msg_flags = 0; if (tmpbuf [0] & v2_protocol_t::more_flag) msg_flags |= msg_t::more; if (tmpbuf [0] & v2_protocol_t::command_flag) msg_flags |= msg_t::command; // The payload length is either one or eight bytes, // depending on whether the 'large' bit is set. if (tmpbuf [0] & v2_protocol_t::large_flag) next_step (tmpbuf, 8, &v2_decoder_t::eight_byte_size_ready); else next_step (tmpbuf, 1, &v2_decoder_t::one_byte_size_ready); return 0; } int zmq::v2_decoder_t::one_byte_size_ready () { // Message size must not exceed the maximum allowed size. if (maxmsgsize >= 0) if (unlikely (tmpbuf [0] > static_cast (maxmsgsize))) { errno = EMSGSIZE; return -1; } // in_progress is initialised at this point so in theory we should // close it before calling zmq_msg_init_size, however, it's a 0-byte // message and thus we can treat it as uninitialised... int rc = in_progress.init_size (tmpbuf [0]); if (unlikely (rc)) { errno_assert (errno == ENOMEM); rc = in_progress.init (); errno_assert (rc == 0); errno = ENOMEM; return -1; } in_progress.set_flags (msg_flags); next_step (in_progress.data (), in_progress.size (), &v2_decoder_t::message_ready); return 0; } int zmq::v2_decoder_t::eight_byte_size_ready () { // The payload size is encoded as 64-bit unsigned integer. // The most significant byte comes first. const uint64_t msg_size = get_uint64 (tmpbuf); // Message size must not exceed the maximum allowed size. if (maxmsgsize >= 0) if (unlikely (msg_size > static_cast (maxmsgsize))) { errno = EMSGSIZE; return -1; } // Message size must fit into size_t data type. if (unlikely (msg_size != static_cast (msg_size))) { errno = EMSGSIZE; return -1; } // in_progress is initialised at this point so in theory we should // close it before calling init_size, however, it's a 0-byte // message and thus we can treat it as uninitialised. int rc = in_progress.init_size (static_cast (msg_size)); if (unlikely (rc)) { errno_assert (errno == ENOMEM); rc = in_progress.init (); errno_assert (rc == 0); errno = ENOMEM; return -1; } in_progress.set_flags (msg_flags); next_step (in_progress.data (), in_progress.size (), &v2_decoder_t::message_ready); return 0; } int zmq::v2_decoder_t::message_ready () { // Message is completely read. Signal this to the caller // and prepare to decode next message. next_step (tmpbuf, 1, &v2_decoder_t::flags_ready); return 1; } zeromq3-4.0.4+dfsg.orig/src/pull.cpp0000644000175000017500000000273412240736636016221 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "pull.hpp" #include "err.hpp" #include "msg.hpp" #include "pipe.hpp" zmq::pull_t::pull_t (class ctx_t *parent_, uint32_t tid_, int sid_) : socket_base_t (parent_, tid_, sid_) { options.type = ZMQ_PULL; } zmq::pull_t::~pull_t () { } void zmq::pull_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { // subscribe_to_all_ is unused (void)subscribe_to_all_; zmq_assert (pipe_); fq.attach (pipe_); } void zmq::pull_t::xread_activated (pipe_t *pipe_) { fq.activated (pipe_); } void zmq::pull_t::xpipe_terminated (pipe_t *pipe_) { fq.pipe_terminated (pipe_); } int zmq::pull_t::xrecv (msg_t *msg_) { return fq.recv (msg_); } bool zmq::pull_t::xhas_in () { return fq.has_in (); } zeromq3-4.0.4+dfsg.orig/src/raw_encoder.cpp0000644000175000017500000000242012240736636017525 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "encoder.hpp" #include "raw_encoder.hpp" #include "likely.hpp" #include "wire.hpp" zmq::raw_encoder_t::raw_encoder_t (size_t bufsize_) : encoder_base_t (bufsize_) { // Write 0 bytes to the batch and go to message_ready state. next_step (NULL, 0, &raw_encoder_t::raw_message_ready, true); } zmq::raw_encoder_t::~raw_encoder_t () { } void zmq::raw_encoder_t::raw_message_ready () { next_step (in_progress->data (), in_progress->size (), &raw_encoder_t::raw_message_ready, true); } zeromq3-4.0.4+dfsg.orig/src/socket_base.cpp0000644000175000017500000010751612251014562017520 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #if defined _MSC_VER #if defined _WIN32_WCE #include #else #include #endif #endif #else #include #endif #include "socket_base.hpp" #include "tcp_listener.hpp" #include "ipc_listener.hpp" #include "tcp_connecter.hpp" #include "io_thread.hpp" #include "session_base.hpp" #include "config.hpp" #include "pipe.hpp" #include "err.hpp" #include "ctx.hpp" #include "platform.hpp" #include "likely.hpp" #include "msg.hpp" #include "address.hpp" #include "ipc_address.hpp" #include "tcp_address.hpp" #ifdef ZMQ_HAVE_OPENPGM #include "pgm_socket.hpp" #endif #include "pair.hpp" #include "pub.hpp" #include "sub.hpp" #include "req.hpp" #include "rep.hpp" #include "pull.hpp" #include "push.hpp" #include "dealer.hpp" #include "router.hpp" #include "xpub.hpp" #include "xsub.hpp" #include "stream.hpp" bool zmq::socket_base_t::check_tag () { return tag == 0xbaddecaf; } zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, uint32_t tid_, int sid_) { socket_base_t *s = NULL; switch (type_) { case ZMQ_PAIR: s = new (std::nothrow) pair_t (parent_, tid_, sid_); break; case ZMQ_PUB: s = new (std::nothrow) pub_t (parent_, tid_, sid_); break; case ZMQ_SUB: s = new (std::nothrow) sub_t (parent_, tid_, sid_); break; case ZMQ_REQ: s = new (std::nothrow) req_t (parent_, tid_, sid_); break; case ZMQ_REP: s = new (std::nothrow) rep_t (parent_, tid_, sid_); break; case ZMQ_DEALER: s = new (std::nothrow) dealer_t (parent_, tid_, sid_); break; case ZMQ_ROUTER: s = new (std::nothrow) router_t (parent_, tid_, sid_); break; case ZMQ_PULL: s = new (std::nothrow) pull_t (parent_, tid_, sid_); break; case ZMQ_PUSH: s = new (std::nothrow) push_t (parent_, tid_, sid_); break; case ZMQ_XPUB: s = new (std::nothrow) xpub_t (parent_, tid_, sid_); break; case ZMQ_XSUB: s = new (std::nothrow) xsub_t (parent_, tid_, sid_); break; case ZMQ_STREAM: s = new (std::nothrow) stream_t (parent_, tid_, sid_); break; default: errno = EINVAL; return NULL; } if (s->mailbox.get_fd () == retired_fd) return NULL; alloc_assert (s); return s; } zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_, int sid_) : own_t (parent_, tid_), tag (0xbaddecaf), ctx_terminated (false), destroyed (false), last_tsc (0), ticks (0), rcvmore (false), monitor_socket (NULL), monitor_events (0) { options.socket_id = sid_; options.ipv6 = (parent_->get (ZMQ_IPV6) != 0); } zmq::socket_base_t::~socket_base_t () { stop_monitor (); zmq_assert (destroyed); } zmq::mailbox_t *zmq::socket_base_t::get_mailbox () { return &mailbox; } void zmq::socket_base_t::stop () { // Called by ctx when it is terminated (zmq_term). // 'stop' command is sent from the threads that called zmq_term to // the thread owning the socket. This way, blocking call in the // owner thread can be interrupted. send_stop (); } int zmq::socket_base_t::parse_uri (const char *uri_, std::string &protocol_, std::string &address_) { zmq_assert (uri_ != NULL); std::string uri (uri_); std::string::size_type pos = uri.find ("://"); if (pos == std::string::npos) { errno = EINVAL; return -1; } protocol_ = uri.substr (0, pos); address_ = uri.substr (pos + 3); if (protocol_.empty () || address_.empty ()) { errno = EINVAL; return -1; } return 0; } int zmq::socket_base_t::check_protocol (const std::string &protocol_) { // First check out whether the protcol is something we are aware of. if (protocol_ != "inproc" && protocol_ != "ipc" && protocol_ != "tcp" && protocol_ != "pgm" && protocol_ != "epgm") { errno = EPROTONOSUPPORT; return -1; } // If 0MQ is not compiled with OpenPGM, pgm and epgm transports // are not avaialble. #if !defined ZMQ_HAVE_OPENPGM if (protocol_ == "pgm" || protocol_ == "epgm") { errno = EPROTONOSUPPORT; return -1; } #endif // IPC transport is not available on Windows and OpenVMS. #if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS if (protocol_ == "ipc") { // Unknown protocol. errno = EPROTONOSUPPORT; return -1; } #endif // Check whether socket type and transport protocol match. // Specifically, multicast protocols can't be combined with // bi-directional messaging patterns (socket types). if ((protocol_ == "pgm" || protocol_ == "epgm") && options.type != ZMQ_PUB && options.type != ZMQ_SUB && options.type != ZMQ_XPUB && options.type != ZMQ_XSUB) { errno = ENOCOMPATPROTO; return -1; } // Protocol is available. return 0; } void zmq::socket_base_t::attach_pipe (pipe_t *pipe_, bool subscribe_to_all_) { // First, register the pipe so that we can terminate it later on. pipe_->set_event_sink (this); pipes.push_back (pipe_); // Let the derived socket type know about new pipe. xattach_pipe (pipe_, subscribe_to_all_); // If the socket is already being closed, ask any new pipes to terminate // straight away. if (is_terminating ()) { register_term_acks (1); pipe_->terminate (false); } } int zmq::socket_base_t::setsockopt (int option_, const void *optval_, size_t optvallen_) { if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // First, check whether specific socket type overloads the option. int rc = xsetsockopt (option_, optval_, optvallen_); if (rc == 0 || errno != EINVAL) return rc; // If the socket type doesn't support the option, pass it to // the generic option parser. return options.setsockopt (option_, optval_, optvallen_); } int zmq::socket_base_t::getsockopt (int option_, void *optval_, size_t *optvallen_) { if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } if (option_ == ZMQ_RCVMORE) { if (*optvallen_ < sizeof (int)) { errno = EINVAL; return -1; } *((int*) optval_) = rcvmore ? 1 : 0; *optvallen_ = sizeof (int); return 0; } if (option_ == ZMQ_FD) { if (*optvallen_ < sizeof (fd_t)) { errno = EINVAL; return -1; } *((fd_t*) optval_) = mailbox.get_fd (); *optvallen_ = sizeof (fd_t); return 0; } if (option_ == ZMQ_EVENTS) { if (*optvallen_ < sizeof (int)) { errno = EINVAL; return -1; } int rc = process_commands (0, false); if (rc != 0 && (errno == EINTR || errno == ETERM)) return -1; errno_assert (rc == 0); *((int*) optval_) = 0; if (has_out ()) *((int*) optval_) |= ZMQ_POLLOUT; if (has_in ()) *((int*) optval_) |= ZMQ_POLLIN; *optvallen_ = sizeof (int); return 0; } if (option_ == ZMQ_LAST_ENDPOINT) { if (*optvallen_ < last_endpoint.size () + 1) { errno = EINVAL; return -1; } strcpy (static_cast (optval_), last_endpoint.c_str ()); *optvallen_ = last_endpoint.size () + 1; return 0; } return options.getsockopt (option_, optval_, optvallen_); } int zmq::socket_base_t::bind (const char *addr_) { if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Process pending commands, if any. int rc = process_commands (0, false); if (unlikely (rc != 0)) return -1; // Parse addr_ string. std::string protocol; std::string address; rc = parse_uri (addr_, protocol, address); if (rc != 0) return -1; rc = check_protocol (protocol); if (rc != 0) return -1; if (protocol == "inproc") { endpoint_t endpoint = {this, options}; int rc = register_endpoint (addr_, endpoint); if (rc == 0) { connect_pending(addr_, this); last_endpoint.assign (addr_); } return rc; } if (protocol == "pgm" || protocol == "epgm") { // For convenience's sake, bind can be used interchageable with // connect for PGM and EPGM transports. return connect (addr_); } // Remaining trasnports require to be run in an I/O thread, so at this // point we'll choose one. io_thread_t *io_thread = choose_io_thread (options.affinity); if (!io_thread) { errno = EMTHREAD; return -1; } if (protocol == "tcp") { tcp_listener_t *listener = new (std::nothrow) tcp_listener_t ( io_thread, this, options); alloc_assert (listener); int rc = listener->set_address (address.c_str ()); if (rc != 0) { delete listener; event_bind_failed (address, zmq_errno()); return -1; } // Save last endpoint URI listener->get_address (last_endpoint); add_endpoint (addr_, (own_t *) listener, NULL); return 0; } #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS if (protocol == "ipc") { ipc_listener_t *listener = new (std::nothrow) ipc_listener_t ( io_thread, this, options); alloc_assert (listener); int rc = listener->set_address (address.c_str ()); if (rc != 0) { delete listener; event_bind_failed (address, zmq_errno()); return -1; } // Save last endpoint URI listener->get_address (last_endpoint); add_endpoint (addr_, (own_t *) listener, NULL); return 0; } #endif zmq_assert (false); return -1; } int zmq::socket_base_t::connect (const char *addr_) { if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Process pending commands, if any. int rc = process_commands (0, false); if (unlikely (rc != 0)) return -1; // Parse addr_ string. std::string protocol; std::string address; rc = parse_uri (addr_, protocol, address); if (rc != 0) return -1; rc = check_protocol (protocol); if (rc != 0) return -1; if (protocol == "inproc") { // TODO: inproc connect is specific with respect to creating pipes // as there's no 'reconnect' functionality implemented. Once that // is in place we should follow generic pipe creation algorithm. // Find the peer endpoint. endpoint_t peer = find_endpoint (addr_); // The total HWM for an inproc connection should be the sum of // the binder's HWM and the connector's HWM. int sndhwm = 0; if (peer.socket == NULL) sndhwm = options.sndhwm; else if (options.sndhwm != 0 && peer.options.rcvhwm != 0) sndhwm = options.sndhwm + peer.options.rcvhwm; int rcvhwm = 0; if (peer.socket == NULL) rcvhwm = options.rcvhwm; else if (options.rcvhwm != 0 && peer.options.sndhwm != 0) rcvhwm = options.rcvhwm + peer.options.sndhwm; // Create a bi-directional pipe to connect the peers. object_t *parents [2] = {this, peer.socket == NULL ? this : peer.socket}; pipe_t *new_pipes [2] = {NULL, NULL}; bool conflate = options.conflate && (options.type == ZMQ_DEALER || options.type == ZMQ_PULL || options.type == ZMQ_PUSH || options.type == ZMQ_PUB || options.type == ZMQ_SUB); int hwms [2] = {conflate? -1 : sndhwm, conflate? -1 : rcvhwm}; bool conflates [2] = {conflate, conflate}; int rc = pipepair (parents, new_pipes, hwms, conflates); errno_assert (rc == 0); // Attach local end of the pipe to this socket object. attach_pipe (new_pipes [0]); if (!peer.socket) { endpoint_t endpoint = {this, options}; pending_connection_t pending_connection = {endpoint, new_pipes [0], new_pipes [1]}; pend_connection (addr_, pending_connection); } else { // If required, send the identity of the local socket to the peer. if (peer.options.recv_identity) { msg_t id; rc = id.init_size (options.identity_size); errno_assert (rc == 0); memcpy (id.data (), options.identity, options.identity_size); id.set_flags (msg_t::identity); bool written = new_pipes [0]->write (&id); zmq_assert (written); new_pipes [0]->flush (); } // If required, send the identity of the peer to the local socket. if (options.recv_identity) { msg_t id; rc = id.init_size (peer.options.identity_size); errno_assert (rc == 0); memcpy (id.data (), peer.options.identity, peer.options.identity_size); id.set_flags (msg_t::identity); bool written = new_pipes [1]->write (&id); zmq_assert (written); new_pipes [1]->flush (); } // Attach remote end of the pipe to the peer socket. Note that peer's // seqnum was incremented in find_endpoint function. We don't need it // increased here. send_bind (peer.socket, new_pipes [1], false); } // Save last endpoint URI last_endpoint.assign (addr_); // remember inproc connections for disconnect inprocs.insert (inprocs_t::value_type (std::string (addr_), new_pipes[0])); return 0; } // Choose the I/O thread to run the session in. io_thread_t *io_thread = choose_io_thread (options.affinity); if (!io_thread) { errno = EMTHREAD; return -1; } address_t *paddr = new (std::nothrow) address_t (protocol, address); alloc_assert (paddr); // Resolve address (if needed by the protocol) if (protocol == "tcp") { paddr->resolved.tcp_addr = new (std::nothrow) tcp_address_t (); alloc_assert (paddr->resolved.tcp_addr); int rc = paddr->resolved.tcp_addr->resolve ( address.c_str (), false, options.ipv6); if (rc != 0) { delete paddr; return -1; } } #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS else if (protocol == "ipc") { paddr->resolved.ipc_addr = new (std::nothrow) ipc_address_t (); alloc_assert (paddr->resolved.ipc_addr); int rc = paddr->resolved.ipc_addr->resolve (address.c_str ()); if (rc != 0) { delete paddr; return -1; } } #endif #ifdef ZMQ_HAVE_OPENPGM if (protocol == "pgm" || protocol == "epgm") { struct pgm_addrinfo_t *res = NULL; uint16_t port_number = 0; int rc = pgm_socket_t::init_address(address.c_str(), &res, &port_number); if (res != NULL) pgm_freeaddrinfo (res); if (rc != 0 || port_number == 0) return -1; } #endif // Create session. session_base_t *session = session_base_t::create (io_thread, true, this, options, paddr); errno_assert (session); // PGM does not support subscription forwarding; ask for all data to be // sent to this pipe. bool subscribe_to_all = protocol == "pgm" || protocol == "epgm"; pipe_t *newpipe = NULL; if (options.immediate != 1 || subscribe_to_all) { // Create a bi-directional pipe. object_t *parents [2] = {this, session}; pipe_t *new_pipes [2] = {NULL, NULL}; bool conflate = options.conflate && (options.type == ZMQ_DEALER || options.type == ZMQ_PULL || options.type == ZMQ_PUSH || options.type == ZMQ_PUB || options.type == ZMQ_SUB); int hwms [2] = {conflate? -1 : options.sndhwm, conflate? -1 : options.rcvhwm}; bool conflates [2] = {conflate, conflate}; rc = pipepair (parents, new_pipes, hwms, conflates); errno_assert (rc == 0); // Attach local end of the pipe to the socket object. attach_pipe (new_pipes [0], subscribe_to_all); newpipe = new_pipes [0]; // Attach remote end of the pipe to the session object later on. session->attach_pipe (new_pipes [1]); } // Save last endpoint URI paddr->to_string (last_endpoint); add_endpoint (addr_, (own_t *) session, newpipe); return 0; } void zmq::socket_base_t::add_endpoint (const char *addr_, own_t *endpoint_, pipe_t *pipe) { // Activate the session. Make it a child of this socket. launch_child (endpoint_); endpoints.insert (endpoints_t::value_type (std::string (addr_), endpoint_pipe_t(endpoint_, pipe))); } int zmq::socket_base_t::term_endpoint (const char *addr_) { // Check whether the library haven't been shut down yet. if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Check whether endpoint address passed to the function is valid. if (unlikely (!addr_)) { errno = EINVAL; return -1; } // Process pending commands, if any, since there could be pending unprocessed process_own()'s // (from launch_child() for example) we're asked to terminate now. int rc = process_commands (0, false); if (unlikely (rc != 0)) return -1; // Parse addr_ string. std::string protocol; std::string address; rc = parse_uri (addr_, protocol, address); if (rc != 0) return -1; rc = check_protocol (protocol); if (rc != 0) return -1; // Disconnect an inproc socket if (protocol == "inproc") { std::pair range = inprocs.equal_range (std::string (addr_)); if (range.first == range.second) { errno = ENOENT; return -1; } for (inprocs_t::iterator it = range.first; it != range.second; ++it) it->second->terminate(true); inprocs.erase (range.first, range.second); return 0; } // Find the endpoints range (if any) corresponding to the addr_ string. std::pair range = endpoints.equal_range (std::string (addr_)); if (range.first == range.second) { errno = ENOENT; return -1; } for (endpoints_t::iterator it = range.first; it != range.second; ++it) { // If we have an associated pipe, terminate it. if (it->second.second != NULL) it->second.second->terminate(false); term_child (it->second.first); } endpoints.erase (range.first, range.second); return 0; } int zmq::socket_base_t::send (msg_t *msg_, int flags_) { // Check whether the library haven't been shut down yet. if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Check whether message passed to the function is valid. if (unlikely (!msg_ || !msg_->check ())) { errno = EFAULT; return -1; } // Process pending commands, if any. int rc = process_commands (0, true); if (unlikely (rc != 0)) return -1; // Clear any user-visible flags that are set on the message. msg_->reset_flags (msg_t::more); // At this point we impose the flags on the message. if (flags_ & ZMQ_SNDMORE) msg_->set_flags (msg_t::more); // Try to send the message. rc = xsend (msg_); if (rc == 0) return 0; if (unlikely (errno != EAGAIN)) return -1; // In case of non-blocking send we'll simply propagate // the error - including EAGAIN - up the stack. if (flags_ & ZMQ_DONTWAIT || options.sndtimeo == 0) return -1; // Compute the time when the timeout should occur. // If the timeout is infinite, don't care. int timeout = options.sndtimeo; uint64_t end = timeout < 0 ? 0 : (clock.now_ms () + timeout); // Oops, we couldn't send the message. Wait for the next // command, process it and try to send the message again. // If timeout is reached in the meantime, return EAGAIN. while (true) { if (unlikely (process_commands (timeout, false) != 0)) return -1; rc = xsend (msg_); if (rc == 0) break; if (unlikely (errno != EAGAIN)) return -1; if (timeout > 0) { timeout = (int) (end - clock.now_ms ()); if (timeout <= 0) { errno = EAGAIN; return -1; } } } return 0; } int zmq::socket_base_t::recv (msg_t *msg_, int flags_) { // Check whether the library haven't been shut down yet. if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Check whether message passed to the function is valid. if (unlikely (!msg_ || !msg_->check ())) { errno = EFAULT; return -1; } // Once every inbound_poll_rate messages check for signals and process // incoming commands. This happens only if we are not polling altogether // because there are messages available all the time. If poll occurs, // ticks is set to zero and thus we avoid this code. // // Note that 'recv' uses different command throttling algorithm (the one // described above) from the one used by 'send'. This is because counting // ticks is more efficient than doing RDTSC all the time. if (++ticks == inbound_poll_rate) { if (unlikely (process_commands (0, false) != 0)) return -1; ticks = 0; } // Get the message. int rc = xrecv (msg_); if (unlikely (rc != 0 && errno != EAGAIN)) return -1; // If we have the message, return immediately. if (rc == 0) { extract_flags (msg_); return 0; } // If the message cannot be fetched immediately, there are two scenarios. // For non-blocking recv, commands are processed in case there's an // activate_reader command already waiting int a command pipe. // If it's not, return EAGAIN. if (flags_ & ZMQ_DONTWAIT || options.rcvtimeo == 0) { if (unlikely (process_commands (0, false) != 0)) return -1; ticks = 0; rc = xrecv (msg_); if (rc < 0) return rc; extract_flags (msg_); return 0; } // Compute the time when the timeout should occur. // If the timeout is infinite, don't care. int timeout = options.rcvtimeo; uint64_t end = timeout < 0 ? 0 : (clock.now_ms () + timeout); // In blocking scenario, commands are processed over and over again until // we are able to fetch a message. bool block = (ticks != 0); while (true) { if (unlikely (process_commands (block ? timeout : 0, false) != 0)) return -1; rc = xrecv (msg_); if (rc == 0) { ticks = 0; break; } if (unlikely (errno != EAGAIN)) return -1; block = true; if (timeout > 0) { timeout = (int) (end - clock.now_ms ()); if (timeout <= 0) { errno = EAGAIN; return -1; } } } extract_flags (msg_); return 0; } int zmq::socket_base_t::close () { // Mark the socket as dead tag = 0xdeadbeef; // Transfer the ownership of the socket from this application thread // to the reaper thread which will take care of the rest of shutdown // process. send_reap (this); return 0; } bool zmq::socket_base_t::has_in () { return xhas_in (); } bool zmq::socket_base_t::has_out () { return xhas_out (); } void zmq::socket_base_t::start_reaping (poller_t *poller_) { // Plug the socket to the reaper thread. poller = poller_; handle = poller->add_fd (mailbox.get_fd (), this); poller->set_pollin (handle); // Initialise the termination and check whether it can be deallocated // immediately. terminate (); check_destroy (); } int zmq::socket_base_t::process_commands (int timeout_, bool throttle_) { int rc; command_t cmd; if (timeout_ != 0) { // If we are asked to wait, simply ask mailbox to wait. rc = mailbox.recv (&cmd, timeout_); } else { // If we are asked not to wait, check whether we haven't processed // commands recently, so that we can throttle the new commands. // Get the CPU's tick counter. If 0, the counter is not available. uint64_t tsc = zmq::clock_t::rdtsc (); // Optimised version of command processing - it doesn't have to check // for incoming commands each time. It does so only if certain time // elapsed since last command processing. Command delay varies // depending on CPU speed: It's ~1ms on 3GHz CPU, ~2ms on 1.5GHz CPU // etc. The optimisation makes sense only on platforms where getting // a timestamp is a very cheap operation (tens of nanoseconds). if (tsc && throttle_) { // Check whether TSC haven't jumped backwards (in case of migration // between CPU cores) and whether certain time have elapsed since // last command processing. If it didn't do nothing. if (tsc >= last_tsc && tsc - last_tsc <= max_command_delay) return 0; last_tsc = tsc; } // Check whether there are any commands pending for this thread. rc = mailbox.recv (&cmd, 0); } // Process all available commands. while (rc == 0) { cmd.destination->process_command (cmd); rc = mailbox.recv (&cmd, 0); } if (errno == EINTR) return -1; zmq_assert (errno == EAGAIN); if (ctx_terminated) { errno = ETERM; return -1; } return 0; } void zmq::socket_base_t::process_stop () { // Here, someone have called zmq_term while the socket was still alive. // We'll remember the fact so that any blocking call is interrupted and any // further attempt to use the socket will return ETERM. The user is still // responsible for calling zmq_close on the socket though! stop_monitor (); ctx_terminated = true; } void zmq::socket_base_t::process_bind (pipe_t *pipe_) { attach_pipe (pipe_); } void zmq::socket_base_t::process_term (int linger_) { // Unregister all inproc endpoints associated with this socket. // Doing this we make sure that no new pipes from other sockets (inproc) // will be initiated. unregister_endpoints (this); // Ask all attached pipes to terminate. for (pipes_t::size_type i = 0; i != pipes.size (); ++i) pipes [i]->terminate (false); register_term_acks ((int) pipes.size ()); // Continue the termination process immediately. own_t::process_term (linger_); } void zmq::socket_base_t::process_destroy () { destroyed = true; } int zmq::socket_base_t::xsetsockopt (int, const void *, size_t) { errno = EINVAL; return -1; } bool zmq::socket_base_t::xhas_out () { return false; } int zmq::socket_base_t::xsend (msg_t *) { errno = ENOTSUP; return -1; } bool zmq::socket_base_t::xhas_in () { return false; } int zmq::socket_base_t::xrecv (msg_t *) { errno = ENOTSUP; return -1; } void zmq::socket_base_t::xread_activated (pipe_t *) { zmq_assert (false); } void zmq::socket_base_t::xwrite_activated (pipe_t *) { zmq_assert (false); } void zmq::socket_base_t::xhiccuped (pipe_t *) { zmq_assert (false); } void zmq::socket_base_t::in_event () { // This function is invoked only once the socket is running in the context // of the reaper thread. Process any commands from other threads/sockets // that may be available at the moment. Ultimately, the socket will // be destroyed. process_commands (0, false); check_destroy (); } void zmq::socket_base_t::out_event () { zmq_assert (false); } void zmq::socket_base_t::timer_event (int) { zmq_assert (false); } void zmq::socket_base_t::check_destroy () { // If the object was already marked as destroyed, finish the deallocation. if (destroyed) { // Remove the socket from the reaper's poller. poller->rm_fd (handle); // Remove the socket from the context. destroy_socket (this); // Notify the reaper about the fact. send_reaped (); // Deallocate. own_t::process_destroy (); } } void zmq::socket_base_t::read_activated (pipe_t *pipe_) { xread_activated (pipe_); } void zmq::socket_base_t::write_activated (pipe_t *pipe_) { xwrite_activated (pipe_); } void zmq::socket_base_t::hiccuped (pipe_t *pipe_) { if (options.immediate == 1) pipe_->terminate (false); else // Notify derived sockets of the hiccup xhiccuped (pipe_); } void zmq::socket_base_t::pipe_terminated (pipe_t *pipe_) { // Notify the specific socket type about the pipe termination. xpipe_terminated (pipe_); // Remove pipe from inproc pipes for (inprocs_t::iterator it = inprocs.begin(); it != inprocs.end(); ++it) { if (it->second == pipe_) { inprocs.erase(it); break; } } // Remove the pipe from the list of attached pipes and confirm its // termination if we are already shutting down. pipes.erase (pipe_); if (is_terminating ()) unregister_term_ack (); } void zmq::socket_base_t::extract_flags (msg_t *msg_) { // Test whether IDENTITY flag is valid for this socket type. if (unlikely (msg_->flags () & msg_t::identity)) zmq_assert (options.recv_identity); // Remove MORE flag. rcvmore = msg_->flags () & msg_t::more ? true : false; } int zmq::socket_base_t::monitor (const char *addr_, int events_) { int rc; if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Support deregistering monitoring endpoints as well if (addr_ == NULL) { stop_monitor (); return 0; } // Parse addr_ string. std::string protocol; std::string address; rc = parse_uri (addr_, protocol, address); if (rc != 0) return -1; rc = check_protocol (protocol); if (rc != 0) return -1; // Event notification only supported over inproc:// if (protocol != "inproc") { errno = EPROTONOSUPPORT; return -1; } // Register events to monitor monitor_events = events_; monitor_socket = zmq_socket (get_ctx (), ZMQ_PAIR); if (monitor_socket == NULL) return -1; // Never block context termination on pending event messages int linger = 0; rc = zmq_setsockopt (monitor_socket, ZMQ_LINGER, &linger, sizeof (linger)); if (rc == -1) stop_monitor (); // Spawn the monitor socket endpoint rc = zmq_bind (monitor_socket, addr_); if (rc == -1) stop_monitor (); return rc; } void zmq::socket_base_t::event_connected (std::string &addr_, int fd_) { if (monitor_events & ZMQ_EVENT_CONNECTED) { zmq_event_t event; event.event = ZMQ_EVENT_CONNECTED; event.value = fd_; monitor_event (event, addr_); } } void zmq::socket_base_t::event_connect_delayed (std::string &addr_, int err_) { if (monitor_events & ZMQ_EVENT_CONNECT_DELAYED) { zmq_event_t event; event.event = ZMQ_EVENT_CONNECT_DELAYED; event.value = err_; monitor_event (event, addr_); } } void zmq::socket_base_t::event_connect_retried (std::string &addr_, int interval_) { if (monitor_events & ZMQ_EVENT_CONNECT_RETRIED) { zmq_event_t event; event.event = ZMQ_EVENT_CONNECT_RETRIED; event.value = interval_; monitor_event (event, addr_); } } void zmq::socket_base_t::event_listening (std::string &addr_, int fd_) { if (monitor_events & ZMQ_EVENT_LISTENING) { zmq_event_t event; event.event = ZMQ_EVENT_LISTENING; event.value = fd_; monitor_event (event, addr_); } } void zmq::socket_base_t::event_bind_failed (std::string &addr_, int err_) { if (monitor_events & ZMQ_EVENT_BIND_FAILED) { zmq_event_t event; event.event = ZMQ_EVENT_BIND_FAILED; event.value = err_; monitor_event (event, addr_); } } void zmq::socket_base_t::event_accepted (std::string &addr_, int fd_) { if (monitor_events & ZMQ_EVENT_ACCEPTED) { zmq_event_t event; event.event = ZMQ_EVENT_ACCEPTED; event.value = fd_; monitor_event (event, addr_); } } void zmq::socket_base_t::event_accept_failed (std::string &addr_, int err_) { if (monitor_events & ZMQ_EVENT_ACCEPT_FAILED) { zmq_event_t event; event.event = ZMQ_EVENT_ACCEPT_FAILED; event.value= err_; monitor_event (event, addr_); } } void zmq::socket_base_t::event_closed (std::string &addr_, int fd_) { if (monitor_events & ZMQ_EVENT_CLOSED) { zmq_event_t event; event.event = ZMQ_EVENT_CLOSED; event.value = fd_; monitor_event (event, addr_); } } void zmq::socket_base_t::event_close_failed (std::string &addr_, int err_) { if (monitor_events & ZMQ_EVENT_CLOSE_FAILED) { zmq_event_t event; event.event = ZMQ_EVENT_CLOSE_FAILED; event.value = err_; monitor_event (event, addr_); } } void zmq::socket_base_t::event_disconnected (std::string &addr_, int fd_) { if (monitor_events & ZMQ_EVENT_DISCONNECTED) { zmq_event_t event; event.event = ZMQ_EVENT_DISCONNECTED; event.value = fd_; monitor_event (event, addr_); } } void zmq::socket_base_t::monitor_event (zmq_event_t event_, const std::string& addr_) { if (monitor_socket) { const uint16_t eid = (uint16_t)event_.event; const uint32_t value = (uint32_t)event_.value; // prepare and send first message frame // containing event id and value zmq_msg_t msg; zmq_msg_init_size (&msg, sizeof(eid) + sizeof(value)); char* data1 = (char*)zmq_msg_data(&msg); memcpy (data1, &eid, sizeof(eid)); memcpy (data1+sizeof(eid), &value, sizeof(value)); zmq_sendmsg (monitor_socket, &msg, ZMQ_SNDMORE); // prepare and send second message frame // containing the address (endpoint) zmq_msg_init_size (&msg, addr_.size()); memcpy(zmq_msg_data(&msg), addr_.c_str(), addr_.size()); zmq_sendmsg (monitor_socket, &msg, 0); } } void zmq::socket_base_t::stop_monitor() { if (monitor_socket) { if (monitor_events & ZMQ_EVENT_MONITOR_STOPPED) { zmq_event_t event; event.event = ZMQ_EVENT_MONITOR_STOPPED; event.value = 0; monitor_event (event, ""); } zmq_close (monitor_socket); monitor_socket = NULL; monitor_events = 0; } } zeromq3-4.0.4+dfsg.orig/src/mtrie.hpp0000644000175000017500000000537512240736636016376 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_MTRIE_HPP_INCLUDED__ #define __ZMQ_MTRIE_HPP_INCLUDED__ #include #include #include "stdint.hpp" namespace zmq { class pipe_t; // Multi-trie. Each node in the trie is a set of pointers to pipes. class mtrie_t { public: mtrie_t (); ~mtrie_t (); // Add key to the trie. Returns true if it's a new subscription // rather than a duplicate. bool add (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_); // Remove all subscriptions for a specific peer from the trie. // If there are no subscriptions left on some topics, invoke the // supplied callback function. void rm (zmq::pipe_t *pipe_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), void *arg_); // Remove specific subscription from the trie. Return true is it was // actually removed rather than de-duplicated. bool rm (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_); // Signal all the matching pipes. void match (unsigned char *data_, size_t size_, void (*func_) (zmq::pipe_t *pipe_, void *arg_), void *arg_); private: bool add_helper (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_); void rm_helper (zmq::pipe_t *pipe_, unsigned char **buff_, size_t buffsize_, size_t maxbuffsize_, void (*func_) (unsigned char *data_, size_t size_, void *arg_), void *arg_); bool rm_helper (unsigned char *prefix_, size_t size_, zmq::pipe_t *pipe_); bool is_redundant () const; typedef std::set pipes_t; pipes_t *pipes; unsigned char min; unsigned short count; unsigned short live_nodes; union { class mtrie_t *node; class mtrie_t **table; } next; mtrie_t (const mtrie_t&); const mtrie_t &operator = (const mtrie_t&); }; } #endif zeromq3-4.0.4+dfsg.orig/src/null_mechanism.hpp0000644000175000017500000000346212240736636020247 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_NULL_MECHANISM_HPP_INCLUDED__ #define __ZMQ_NULL_MECHANISM_HPP_INCLUDED__ #include "mechanism.hpp" #include "options.hpp" namespace zmq { class msg_t; class session_base_t; class null_mechanism_t : public mechanism_t { public: null_mechanism_t (session_base_t *session_, const std::string &peer_address, const options_t &options_); virtual ~null_mechanism_t (); // mechanism implementation virtual int next_handshake_command (msg_t *msg_); virtual int process_handshake_command (msg_t *msg_); virtual int zap_msg_available (); virtual bool is_handshake_complete () const; private: session_base_t * const session; const std::string peer_address; bool ready_command_sent; bool ready_command_received; bool zap_connected; bool zap_request_sent; bool zap_reply_received; void send_zap_request (); int receive_and_process_zap_reply (); }; } #endif zeromq3-4.0.4+dfsg.orig/src/pgm_sender.hpp0000644000175000017500000000574512240736636017402 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PGM_SENDER_HPP_INCLUDED__ #define __ZMQ_PGM_SENDER_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "stdint.hpp" #include "io_object.hpp" #include "i_engine.hpp" #include "options.hpp" #include "pgm_socket.hpp" #include "v1_encoder.hpp" #include "msg.hpp" namespace zmq { class io_thread_t; class session_base_t; class pgm_sender_t : public io_object_t, public i_engine { public: pgm_sender_t (zmq::io_thread_t *parent_, const options_t &options_); ~pgm_sender_t (); int init (bool udp_encapsulation_, const char *network_); // i_engine interface implementation. void plug (zmq::io_thread_t *io_thread_, zmq::session_base_t *session_); void terminate (); void restart_input (); void restart_output (); void zap_msg_available () {} // i_poll_events interface implementation. void in_event (); void out_event (); void timer_event (int token); private: // Unplug the engine from the session. void unplug (); // TX and RX timeout timer ID's. enum {tx_timer_id = 0xa0, rx_timer_id = 0xa1}; // Timers are running. bool has_tx_timer; bool has_rx_timer; session_base_t *session; // Message encoder. v1_encoder_t encoder; msg_t msg; // Keeps track of message boundaries. bool more_flag; // PGM socket. pgm_socket_t pgm_socket; // Socket options. options_t options; // Poll handle associated with PGM socket. handle_t handle; handle_t uplink_handle; handle_t rdata_notify_handle; handle_t pending_notify_handle; // Output buffer from pgm_socket. unsigned char *out_buffer; // Output buffer size. size_t out_buffer_size; // Number of bytes in the buffer to be written to the socket. // If zero, there are no data to be sent. size_t write_size; pgm_sender_t (const pgm_sender_t&); const pgm_sender_t &operator = (const pgm_sender_t&); }; } #endif #endif zeromq3-4.0.4+dfsg.orig/Makefile.in0000644000175000017500000006162512307430722016012 0ustar ghedoghedo# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in \ $(top_srcdir)/builds/redhat/zeromq.spec.in \ $(top_srcdir)/configure AUTHORS COPYING COPYING.LESSER INSTALL \ NEWS config/compile config/config.guess config/config.sub \ config/depcomp config/install-sh config/ltmain.sh \ config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = builds/redhat/zeromq.spec CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I config @BUILD_PGM_FALSE@SUBDIRS = src doc perf tests tools @BUILD_PGM_TRUE@SUBDIRS = foreign/openpgm src doc perf tests tools DIST_SUBDIRS = foreign/openpgm src doc perf tests tools builds/msvc EXTRA_DIST = \ autogen.sh \ version.sh \ MAINTAINERS \ foreign/openpgm/@pgm_basename@.tar.gz MAINTAINERCLEANFILES = \ $(srcdir)/aclocal.m4 \ $(srcdir)/autom4te.cache \ $(srcdir)/configure \ `find "$(srcdir)" -type f -name Makefile.in -print` all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): builds/redhat/zeromq.spec: $(top_builddir)/config.status $(top_srcdir)/builds/redhat/zeromq.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-local distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am dist-hook: @if test -d "$(srcdir)/.git"; \ then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/config/missing --run git log --stat ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi -cp $(top_srcdir)/builds/redhat/zeromq.spec $(distdir)/zeromq.spec -rm -rf $(distdir)/foreign/openpgm/build-staging distclean-local: -rm -rf $(top_srcdir)/foreign/openpgm/build-staging maintainer-clean-local: -rm -rf $(top_srcdir)/config # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq3-4.0.4+dfsg.orig/Makefile.am0000644000175000017500000000221012240736636015773 0ustar ghedoghedoACLOCAL_AMFLAGS = -I config if BUILD_PGM SUBDIRS = foreign/openpgm src doc perf tests tools else SUBDIRS = src doc perf tests tools endif DIST_SUBDIRS = foreign/openpgm src doc perf tests tools builds/msvc EXTRA_DIST = \ autogen.sh \ version.sh \ MAINTAINERS \ foreign/openpgm/@pgm_basename@.tar.gz MAINTAINERCLEANFILES = \ $(srcdir)/aclocal.m4 \ $(srcdir)/autom4te.cache \ $(srcdir)/configure \ `find "$(srcdir)" -type f -name Makefile.in -print` dist-hook: @if test -d "$(srcdir)/.git"; \ then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/config/missing --run git log --stat ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi -cp $(top_srcdir)/builds/redhat/zeromq.spec $(distdir)/zeromq.spec -rm -rf $(distdir)/foreign/openpgm/build-staging distclean-local: -rm -rf $(top_srcdir)/foreign/openpgm/build-staging maintainer-clean-local: -rm -rf $(top_srcdir)/config zeromq3-4.0.4+dfsg.orig/acinclude.m40000644000175000017500000010730212240736636016140 0ustar ghedoghedodnl ############################################################################## dnl # LIBZMQ_CONFIG_LIBTOOL # dnl # Configure libtool. Requires AC_CANONICAL_HOST # dnl ############################################################################## AC_DEFUN([LIBZMQ_CONFIG_LIBTOOL], [{ AC_REQUIRE([AC_CANONICAL_HOST]) # Libtool configuration for different targets case "${host_os}" in *mingw32*|*cygwin*) # Disable static build by default AC_DISABLE_STATIC ;; *) # Everything else with static enabled AC_ENABLE_STATIC ;; esac }]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_ICC([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using ICC # dnl # Adapted from http://software.intel.com/en-us/forums/showthread.php?t=67984 # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_ICC], [AC_CACHE_CHECK([whether we are using Intel _AC_LANG compiler], [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __INTEL_COMPILER error if not ICC #endif ]])], [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="no" ; $2]) ])]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_SUN_STUDIO([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using Sun Studio # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_SUN_STUDIO], [AC_CACHE_CHECK([whether we are using Sun Studio _AC_LANG compiler], [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C) error if not sun studio #endif ]])], [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="no" ; $2]) ])]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_CLANG([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using clang # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_CLANG], [AC_CACHE_CHECK([whether we are using clang _AC_LANG compiler], [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __clang__ error if not clang #endif ]])], [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="no" ; $2]) ])]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using clang # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_GCC4], [AC_CACHE_CHECK([whether we are using gcc >= 4 _AC_LANG compiler], [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#if (!defined __GNUC__ || __GNUC__ < 4) error if not gcc4 or higher #endif ]])], [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="no" ; $2]) ])]) dnl ############################################################################## dnl # LIBZMQ_CHECK_DOC_BUILD # dnl # Check whether to build documentation and install man-pages # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_DOC_BUILD], [{ # Allow user to disable doc build AC_ARG_WITH([documentation], [AS_HELP_STRING([--without-documentation], [disable documentation build even if asciidoc and xmlto are present [default=no]])]) if test "x$with_documentation" = "xno"; then libzmq_build_doc="no" libzmq_install_man="no" else # Determine whether or not documentation should be built and installed. libzmq_build_doc="yes" libzmq_install_man="yes" # Check for asciidoc and xmlto and don't build the docs if these are not installed. AC_CHECK_PROG(libzmq_have_asciidoc, asciidoc, yes, no) AC_CHECK_PROG(libzmq_have_xmlto, xmlto, yes, no) if test "x$libzmq_have_asciidoc" = "xno" -o "x$libzmq_have_xmlto" = "xno"; then libzmq_build_doc="no" # Tarballs built with 'make dist' ship with prebuilt documentation. if ! test -f doc/zmq.7; then libzmq_install_man="no" AC_MSG_WARN([You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed.]) AC_MSG_WARN([Documentation will not be built and manual pages will not be installed.]) fi fi # Do not install man pages if on mingw if test "x$libzmq_on_mingw32" = "xyes"; then libzmq_install_man="no" fi fi AC_MSG_CHECKING([whether to build documentation]) AC_MSG_RESULT([$libzmq_build_doc]) AC_MSG_CHECKING([whether to install manpages]) AC_MSG_RESULT([$libzmq_install_man]) AM_CONDITIONAL(BUILD_DOC, test "x$libzmq_build_doc" = "xyes") AM_CONDITIONAL(INSTALL_MAN, test "x$libzmq_install_man" = "xyes") }]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_COMPILER([action-if-found], [action-if-not-found]) # dnl # Check that compiler for the current language actually works # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_COMPILER], [{ # Test that compiler for the current language actually works AC_CACHE_CHECK([whether the _AC_LANG compiler works], [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works], [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="no" ; $2]) ]) if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works" != "xyes"; then AC_MSG_ERROR([Unable to find a working _AC_LANG compiler]) fi }]) dnl ############################################################################## dnl # LIBZMQ_CHECK_COMPILERS # dnl # Check compiler characteristics. This is so that we can AC_REQUIRE checks # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_COMPILERS], [{ # For that the compiler works and try to come up with the type AC_LANG_PUSH([C]) LIBZMQ_CHECK_LANG_COMPILER LIBZMQ_CHECK_LANG_ICC LIBZMQ_CHECK_LANG_SUN_STUDIO LIBZMQ_CHECK_LANG_CLANG LIBZMQ_CHECK_LANG_GCC4 AC_LANG_POP([C]) AC_LANG_PUSH(C++) LIBZMQ_CHECK_LANG_COMPILER LIBZMQ_CHECK_LANG_ICC LIBZMQ_CHECK_LANG_SUN_STUDIO LIBZMQ_CHECK_LANG_CLANG LIBZMQ_CHECK_LANG_GCC4 AC_LANG_POP([C++]) # Set GCC and GXX variables correctly if test "x$GCC" = "xyes"; then if test "xyes" = "x$libzmq_cv_c_intel_compiler"; then GCC="no" fi fi if test "x$GXX" = "xyes"; then if test "xyes" = "x$libzmq_cv_cxx_intel_compiler"; then GXX="no" fi fi }]) dnl ############################################################################ dnl # LIBZMQ_CHECK_LANG_FLAG([flag], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given flag. Works for C and C++ # dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # dnl ############################################################################ AC_DEFUN([LIBZMQ_CHECK_LANG_FLAG], [{ AC_REQUIRE([AC_PROG_GREP]) AC_MSG_CHECKING([whether _AC_LANG compiler supports $1]) libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag ac_[]_AC_LANG_ABBREV[]_werror_flag="yes" case "x[]_AC_LANG_ABBREV" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $1" ;; *) AC_MSG_WARN([testing compiler characteristic on an unknown language]) ;; esac AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on [if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no" else eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="yes" fi], [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no"]) case "x[]_AC_LANG_ABBREV" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_[]_AC_LANG_ABBREV[]_werror_flag=$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save # Call the action as the flags are restored AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [AC_MSG_RESULT(yes) ; $2], [AC_MSG_RESULT(no) ; $3]) }]) dnl #################################################################################### dnl # LIBZMQ_CHECK_LANG_FLAG_PREPEND([flag], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given flag. Works for C and C++ # dnl # This macro prepends the flag to CFLAGS or CPPFLAGS accordingly # dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # dnl #################################################################################### AC_DEFUN([LIBZMQ_CHECK_LANG_FLAG_PREPEND], [{ LIBZMQ_CHECK_LANG_FLAG([$1]) case "x[]_AC_LANG_ABBREV" in xc) AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [CFLAGS="$1 $CFLAGS"; $2], $3) ;; xcxx) AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [CPPFLAGS="$1 $CPPFLAGS"; $2], $3) ;; esac }]) dnl ############################################################################## dnl # LIBZMQ_CHECK_ENABLE_DEBUG([action-if-found], [action-if-not-found]) # dnl # Check whether to enable debug build and set compiler flags accordingly # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_ENABLE_DEBUG], [{ # Require compiler specifics AC_REQUIRE([LIBZMQ_CHECK_COMPILERS]) # This flag is checked also in AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [Enable debugging information [default=no]])]) AC_MSG_CHECKING(whether to enable debugging information) if test "x$enable_debug" = "xyes"; then # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ "x$libzmq_cv_c_clang_compiler" = "xyes"; then CFLAGS="-g -O0 " elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then CFLAGS="-g0 " fi # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then CPPFLAGS="-g -O0 " CXXFLAGS="-g -O0 " # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then CPPFLAGS="-g0 " CXXFLAGS="-g0 " fi if test "x$ZMQ_ORIG_CFLAGS" != "xnone"; then CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" fi if test "x$ZMQ_ORIG_CPPFLAGS" != "xnone"; then CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" fi if test "x$ZMQ_ORIG_CXXFLAGS" != "xnone"; then CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" fi AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi }]) dnl ############################################################################## dnl # LIBZMQ_WITH_GCOV([action-if-found], [action-if-not-found]) # dnl # Check whether to build with code coverage # dnl ############################################################################## AC_DEFUN([LIBZMQ_WITH_GCOV], [{ # Require compiler specifics AC_REQUIRE([LIBZMQ_CHECK_COMPILERS]) AC_ARG_WITH(gcov, [AS_HELP_STRING([--with-gcov=yes/no], [With GCC Code Coverage reporting.])], [ZMQ_GCOV="$withval"]) AC_MSG_CHECKING(whether to enable code coverage) if test "x$ZMQ_GCOV" = "xyes"; then if test "x$GXX" != "xyes"; then AC_MSG_ERROR([--with-gcov=yes works only with GCC]) fi CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" fi CPPFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" fi CXXFLAGS="-fprofile-arcs" if test "x${ZMQ_ORIG_CXXFLAGS}" != "xnone"; then CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" fi LIBS="-lgcov ${LIBS}" fi AS_IF([test "x$ZMQ_GCOV" = "xyes"], [AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2]) }]) dnl ############################################################################## dnl # LIBZMQ_CHECK_WITH_FLAG([flags], [macro]) # dnl # Runs a normal autoconf check with compiler flags # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_WITH_FLAG], [{ libzmq_check_with_flag_save_CFLAGS="$CFLAGS" libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS $1" CPPFLAGS="$CPPFLAGS $1" # Execute the macro $2 CFLAGS="$libzmq_check_with_flag_save_CFLAGS" CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" }]) dnl ############################################################################## dnl # LIBZMQ_LANG_WALL([action-if-found], [action-if-not-found]) # dnl # How to define -Wall for the current compiler # dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]__wall_flag variable to found style # dnl ############################################################################## AC_DEFUN([LIBZMQ_LANG_WALL], [{ AC_MSG_CHECKING([how to enable additional warnings for _AC_LANG compiler]) libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="" # C compilers case "x[]_AC_LANG_ABBREV" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-v" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="+w" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" != "x"; then AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag]) $1 else AC_MSG_RESULT([not found]) $2 fi }]) dnl #################################################################### dnl # LIBZMQ_LANG_STRICT([action-if-found], [action-if-not-found]) # dnl # Check how to turn on strict standards compliance # dnl #################################################################### AC_DEFUN([LIBZMQ_LANG_STRICT], [{ AC_MSG_CHECKING([how to enable strict standards compliance in _AC_LANG compiler]) libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="" # C compilers case "x[]_AC_LANG_ABBREV" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-Xc" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-compat=5" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag" != "x"; then AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag]) $1 else AC_MSG_RESULT([not found]) $2 fi }]) dnl ######################################################################## dnl # LIBZMQ_LANG_WERROR([action-if-found], [action-if-not-found]) # dnl # Check how to turn warnings to errors # dnl ######################################################################## AC_DEFUN([LIBZMQ_LANG_WERROR], [{ AC_MSG_CHECKING([how to turn warnings to errors in _AC_LANG compiler]) libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="" # C compilers case "x[]_AC_LANG_ABBREV" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag" != "x"; then AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag]) $1 else AC_MSG_RESULT([not found]) $2 fi }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_LANG_PRAGMA([pragma], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given pragma # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_LANG_PRAGMA], [{ # Need to know how to enable all warnings LIBZMQ_LANG_WALL AC_MSG_CHECKING([whether _AC_LANG compiler supports pragma $1]) # Save flags libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag ac_[]_AC_LANG_ABBREV[]_werror_flag="yes" if test "x[]_AC_LANG_ABBREV" = "xc"; then libzmq_cv_check_lang_pragma_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then libzmq_cv_check_lang_pragma_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" else AC_MSG_WARN([testing compiler characteristic on an unknown language]) fi AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#pragma $1]])], [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="yes" ; AC_MSG_RESULT(yes)], [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="no" ; AC_MSG_RESULT(no)]) if test "x[]_AC_LANG_ABBREV" = "xc"; then CFLAGS="$libzmq_cv_check_lang_pragma_save_CFLAGS" elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then CPPFLAGS="$libzmq_cv_check_lang_pragma_save_CPPFLAGS" fi ac_[]_AC_LANG_ABBREV[]_werror_flag=$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save # Call the action as the flags are restored AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)[ = "xyes"], [$2], [$3]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_LANG_VISIBILITY([action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports dso visibility # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_LANG_VISIBILITY], [{ libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="" if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler" = "xyes"; then LIBZMQ_CHECK_LANG_FLAG([-fvisibility=hidden], [libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-fvisibility=hidden"]) elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then LIBZMQ_CHECK_LANG_FLAG([-xldscope=hidden], [libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-xldscope=hidden"]) fi AC_MSG_CHECKING(whether _AC_LANG compiler supports dso visibility) AS_IF([test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag" != "x"], [AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_SOCK_CLOEXEC([action-if-found], [action-if-not-found]) # dnl # Check if SOCK_CLOEXEC is supported # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_SOCK_CLOEXEC], [{ AC_MSG_CHECKING(whether SOCK_CLOEXEC is supported) AC_TRY_RUN([/* SOCK_CLOEXEC test */ #include #include int main (int argc, char *argv []) { int s = socket (PF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); return (s == -1); } ], [AC_MSG_RESULT(yes) ; libzmq_cv_sock_cloexec="yes" ; $1], [AC_MSG_RESULT(no) ; libzmq_cv_sock_cloexec="no" ; $2], [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_sock_cloexec="no"] ) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_SO_KEEPALIVE([action-if-found], [action-if-not-found]) # dnl # Check if SO_KEEPALIVE is supported # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_SO_KEEPALIVE], [{ AC_MSG_CHECKING(whether SO_KEEPALIVE is supported) AC_TRY_RUN([/* SO_KEEPALIVE test */ #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) ); } ], [AC_MSG_RESULT(yes) ; libzmq_cv_so_keepalive="yes" ; $1], [AC_MSG_RESULT(no) ; libzmq_cv_so_keepalive="no" ; $2], [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_so_keepalive="no"] ) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_TCP_KEEPCNT([action-if-found], [action-if-not-found]) # dnl # Check if TCP_KEEPCNT is supported # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPCNT], [{ AC_MSG_CHECKING(whether TCP_KEEPCNT is supported) AC_TRY_RUN([/* TCP_KEEPCNT test */ #include #include #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) || ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPCNT, (char*) &opt, sizeof (int))) == -1) ); } ], [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepcnt="yes" ; $1], [AC_MSG_RESULT(no) ; libzmq_cv_tcp_keepcnt="no" ; $2], [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepcnt="no"] ) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_TCP_KEEPIDLE([action-if-found], [action-if-not-found]) # dnl # Check if TCP_KEEPIDLE is supported # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPIDLE], [{ AC_MSG_CHECKING(whether TCP_KEEPIDLE is supported) AC_TRY_RUN([/* TCP_KEEPIDLE test */ #include #include #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) || ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPIDLE, (char*) &opt, sizeof (int))) == -1) ); } ], [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepidle="yes" ; $1], [AC_MSG_RESULT(no) ; libzmq_cv_tcp_keepidle="no" ; $2], [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepidle="no"] ) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_TCP_KEEPINTVL([action-if-found], [action-if-not-found]) # dnl # Check if TCP_KEEPINTVL is supported # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPINTVL], [{ AC_MSG_CHECKING(whether TCP_KEEPINTVL is supported) AC_TRY_RUN([/* TCP_KEEPINTVL test */ #include #include #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) || ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPINTVL, (char*) &opt, sizeof (int))) == -1) ); } ], [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepintvl="yes" ; $1], [AC_MSG_RESULT(no) ; libzmq_cv_tcp_keepintvl="no" ; $2], [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepintvl="no"] ) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_TCP_KEEPALIVE([action-if-found], [action-if-not-found]) # dnl # Check if TCP_KEEPALIVE is supported # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPALIVE], [{ AC_MSG_CHECKING(whether TCP_KEEPALIVE is supported) AC_TRY_RUN([/* TCP_KEEPALIVE test */ #include #include #include #include int main (int argc, char *argv []) { int s, rc, opt = 1; return ( ((s = socket (PF_INET, SOCK_STREAM, 0)) == -1) || ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) || ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) ); } ], [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepalive="yes" ; $1], [AC_MSG_RESULT(no) ; libzmq_cv_tcp_keepalive="no" ; $2], [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepalive="no"] ) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_KQUEUE([action-if-found], [action-if-not-found]) # dnl # Checks kqueue polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_KQUEUE], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #include #include #include ], [[ struct kevent t_kev; kqueue(); ]] )], [libzmq_cv_have_poller_kqueue="yes" ; $1], [libzmq_cv_have_poller_kqueue="no" ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_EPOLL_RUN([action-if-found], [action-if-not-found]) # dnl # Checks epoll polling system can actually run # dnl # For cross-compile, only requires that epoll can link # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_EPOLL], [{ AC_RUN_IFELSE( [AC_LANG_PROGRAM( [ #include ], [[ struct epoll_event t_ev; int r; r = epoll_create(10); return(r < 0); ]] )], [libzmq_cv_have_poller_epoll="yes" ; $1], [libzmq_cv_have_poller_epoll="no" ; $2], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #include ], [[ struct epoll_event t_ev; epoll_create(10); ]] )], [libzmq_cv_have_poller_epoll="yes" ; $1], [libzmq_cv_have_poller_epoll="no" ; $2]) ]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_DEVPOLL([action-if-found], [action-if-not-found]) # dnl # Checks devpoll polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_DEVPOLL], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #include ], [[ struct pollfd t_devpoll; int fd = open("/dev/poll", O_RDWR); ]] )], [libzmq_cv_have_poller_devpoll="yes" ; $1], [libzmq_cv_have_poller_devpoll="no" ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_POLL([action-if-found], [action-if-not-found]) # dnl # Checks poll polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_POLL], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #include ], [[ struct pollfd t_poll; poll(&t_poll, 1, 1); ]] )], [libzmq_cv_have_poller_poll="yes" ; $1], [libzmq_cv_have_poller_poll="no" ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_SELECT([action-if-found], [action-if-not-found]) # dnl # Checks select polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_SELECT], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #ifdef ZMQ_HAVE_WINDOWS #include "winsock2.h" #elif defined ZMQ_HAVE_OPENVMS #include #include #else #include #endif ], [[ fd_set t_rfds; struct timeval tv; FD_ZERO(&t_rfds); FD_SET(0, &t_rfds); tv.tv_sec = 5; tv.tv_usec = 0; select(1, &t_rfds, NULL, NULL, &tv); ]] )], [libzmq_cv_have_poller_select="yes" ; $1], [libzmq_cv_have_poller_select="no" ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER([action-if-found], [action-if-not-found]) # dnl # Choose polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{ # Allow user to disable doc build AC_ARG_WITH([poller], [AS_HELP_STRING([--with-poller], [choose polling system manually. valid values are kqueue, epoll, devpoll, poll or select [default=autodetect]])]) AC_MSG_CHECKING([for suitable polling system]) case "${with_poller}" in kqueue|epoll|devpoll|poll|select) # User has chosen polling system libzmq_cv_poller="${with_poller}" ;; *) # try to find suitable polling system. the order of testing is: # kqueue -> epoll -> devpoll -> poll -> select for subsystem in kqueue epoll devpoll poll select; do case "${subsystem}" in kqueue) LIBZMQ_CHECK_POLLER_KQUEUE([libzmq_cv_poller=$subsystem], []) ;; epoll) LIBZMQ_CHECK_POLLER_EPOLL([libzmq_cv_poller=$subsystem], []) ;; devpoll) LIBZMQ_CHECK_POLLER_DEVPOLL([libzmq_cv_poller=$subsystem], []) ;; poll) LIBZMQ_CHECK_POLLER_POLL([libzmq_cv_poller=$subsystem], []) ;; select) LIBZMQ_CHECK_POLLER_SELECT([libzmq_cv_poller=$subsystem], []) ;; esac if test "x${libzmq_cv_poller}" != "x"; then break fi done ;; esac libzmq_cv_poller_flag=`echo "ZMQ_FORCE_${libzmq_cv_poller}" | tr a-z A-Z` AS_IF([test "x${libzmq_cv_poller}" != "x"], [AC_MSG_RESULT([using $libzmq_cv_poller]) ; $1], [AC_MSG_RESULT(no suitable polling system found) ; $2]) }]) zeromq3-4.0.4+dfsg.orig/include/0000755000175000017500000000000012307431206015354 5ustar ghedoghedozeromq3-4.0.4+dfsg.orig/include/zmq.h0000644000175000017500000003340412251014562016340 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . ************************************************************************* NOTE to contributors. This file comprises the principal public contract for ZeroMQ API users (along with zmq_utils.h). Any change to this file supplied in a stable release SHOULD not break existing applications. In practice this means that the value of constants must not change, and that old values may not be reused for new constants. ************************************************************************* */ #ifndef __ZMQ_H_INCLUDED__ #define __ZMQ_H_INCLUDED__ /* Version macros for compile-time API version detection */ #define ZMQ_VERSION_MAJOR 4 #define ZMQ_VERSION_MINOR 0 #define ZMQ_VERSION_PATCH 4 #define ZMQ_MAKE_VERSION(major, minor, patch) \ ((major) * 10000 + (minor) * 100 + (patch)) #define ZMQ_VERSION \ ZMQ_MAKE_VERSION(ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH) #ifdef __cplusplus extern "C" { #endif #if !defined _WIN32_WCE #include #endif #include #include #if defined _WIN32 #include #endif /* Handle DSO symbol visibility */ #if defined _WIN32 # if defined ZMQ_STATIC # define ZMQ_EXPORT # elif defined DLL_EXPORT # define ZMQ_EXPORT __declspec(dllexport) # else # define ZMQ_EXPORT __declspec(dllimport) # endif #else # if defined __SUNPRO_C || defined __SUNPRO_CC # define ZMQ_EXPORT __global # elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER # define ZMQ_EXPORT __attribute__ ((visibility("default"))) # else # define ZMQ_EXPORT # endif #endif /* Define integer types needed for event interface */ #if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS # include #elif defined _MSC_VER && _MSC_VER < 1600 # ifndef int32_t typedef __int32 int32_t; # endif # ifndef uint16_t typedef unsigned __int16 uint16_t; # endif # ifndef uint8_t typedef unsigned __int8 uint8_t; # endif #else # include #endif /******************************************************************************/ /* 0MQ errors. */ /******************************************************************************/ /* A number random enough not to collide with different errno ranges on */ /* different OSes. The assumption is that error_t is at least 32-bit type. */ #define ZMQ_HAUSNUMERO 156384712 /* On Windows platform some of the standard POSIX errnos are not defined. */ #ifndef ENOTSUP #define ENOTSUP (ZMQ_HAUSNUMERO + 1) #endif #ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT (ZMQ_HAUSNUMERO + 2) #endif #ifndef ENOBUFS #define ENOBUFS (ZMQ_HAUSNUMERO + 3) #endif #ifndef ENETDOWN #define ENETDOWN (ZMQ_HAUSNUMERO + 4) #endif #ifndef EADDRINUSE #define EADDRINUSE (ZMQ_HAUSNUMERO + 5) #endif #ifndef EADDRNOTAVAIL #define EADDRNOTAVAIL (ZMQ_HAUSNUMERO + 6) #endif #ifndef ECONNREFUSED #define ECONNREFUSED (ZMQ_HAUSNUMERO + 7) #endif #ifndef EINPROGRESS #define EINPROGRESS (ZMQ_HAUSNUMERO + 8) #endif #ifndef ENOTSOCK #define ENOTSOCK (ZMQ_HAUSNUMERO + 9) #endif #ifndef EMSGSIZE #define EMSGSIZE (ZMQ_HAUSNUMERO + 10) #endif #ifndef EAFNOSUPPORT #define EAFNOSUPPORT (ZMQ_HAUSNUMERO + 11) #endif #ifndef ENETUNREACH #define ENETUNREACH (ZMQ_HAUSNUMERO + 12) #endif #ifndef ECONNABORTED #define ECONNABORTED (ZMQ_HAUSNUMERO + 13) #endif #ifndef ECONNRESET #define ECONNRESET (ZMQ_HAUSNUMERO + 14) #endif #ifndef ENOTCONN #define ENOTCONN (ZMQ_HAUSNUMERO + 15) #endif #ifndef ETIMEDOUT #define ETIMEDOUT (ZMQ_HAUSNUMERO + 16) #endif #ifndef EHOSTUNREACH #define EHOSTUNREACH (ZMQ_HAUSNUMERO + 17) #endif #ifndef ENETRESET #define ENETRESET (ZMQ_HAUSNUMERO + 18) #endif /* Native 0MQ error codes. */ #define EFSM (ZMQ_HAUSNUMERO + 51) #define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 52) #define ETERM (ZMQ_HAUSNUMERO + 53) #define EMTHREAD (ZMQ_HAUSNUMERO + 54) /* Run-time API version detection */ ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch); /* This function retrieves the errno as it is known to 0MQ library. The goal */ /* of this function is to make the code 100% portable, including where 0MQ */ /* compiled with certain CRT library (on Windows) is linked to an */ /* application that uses different CRT library. */ ZMQ_EXPORT int zmq_errno (void); /* Resolves system errors and 0MQ errors to human-readable string. */ ZMQ_EXPORT const char *zmq_strerror (int errnum); /******************************************************************************/ /* 0MQ infrastructure (a.k.a. context) initialisation & termination. */ /******************************************************************************/ /* New API */ /* Context options */ #define ZMQ_IO_THREADS 1 #define ZMQ_MAX_SOCKETS 2 /* Default for new contexts */ #define ZMQ_IO_THREADS_DFLT 1 #define ZMQ_MAX_SOCKETS_DFLT 1023 ZMQ_EXPORT void *zmq_ctx_new (void); ZMQ_EXPORT int zmq_ctx_term (void *context); ZMQ_EXPORT int zmq_ctx_shutdown (void *ctx_); ZMQ_EXPORT int zmq_ctx_set (void *context, int option, int optval); ZMQ_EXPORT int zmq_ctx_get (void *context, int option); /* Old (legacy) API */ ZMQ_EXPORT void *zmq_init (int io_threads); ZMQ_EXPORT int zmq_term (void *context); ZMQ_EXPORT int zmq_ctx_destroy (void *context); /******************************************************************************/ /* 0MQ message definition. */ /******************************************************************************/ typedef struct zmq_msg_t {unsigned char _ [32];} zmq_msg_t; typedef void (zmq_free_fn) (void *data, void *hint); ZMQ_EXPORT int zmq_msg_init (zmq_msg_t *msg); ZMQ_EXPORT int zmq_msg_init_size (zmq_msg_t *msg, size_t size); ZMQ_EXPORT int zmq_msg_init_data (zmq_msg_t *msg, void *data, size_t size, zmq_free_fn *ffn, void *hint); ZMQ_EXPORT int zmq_msg_send (zmq_msg_t *msg, void *s, int flags); ZMQ_EXPORT int zmq_msg_recv (zmq_msg_t *msg, void *s, int flags); ZMQ_EXPORT int zmq_msg_close (zmq_msg_t *msg); ZMQ_EXPORT int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src); ZMQ_EXPORT int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src); ZMQ_EXPORT void *zmq_msg_data (zmq_msg_t *msg); ZMQ_EXPORT size_t zmq_msg_size (zmq_msg_t *msg); ZMQ_EXPORT int zmq_msg_more (zmq_msg_t *msg); ZMQ_EXPORT int zmq_msg_get (zmq_msg_t *msg, int option); ZMQ_EXPORT int zmq_msg_set (zmq_msg_t *msg, int option, int optval); /******************************************************************************/ /* 0MQ socket definition. */ /******************************************************************************/ /* Socket types. */ #define ZMQ_PAIR 0 #define ZMQ_PUB 1 #define ZMQ_SUB 2 #define ZMQ_REQ 3 #define ZMQ_REP 4 #define ZMQ_DEALER 5 #define ZMQ_ROUTER 6 #define ZMQ_PULL 7 #define ZMQ_PUSH 8 #define ZMQ_XPUB 9 #define ZMQ_XSUB 10 #define ZMQ_STREAM 11 /* Deprecated aliases */ #define ZMQ_XREQ ZMQ_DEALER #define ZMQ_XREP ZMQ_ROUTER /* Socket options. */ #define ZMQ_AFFINITY 4 #define ZMQ_IDENTITY 5 #define ZMQ_SUBSCRIBE 6 #define ZMQ_UNSUBSCRIBE 7 #define ZMQ_RATE 8 #define ZMQ_RECOVERY_IVL 9 #define ZMQ_SNDBUF 11 #define ZMQ_RCVBUF 12 #define ZMQ_RCVMORE 13 #define ZMQ_FD 14 #define ZMQ_EVENTS 15 #define ZMQ_TYPE 16 #define ZMQ_LINGER 17 #define ZMQ_RECONNECT_IVL 18 #define ZMQ_BACKLOG 19 #define ZMQ_RECONNECT_IVL_MAX 21 #define ZMQ_MAXMSGSIZE 22 #define ZMQ_SNDHWM 23 #define ZMQ_RCVHWM 24 #define ZMQ_MULTICAST_HOPS 25 #define ZMQ_RCVTIMEO 27 #define ZMQ_SNDTIMEO 28 #define ZMQ_LAST_ENDPOINT 32 #define ZMQ_ROUTER_MANDATORY 33 #define ZMQ_TCP_KEEPALIVE 34 #define ZMQ_TCP_KEEPALIVE_CNT 35 #define ZMQ_TCP_KEEPALIVE_IDLE 36 #define ZMQ_TCP_KEEPALIVE_INTVL 37 #define ZMQ_TCP_ACCEPT_FILTER 38 #define ZMQ_IMMEDIATE 39 #define ZMQ_XPUB_VERBOSE 40 #define ZMQ_ROUTER_RAW 41 #define ZMQ_IPV6 42 #define ZMQ_MECHANISM 43 #define ZMQ_PLAIN_SERVER 44 #define ZMQ_PLAIN_USERNAME 45 #define ZMQ_PLAIN_PASSWORD 46 #define ZMQ_CURVE_SERVER 47 #define ZMQ_CURVE_PUBLICKEY 48 #define ZMQ_CURVE_SECRETKEY 49 #define ZMQ_CURVE_SERVERKEY 50 #define ZMQ_PROBE_ROUTER 51 #define ZMQ_REQ_CORRELATE 52 #define ZMQ_REQ_RELAXED 53 #define ZMQ_CONFLATE 54 #define ZMQ_ZAP_DOMAIN 55 /* Message options */ #define ZMQ_MORE 1 /* Send/recv options. */ #define ZMQ_DONTWAIT 1 #define ZMQ_SNDMORE 2 /* Security mechanisms */ #define ZMQ_NULL 0 #define ZMQ_PLAIN 1 #define ZMQ_CURVE 2 /* Deprecated options and aliases */ #define ZMQ_IPV4ONLY 31 #define ZMQ_DELAY_ATTACH_ON_CONNECT ZMQ_IMMEDIATE #define ZMQ_NOBLOCK ZMQ_DONTWAIT #define ZMQ_FAIL_UNROUTABLE ZMQ_ROUTER_MANDATORY #define ZMQ_ROUTER_BEHAVIOR ZMQ_ROUTER_MANDATORY /******************************************************************************/ /* 0MQ socket events and monitoring */ /******************************************************************************/ /* Socket transport events (tcp and ipc only) */ #define ZMQ_EVENT_CONNECTED 1 #define ZMQ_EVENT_CONNECT_DELAYED 2 #define ZMQ_EVENT_CONNECT_RETRIED 4 #define ZMQ_EVENT_LISTENING 8 #define ZMQ_EVENT_BIND_FAILED 16 #define ZMQ_EVENT_ACCEPTED 32 #define ZMQ_EVENT_ACCEPT_FAILED 64 #define ZMQ_EVENT_CLOSED 128 #define ZMQ_EVENT_CLOSE_FAILED 256 #define ZMQ_EVENT_DISCONNECTED 512 #define ZMQ_EVENT_MONITOR_STOPPED 1024 #define ZMQ_EVENT_ALL ( ZMQ_EVENT_CONNECTED | ZMQ_EVENT_CONNECT_DELAYED | \ ZMQ_EVENT_CONNECT_RETRIED | ZMQ_EVENT_LISTENING | \ ZMQ_EVENT_BIND_FAILED | ZMQ_EVENT_ACCEPTED | \ ZMQ_EVENT_ACCEPT_FAILED | ZMQ_EVENT_CLOSED | \ ZMQ_EVENT_CLOSE_FAILED | ZMQ_EVENT_DISCONNECTED | \ ZMQ_EVENT_MONITOR_STOPPED) /* Socket event data */ typedef struct { uint16_t event; // id of the event as bitfield int32_t value ; // value is either error code, fd or reconnect interval } zmq_event_t; ZMQ_EXPORT void *zmq_socket (void *, int type); ZMQ_EXPORT int zmq_close (void *s); ZMQ_EXPORT int zmq_setsockopt (void *s, int option, const void *optval, size_t optvallen); ZMQ_EXPORT int zmq_getsockopt (void *s, int option, void *optval, size_t *optvallen); ZMQ_EXPORT int zmq_bind (void *s, const char *addr); ZMQ_EXPORT int zmq_connect (void *s, const char *addr); ZMQ_EXPORT int zmq_unbind (void *s, const char *addr); ZMQ_EXPORT int zmq_disconnect (void *s, const char *addr); ZMQ_EXPORT int zmq_send (void *s, const void *buf, size_t len, int flags); ZMQ_EXPORT int zmq_send_const (void *s, const void *buf, size_t len, int flags); ZMQ_EXPORT int zmq_recv (void *s, void *buf, size_t len, int flags); ZMQ_EXPORT int zmq_socket_monitor (void *s, const char *addr, int events); ZMQ_EXPORT int zmq_sendmsg (void *s, zmq_msg_t *msg, int flags); ZMQ_EXPORT int zmq_recvmsg (void *s, zmq_msg_t *msg, int flags); /* Experimental */ struct iovec; ZMQ_EXPORT int zmq_sendiov (void *s, struct iovec *iov, size_t count, int flags); ZMQ_EXPORT int zmq_recviov (void *s, struct iovec *iov, size_t *count, int flags); /******************************************************************************/ /* I/O multiplexing. */ /******************************************************************************/ #define ZMQ_POLLIN 1 #define ZMQ_POLLOUT 2 #define ZMQ_POLLERR 4 typedef struct { void *socket; #if defined _WIN32 SOCKET fd; #else int fd; #endif short events; short revents; } zmq_pollitem_t; #define ZMQ_POLLITEMS_DFLT 16 ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout); /* Built-in message proxy (3-way) */ ZMQ_EXPORT int zmq_proxy (void *frontend, void *backend, void *capture); /* Encode a binary key as printable text using ZMQ RFC 32 */ ZMQ_EXPORT char *zmq_z85_encode (char *dest, uint8_t *data, size_t size); /* Encode a binary key from printable text per ZMQ RFC 32 */ ZMQ_EXPORT uint8_t *zmq_z85_decode (uint8_t *dest, char *string); /* Deprecated aliases */ #define ZMQ_STREAMER 1 #define ZMQ_FORWARDER 2 #define ZMQ_QUEUE 3 /* Deprecated method */ ZMQ_EXPORT int zmq_device (int type, void *frontend, void *backend); #undef ZMQ_EXPORT #ifdef __cplusplus } #endif #endif zeromq3-4.0.4+dfsg.orig/include/zmq_utils.h0000644000175000017500000000700412240736636017570 0ustar ghedoghedo/* Copyright (c) 2007-2013 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_UTILS_H_INCLUDED__ #define __ZMQ_UTILS_H_INCLUDED__ #include #include #include /* Define integer types needed for event interface */ #if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS # include #elif defined _MSC_VER && _MSC_VER < 1600 # ifndef int32_t typedef __int32 int32_t; # endif # ifndef uint16_t typedef unsigned __int16 uint16_t; # endif #else # include #endif #ifdef __cplusplus extern "C" { #endif /* Handle DSO symbol visibility */ #if defined _WIN32 # if defined ZMQ_STATIC # define ZMQ_EXPORT # elif defined DLL_EXPORT # define ZMQ_EXPORT __declspec(dllexport) # else # define ZMQ_EXPORT __declspec(dllimport) # endif #else # if defined __SUNPRO_C || defined __SUNPRO_CC # define ZMQ_EXPORT __global # elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER # define ZMQ_EXPORT __attribute__ ((visibility("default"))) # else # define ZMQ_EXPORT # endif #endif /* These functions are documented by man pages */ /* Encode data with Z85 encoding. Returns encoded data */ ZMQ_EXPORT char *zmq_z85_encode (char *dest, uint8_t *data, size_t size); /* Decode data with Z85 encoding. Returns decoded data */ ZMQ_EXPORT uint8_t *zmq_z85_decode (uint8_t *dest, char *string); /* Generate z85-encoded public and private keypair with libsodium. */ /* Returns 0 on success. */ ZMQ_EXPORT int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key); typedef void (zmq_thread_fn) (void*); /* These functions are not documented by man pages */ /* Helper functions are used by perf tests so that they don't have to care */ /* about minutiae of time-related functions on different OS platforms. */ /* Starts the stopwatch. Returns the handle to the watch. */ ZMQ_EXPORT void *zmq_stopwatch_start (void); /* Stops the stopwatch. Returns the number of microseconds elapsed since */ /* the stopwatch was started. */ ZMQ_EXPORT unsigned long zmq_stopwatch_stop (void *watch_); /* Sleeps for specified number of seconds. */ ZMQ_EXPORT void zmq_sleep (int seconds_); /* Start a thread. Returns a handle to the thread. */ ZMQ_EXPORT void *zmq_threadstart (zmq_thread_fn* func, void* arg); /* Wait for thread to complete then free up resources. */ ZMQ_EXPORT void zmq_threadclose (void* thread); #undef ZMQ_EXPORT #ifdef __cplusplus } #endif #endif