rbczmq 1.6.2 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -3
- data/.gitmodules +6 -0
- data/.travis.yml +5 -1
- data/CHANGELOG.rdoc +15 -0
- data/Gemfile.lock +2 -2
- data/README.rdoc +5 -2
- data/Rakefile +8 -3
- data/ext/czmq/.gitignore +52 -0
- data/ext/czmq/.travis.yml +18 -0
- data/ext/czmq/AUTHORS +9 -0
- data/ext/czmq/COPYING +674 -0
- data/ext/czmq/COPYING.LESSER +178 -0
- data/ext/czmq/ChangeLog +0 -0
- data/ext/czmq/Makefile.am +22 -0
- data/ext/czmq/NEWS +263 -0
- data/ext/czmq/README +0 -0
- data/ext/czmq/README.md +1122 -0
- data/ext/czmq/README.txt +327 -0
- data/ext/czmq/autogen.sh +46 -0
- data/ext/czmq/builds/android/Android.mk +35 -0
- data/ext/czmq/builds/android/Application.mk +1 -0
- data/ext/czmq/builds/android/build.sh +59 -0
- data/ext/czmq/builds/android/clean.sh +26 -0
- data/ext/czmq/builds/mingw32/Makefile.mingw32 +38 -0
- data/ext/czmq/builds/mingw32/platform.h +0 -0
- data/ext/czmq/builds/msvc/.gitignore +18 -0
- data/ext/czmq/builds/msvc/README.txt +17 -0
- data/ext/czmq/builds/msvc/czmq.sln +69 -0
- data/ext/czmq/builds/msvc/czmq.vcproj +2246 -0
- data/ext/czmq/builds/msvc/czmq.vcxproj +329 -0
- data/ext/czmq/builds/msvc/czmq.vcxproj.filters +117 -0
- data/ext/czmq/builds/msvc/czmq11.sln +36 -0
- data/ext/czmq/builds/msvc/czmq_selftest.vcproj +840 -0
- data/ext/czmq/builds/msvc/czmq_selftest.vcxproj +189 -0
- data/ext/czmq/builds/msvc/czmq_selftest.vcxproj.filters +14 -0
- data/ext/czmq/c +520 -0
- data/ext/czmq/configure.ac +229 -0
- data/ext/czmq/doc/Makefile.am +49 -0
- data/ext/czmq/doc/asciidoc.conf +57 -0
- data/ext/czmq/doc/czmq.txt +334 -0
- data/ext/czmq/doc/mkman +100 -0
- data/ext/czmq/doc/mksite +65 -0
- data/ext/czmq/doc/wdput +43 -0
- data/ext/czmq/doc/xml2wd.pl +242 -0
- data/ext/czmq/doc/zbeacon.txt +173 -0
- data/ext/czmq/doc/zclock.txt +51 -0
- data/ext/czmq/doc/zconfig.txt +92 -0
- data/ext/czmq/doc/zctx.txt +111 -0
- data/ext/czmq/doc/zfile.txt +77 -0
- data/ext/czmq/doc/zframe.txt +222 -0
- data/ext/czmq/doc/zhash.txt +225 -0
- data/ext/czmq/doc/zlist.txt +176 -0
- data/ext/czmq/doc/zloop.txt +106 -0
- data/ext/czmq/doc/zmsg.txt +315 -0
- data/ext/czmq/doc/zmutex.txt +54 -0
- data/ext/czmq/doc/zsocket.txt +110 -0
- data/ext/czmq/doc/zsockopt.txt +528 -0
- data/ext/czmq/doc/zstr.txt +80 -0
- data/ext/czmq/doc/zsys.txt +44 -0
- data/ext/czmq/doc/zthread.txt +126 -0
- data/ext/czmq/doc/ztree.txt +236 -0
- data/ext/czmq/images/README_1.png +0 -0
- data/ext/czmq/images/README_2.png +0 -0
- data/ext/czmq/include/czmq.h +64 -0
- data/ext/czmq/include/czmq_prelude.h +504 -0
- data/ext/czmq/include/zbeacon.h +91 -0
- data/ext/czmq/include/zclock.h +56 -0
- data/ext/czmq/include/zconfig.h +117 -0
- data/ext/czmq/include/zctx.h +96 -0
- data/ext/czmq/include/zfile.h +82 -0
- data/ext/czmq/include/zframe.h +145 -0
- data/ext/czmq/include/zhash.h +127 -0
- data/ext/czmq/include/zlist.h +113 -0
- data/ext/czmq/include/zloop.h +98 -0
- data/ext/czmq/include/zmsg.h +165 -0
- data/ext/czmq/include/zmutex.h +62 -0
- data/ext/czmq/include/zsocket.h +104 -0
- data/ext/czmq/include/zsockopt.h +249 -0
- data/ext/czmq/include/zstr.h +69 -0
- data/ext/czmq/include/zsys.h +66 -0
- data/ext/czmq/include/zthread.h +62 -0
- data/ext/czmq/include/ztree.h +133 -0
- data/ext/czmq/mkdoc +14 -0
- data/ext/czmq/model/generate +2 -0
- data/ext/czmq/model/sockopts.xml +101 -0
- data/ext/czmq/notes.txt +21 -0
- data/ext/czmq/scripts/sockopts.gsl +325 -0
- data/ext/czmq/src/Makefile.am +61 -0
- data/ext/czmq/src/czmq_selftest.c +60 -0
- data/ext/czmq/src/libczmq.pc.in +11 -0
- data/ext/czmq/src/selftest +7 -0
- data/ext/czmq/src/selftest.cfg +5 -0
- data/ext/czmq/src/valgrind.supp +14 -0
- data/ext/czmq/src/vg +2 -0
- data/ext/czmq/src/zbeacon.c +787 -0
- data/ext/czmq/src/zclock.c +143 -0
- data/ext/czmq/src/zconfig.c +691 -0
- data/ext/czmq/src/zctx.c +287 -0
- data/ext/czmq/src/zfile.c +237 -0
- data/ext/czmq/src/zframe.c +551 -0
- data/ext/czmq/src/zhash.c +664 -0
- data/ext/czmq/src/zlist.c +459 -0
- data/ext/czmq/src/zloop.c +496 -0
- data/ext/czmq/src/zmsg.c +854 -0
- data/ext/czmq/src/zmutex.c +134 -0
- data/ext/czmq/src/zsocket.c +313 -0
- data/ext/czmq/src/zsockopt.c +1756 -0
- data/ext/czmq/src/zstr.c +297 -0
- data/ext/czmq/src/zsys.c +136 -0
- data/ext/czmq/src/zthread.c +269 -0
- data/ext/czmq/src/ztree.c +888 -0
- data/ext/czmq/version.sh +21 -0
- data/ext/rbczmq/extconf.rb +1 -18
- data/ext/rbczmq/poller.c +4 -1
- data/ext/rbczmq/socket.c +28 -5
- data/ext/rbczmq/socket.h +1 -0
- data/ext/zeromq/AUTHORS +110 -0
- data/ext/zeromq/CMakeLists.txt +392 -0
- data/ext/zeromq/COPYING +674 -0
- data/ext/zeromq/COPYING.LESSER +179 -0
- data/ext/zeromq/INSTALL +246 -0
- data/ext/zeromq/MAINTAINERS +56 -0
- data/ext/zeromq/Makefile.am +40 -0
- data/ext/zeromq/NEWS +333 -0
- data/ext/zeromq/README +39 -0
- data/ext/zeromq/acinclude.m4 +930 -0
- data/ext/zeromq/autogen.sh +45 -0
- data/ext/zeromq/branding.bmp +0 -0
- data/ext/zeromq/builds/msvc/Makefile.am +33 -0
- data/ext/zeromq/builds/msvc/c_local_lat/c_local_lat.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_local_lat/c_local_lat.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/c_local_thr/c_local_thr.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_local_thr/c_local_thr.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/c_remote_lat/c_remote_lat.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_remote_lat/c_remote_lat.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/c_remote_thr/c_remote_thr.vcproj +176 -0
- data/ext/zeromq/builds/msvc/c_remote_thr/c_remote_thr.vcxproj +87 -0
- data/ext/zeromq/builds/msvc/errno.cpp +32 -0
- data/ext/zeromq/builds/msvc/errno.hpp +56 -0
- data/ext/zeromq/builds/msvc/inproc_lat/inproc_lat.vcproj +174 -0
- data/ext/zeromq/builds/msvc/inproc_lat/inproc_lat.vcxproj +86 -0
- data/ext/zeromq/builds/msvc/inproc_thr/inproc_thr.vcproj +174 -0
- data/ext/zeromq/builds/msvc/inproc_thr/inproc_thr.vcxproj +86 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcproj +804 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcxproj +252 -0
- data/ext/zeromq/builds/msvc/libzmq/libzmq.vcxproj.filters +431 -0
- data/ext/zeromq/builds/msvc/msvc.sln +89 -0
- data/ext/zeromq/builds/msvc/msvc10.sln +116 -0
- data/ext/zeromq/builds/msvc/platform.hpp +32 -0
- data/ext/zeromq/builds/msvc/properties/Common.props +21 -0
- data/ext/zeromq/builds/msvc/properties/Debug.props +19 -0
- data/ext/zeromq/builds/msvc/properties/Dynamic.props +20 -0
- data/ext/zeromq/builds/msvc/properties/Executable.props +19 -0
- data/ext/zeromq/builds/msvc/properties/Precompiled.props +14 -0
- data/ext/zeromq/builds/msvc/properties/Release.props +22 -0
- data/ext/zeromq/builds/msvc/properties/Win32.props +12 -0
- data/ext/zeromq/builds/msvc/properties/Win32_Release.props +17 -0
- data/ext/zeromq/builds/msvc/properties/WithOpenPGM.props +12 -0
- data/ext/zeromq/builds/msvc/properties/ZeroMQ.props +23 -0
- data/ext/zeromq/builds/msvc/properties/x64.props +12 -0
- data/ext/zeromq/builds/redhat/zeromq.spec.in +160 -0
- data/ext/zeromq/builds/valgrind/valgrind.supp +14 -0
- data/ext/zeromq/builds/valgrind/vg +1 -0
- data/ext/zeromq/cmake/Modules/TestZMQVersion.cmake +35 -0
- data/ext/zeromq/cmake/Modules/zmq_version.cpp +31 -0
- data/ext/zeromq/cmake/NSIS.template32.in +952 -0
- data/ext/zeromq/cmake/NSIS.template64.in +960 -0
- data/ext/zeromq/configure.in +428 -0
- data/ext/zeromq/doc/Makefile.am +51 -0
- data/ext/zeromq/doc/asciidoc.conf +56 -0
- data/ext/zeromq/doc/zmq.txt +233 -0
- data/ext/zeromq/doc/zmq_bind.txt +102 -0
- data/ext/zeromq/doc/zmq_close.txt +52 -0
- data/ext/zeromq/doc/zmq_connect.txt +98 -0
- data/ext/zeromq/doc/zmq_ctx_destroy.txt +66 -0
- data/ext/zeromq/doc/zmq_ctx_get.txt +67 -0
- data/ext/zeromq/doc/zmq_ctx_new.txt +49 -0
- data/ext/zeromq/doc/zmq_ctx_set.txt +75 -0
- data/ext/zeromq/doc/zmq_disconnect.txt +67 -0
- data/ext/zeromq/doc/zmq_epgm.txt +162 -0
- data/ext/zeromq/doc/zmq_errno.txt +50 -0
- data/ext/zeromq/doc/zmq_getsockopt.txt +516 -0
- data/ext/zeromq/doc/zmq_init.txt +52 -0
- data/ext/zeromq/doc/zmq_inproc.txt +85 -0
- data/ext/zeromq/doc/zmq_ipc.txt +85 -0
- data/ext/zeromq/doc/zmq_msg_close.txt +55 -0
- data/ext/zeromq/doc/zmq_msg_copy.txt +57 -0
- data/ext/zeromq/doc/zmq_msg_data.txt +48 -0
- data/ext/zeromq/doc/zmq_msg_get.txt +72 -0
- data/ext/zeromq/doc/zmq_msg_init.txt +65 -0
- data/ext/zeromq/doc/zmq_msg_init_data.txt +85 -0
- data/ext/zeromq/doc/zmq_msg_init_size.txt +58 -0
- data/ext/zeromq/doc/zmq_msg_more.txt +63 -0
- data/ext/zeromq/doc/zmq_msg_move.txt +52 -0
- data/ext/zeromq/doc/zmq_msg_recv.txt +125 -0
- data/ext/zeromq/doc/zmq_msg_send.txt +122 -0
- data/ext/zeromq/doc/zmq_msg_set.txt +45 -0
- data/ext/zeromq/doc/zmq_msg_size.txt +48 -0
- data/ext/zeromq/doc/zmq_pgm.txt +162 -0
- data/ext/zeromq/doc/zmq_poll.txt +132 -0
- data/ext/zeromq/doc/zmq_proxy.txt +97 -0
- data/ext/zeromq/doc/zmq_recv.txt +93 -0
- data/ext/zeromq/doc/zmq_recvmsg.txt +123 -0
- data/ext/zeromq/doc/zmq_send.txt +100 -0
- data/ext/zeromq/doc/zmq_sendmsg.txt +119 -0
- data/ext/zeromq/doc/zmq_setsockopt.txt +523 -0
- data/ext/zeromq/doc/zmq_socket.txt +369 -0
- data/ext/zeromq/doc/zmq_socket_monitor.txt +288 -0
- data/ext/zeromq/doc/zmq_strerror.txt +55 -0
- data/ext/zeromq/doc/zmq_tcp.txt +101 -0
- data/ext/zeromq/doc/zmq_term.txt +66 -0
- data/ext/zeromq/doc/zmq_unbind.txt +65 -0
- data/ext/zeromq/doc/zmq_version.txt +53 -0
- data/ext/zeromq/foreign/openpgm/Makefile.am +8 -0
- data/ext/zeromq/foreign/openpgm/libpgm-5.1.118~dfsg.tar.gz +0 -0
- data/ext/zeromq/include/zmq.h +402 -0
- data/ext/zeromq/include/zmq_utils.h +64 -0
- data/ext/zeromq/installer.ico +0 -0
- data/ext/zeromq/perf/Makefile.am +22 -0
- data/ext/zeromq/perf/inproc_lat.cpp +233 -0
- data/ext/zeromq/perf/inproc_thr.cpp +241 -0
- data/ext/zeromq/perf/local_lat.cpp +109 -0
- data/ext/zeromq/perf/local_thr.cpp +133 -0
- data/ext/zeromq/perf/remote_lat.cpp +122 -0
- data/ext/zeromq/perf/remote_thr.cpp +105 -0
- data/ext/zeromq/src/Makefile.am +171 -0
- data/ext/zeromq/src/address.cpp +78 -0
- data/ext/zeromq/src/address.hpp +52 -0
- data/ext/zeromq/src/array.hpp +155 -0
- data/ext/zeromq/src/atomic_counter.hpp +197 -0
- data/ext/zeromq/src/atomic_ptr.hpp +196 -0
- data/ext/zeromq/src/blob.hpp +129 -0
- data/ext/zeromq/src/clock.cpp +147 -0
- data/ext/zeromq/src/clock.hpp +60 -0
- data/ext/zeromq/src/command.hpp +154 -0
- data/ext/zeromq/src/config.hpp +89 -0
- data/ext/zeromq/src/ctx.cpp +352 -0
- data/ext/zeromq/src/ctx.hpp +173 -0
- data/ext/zeromq/src/dealer.cpp +133 -0
- data/ext/zeromq/src/dealer.hpp +92 -0
- data/ext/zeromq/src/decoder.cpp +166 -0
- data/ext/zeromq/src/decoder.hpp +248 -0
- data/ext/zeromq/src/devpoll.cpp +190 -0
- data/ext/zeromq/src/devpoll.hpp +105 -0
- data/ext/zeromq/src/dist.cpp +194 -0
- data/ext/zeromq/src/dist.hpp +105 -0
- data/ext/zeromq/src/encoder.cpp +102 -0
- data/ext/zeromq/src/encoder.hpp +200 -0
- data/ext/zeromq/src/epoll.cpp +178 -0
- data/ext/zeromq/src/epoll.hpp +101 -0
- data/ext/zeromq/src/err.cpp +291 -0
- data/ext/zeromq/src/err.hpp +155 -0
- data/ext/zeromq/src/fd.hpp +45 -0
- data/ext/zeromq/src/fq.cpp +141 -0
- data/ext/zeromq/src/fq.hpp +74 -0
- data/ext/zeromq/src/i_decoder.hpp +49 -0
- data/ext/zeromq/src/i_encoder.hpp +55 -0
- data/ext/zeromq/src/i_engine.hpp +55 -0
- data/ext/zeromq/src/i_msg_sink.hpp +43 -0
- data/ext/zeromq/src/i_msg_source.hpp +44 -0
- data/ext/zeromq/src/i_poll_events.hpp +47 -0
- data/ext/zeromq/src/io_object.cpp +108 -0
- data/ext/zeromq/src/io_object.hpp +81 -0
- data/ext/zeromq/src/io_thread.cpp +104 -0
- data/ext/zeromq/src/io_thread.hpp +91 -0
- data/ext/zeromq/src/ip.cpp +109 -0
- data/ext/zeromq/src/ip.hpp +41 -0
- data/ext/zeromq/src/ipc_address.cpp +84 -0
- data/ext/zeromq/src/ipc_address.hpp +67 -0
- data/ext/zeromq/src/ipc_connecter.cpp +265 -0
- data/ext/zeromq/src/ipc_connecter.hpp +128 -0
- data/ext/zeromq/src/ipc_listener.cpp +206 -0
- data/ext/zeromq/src/ipc_listener.hpp +99 -0
- data/ext/zeromq/src/kqueue.cpp +201 -0
- data/ext/zeromq/src/kqueue.hpp +107 -0
- data/ext/zeromq/src/lb.cpp +148 -0
- data/ext/zeromq/src/lb.hpp +73 -0
- data/ext/zeromq/src/libzmq.pc.in +10 -0
- data/ext/zeromq/src/likely.hpp +33 -0
- data/ext/zeromq/src/mailbox.cpp +87 -0
- data/ext/zeromq/src/mailbox.hpp +75 -0
- data/ext/zeromq/src/msg.cpp +299 -0
- data/ext/zeromq/src/msg.hpp +148 -0
- data/ext/zeromq/src/mtrie.cpp +428 -0
- data/ext/zeromq/src/mtrie.hpp +93 -0
- data/ext/zeromq/src/mutex.hpp +118 -0
- data/ext/zeromq/src/object.cpp +393 -0
- data/ext/zeromq/src/object.hpp +134 -0
- data/ext/zeromq/src/options.cpp +562 -0
- data/ext/zeromq/src/options.hpp +135 -0
- data/ext/zeromq/src/own.cpp +206 -0
- data/ext/zeromq/src/own.hpp +145 -0
- data/ext/zeromq/src/pair.cpp +136 -0
- data/ext/zeromq/src/pair.hpp +79 -0
- data/ext/zeromq/src/pgm_receiver.cpp +283 -0
- data/ext/zeromq/src/pgm_receiver.hpp +141 -0
- data/ext/zeromq/src/pgm_sender.cpp +218 -0
- data/ext/zeromq/src/pgm_sender.hpp +113 -0
- data/ext/zeromq/src/pgm_socket.cpp +706 -0
- data/ext/zeromq/src/pgm_socket.hpp +124 -0
- data/ext/zeromq/src/pipe.cpp +447 -0
- data/ext/zeromq/src/pipe.hpp +207 -0
- data/ext/zeromq/src/poll.cpp +176 -0
- data/ext/zeromq/src/poll.hpp +105 -0
- data/ext/zeromq/src/poller.hpp +82 -0
- data/ext/zeromq/src/poller_base.cpp +99 -0
- data/ext/zeromq/src/poller_base.hpp +86 -0
- data/ext/zeromq/src/precompiled.cpp +21 -0
- data/ext/zeromq/src/precompiled.hpp +47 -0
- data/ext/zeromq/src/proxy.cpp +150 -0
- data/ext/zeromq/src/proxy.hpp +32 -0
- data/ext/zeromq/src/pub.cpp +57 -0
- data/ext/zeromq/src/pub.hpp +69 -0
- data/ext/zeromq/src/pull.cpp +79 -0
- data/ext/zeromq/src/pull.hpp +81 -0
- data/ext/zeromq/src/push.cpp +76 -0
- data/ext/zeromq/src/push.hpp +80 -0
- data/ext/zeromq/src/random.cpp +52 -0
- data/ext/zeromq/src/random.hpp +37 -0
- data/ext/zeromq/src/reaper.cpp +117 -0
- data/ext/zeromq/src/reaper.hpp +80 -0
- data/ext/zeromq/src/rep.cpp +137 -0
- data/ext/zeromq/src/rep.hpp +80 -0
- data/ext/zeromq/src/req.cpp +185 -0
- data/ext/zeromq/src/req.hpp +91 -0
- data/ext/zeromq/src/router.cpp +364 -0
- data/ext/zeromq/src/router.hpp +138 -0
- data/ext/zeromq/src/select.cpp +216 -0
- data/ext/zeromq/src/select.hpp +126 -0
- data/ext/zeromq/src/session_base.cpp +503 -0
- data/ext/zeromq/src/session_base.hpp +156 -0
- data/ext/zeromq/src/signaler.cpp +406 -0
- data/ext/zeromq/src/signaler.hpp +63 -0
- data/ext/zeromq/src/socket_base.cpp +1236 -0
- data/ext/zeromq/src/socket_base.hpp +255 -0
- data/ext/zeromq/src/stdint.hpp +63 -0
- data/ext/zeromq/src/stream_engine.cpp +594 -0
- data/ext/zeromq/src/stream_engine.hpp +149 -0
- data/ext/zeromq/src/sub.cpp +93 -0
- data/ext/zeromq/src/sub.hpp +71 -0
- data/ext/zeromq/src/tcp.cpp +131 -0
- data/ext/zeromq/src/tcp.hpp +38 -0
- data/ext/zeromq/src/tcp_address.cpp +613 -0
- data/ext/zeromq/src/tcp_address.hpp +100 -0
- data/ext/zeromq/src/tcp_connecter.cpp +319 -0
- data/ext/zeromq/src/tcp_connecter.hpp +123 -0
- data/ext/zeromq/src/tcp_listener.cpp +293 -0
- data/ext/zeromq/src/tcp_listener.hpp +91 -0
- data/ext/zeromq/src/thread.cpp +107 -0
- data/ext/zeromq/src/thread.hpp +79 -0
- data/ext/zeromq/src/trie.cpp +337 -0
- data/ext/zeromq/src/trie.hpp +79 -0
- data/ext/zeromq/src/v1_decoder.cpp +162 -0
- data/ext/zeromq/src/v1_decoder.hpp +68 -0
- data/ext/zeromq/src/v1_encoder.cpp +103 -0
- data/ext/zeromq/src/v1_encoder.hpp +60 -0
- data/ext/zeromq/src/v1_protocol.hpp +43 -0
- data/ext/zeromq/src/version.rc.in +93 -0
- data/ext/zeromq/src/windows.hpp +181 -0
- data/ext/zeromq/src/wire.hpp +99 -0
- data/ext/zeromq/src/xpub.cpp +200 -0
- data/ext/zeromq/src/xpub.hpp +110 -0
- data/ext/zeromq/src/xsub.cpp +242 -0
- data/ext/zeromq/src/xsub.hpp +108 -0
- data/ext/zeromq/src/ypipe.hpp +210 -0
- data/ext/zeromq/src/yqueue.hpp +199 -0
- data/ext/zeromq/src/zmq.cpp +1058 -0
- data/ext/zeromq/src/zmq_utils.cpp +61 -0
- data/ext/zeromq/tests/Makefile.am +55 -0
- data/ext/zeromq/tests/test_connect_delay.cpp +260 -0
- data/ext/zeromq/tests/test_connect_resolve.cpp +54 -0
- data/ext/zeromq/tests/test_disconnect_inproc.cpp +120 -0
- data/ext/zeromq/tests/test_hwm.cpp +83 -0
- data/ext/zeromq/tests/test_invalid_rep.cpp +92 -0
- data/ext/zeromq/tests/test_last_endpoint.cpp +60 -0
- data/ext/zeromq/tests/test_monitor.cpp +289 -0
- data/ext/zeromq/tests/test_msg_flags.cpp +78 -0
- data/ext/zeromq/tests/test_pair_inproc.cpp +53 -0
- data/ext/zeromq/tests/test_pair_ipc.cpp +53 -0
- data/ext/zeromq/tests/test_pair_tcp.cpp +54 -0
- data/ext/zeromq/tests/test_reqrep_device.cpp +143 -0
- data/ext/zeromq/tests/test_reqrep_inproc.cpp +53 -0
- data/ext/zeromq/tests/test_reqrep_ipc.cpp +53 -0
- data/ext/zeromq/tests/test_reqrep_tcp.cpp +54 -0
- data/ext/zeromq/tests/test_router_mandatory.cpp +62 -0
- data/ext/zeromq/tests/test_shutdown_stress.cpp +93 -0
- data/ext/zeromq/tests/test_sub_forward.cpp +99 -0
- data/ext/zeromq/tests/test_term_endpoint.cpp +118 -0
- data/ext/zeromq/tests/test_timeo.cpp +119 -0
- data/ext/zeromq/tests/testutil.hpp +77 -0
- data/ext/zeromq/version.sh +21 -0
- data/lib/zmq/version.rb +1 -1
- data/rbczmq.gemspec +16 -3
- data/test/test_socket.rb +13 -1
- metadata +398 -9
- checksums.yaml +0 -15
- data/ext/czmq-1.4.1.tar.gz +0 -0
- data/ext/zeromq-3.2.3.tar.gz +0 -0
@@ -0,0 +1,189 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3
|
+
<ItemGroup Label="ProjectConfigurations">
|
4
|
+
<ProjectConfiguration Include="DebugDLL|Win32">
|
5
|
+
<Configuration>DebugDLL</Configuration>
|
6
|
+
<Platform>Win32</Platform>
|
7
|
+
</ProjectConfiguration>
|
8
|
+
<ProjectConfiguration Include="Debug|Win32">
|
9
|
+
<Configuration>Debug</Configuration>
|
10
|
+
<Platform>Win32</Platform>
|
11
|
+
</ProjectConfiguration>
|
12
|
+
<ProjectConfiguration Include="ReleaseDLL|Win32">
|
13
|
+
<Configuration>ReleaseDLL</Configuration>
|
14
|
+
<Platform>Win32</Platform>
|
15
|
+
</ProjectConfiguration>
|
16
|
+
<ProjectConfiguration Include="Release|Win32">
|
17
|
+
<Configuration>Release</Configuration>
|
18
|
+
<Platform>Win32</Platform>
|
19
|
+
</ProjectConfiguration>
|
20
|
+
</ItemGroup>
|
21
|
+
<PropertyGroup Label="Globals">
|
22
|
+
<ProjectGuid>{A5497C4B-1CD1-4779-9458-2CF7908E7E26}</ProjectGuid>
|
23
|
+
<RootNamespace>czmq_selftest</RootNamespace>
|
24
|
+
<Keyword>Win32Proj</Keyword>
|
25
|
+
</PropertyGroup>
|
26
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
27
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'" Label="Configuration">
|
28
|
+
<ConfigurationType>Application</ConfigurationType>
|
29
|
+
<PlatformToolset>v110</PlatformToolset>
|
30
|
+
<CharacterSet>Unicode</CharacterSet>
|
31
|
+
<WholeProgramOptimization>true</WholeProgramOptimization>
|
32
|
+
</PropertyGroup>
|
33
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'" Label="Configuration">
|
34
|
+
<ConfigurationType>Application</ConfigurationType>
|
35
|
+
<PlatformToolset>v110</PlatformToolset>
|
36
|
+
<CharacterSet>Unicode</CharacterSet>
|
37
|
+
</PropertyGroup>
|
38
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
39
|
+
<ConfigurationType>Application</ConfigurationType>
|
40
|
+
<PlatformToolset>v110</PlatformToolset>
|
41
|
+
<CharacterSet>Unicode</CharacterSet>
|
42
|
+
<WholeProgramOptimization>true</WholeProgramOptimization>
|
43
|
+
</PropertyGroup>
|
44
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
45
|
+
<ConfigurationType>Application</ConfigurationType>
|
46
|
+
<PlatformToolset>v110</PlatformToolset>
|
47
|
+
<CharacterSet>Unicode</CharacterSet>
|
48
|
+
</PropertyGroup>
|
49
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
50
|
+
<ImportGroup Label="ExtensionSettings">
|
51
|
+
</ImportGroup>
|
52
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'" Label="PropertySheets">
|
53
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
54
|
+
</ImportGroup>
|
55
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'" Label="PropertySheets">
|
56
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
57
|
+
</ImportGroup>
|
58
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
59
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
60
|
+
</ImportGroup>
|
61
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
62
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
63
|
+
</ImportGroup>
|
64
|
+
<PropertyGroup Label="UserMacros" />
|
65
|
+
<PropertyGroup>
|
66
|
+
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
67
|
+
</PropertyGroup>
|
68
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
69
|
+
<OutDir>$(Configuration)\</OutDir>
|
70
|
+
<IntDir>$(Configuration)\</IntDir>
|
71
|
+
<LinkIncremental>true</LinkIncremental>
|
72
|
+
</PropertyGroup>
|
73
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
74
|
+
<OutDir>$(Configuration)\</OutDir>
|
75
|
+
<IntDir>$(Configuration)\</IntDir>
|
76
|
+
<LinkIncremental>false</LinkIncremental>
|
77
|
+
</PropertyGroup>
|
78
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'">
|
79
|
+
<OutDir>$(Configuration)\</OutDir>
|
80
|
+
<IntDir>$(Configuration)\</IntDir>
|
81
|
+
<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>
|
82
|
+
<LinkIncremental>true</LinkIncremental>
|
83
|
+
</PropertyGroup>
|
84
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'">
|
85
|
+
<OutDir>$(Configuration)\</OutDir>
|
86
|
+
<IntDir>$(Configuration)\</IntDir>
|
87
|
+
<PreBuildEventUseInBuild>true</PreBuildEventUseInBuild>
|
88
|
+
<LinkIncremental>false</LinkIncremental>
|
89
|
+
</PropertyGroup>
|
90
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
91
|
+
<ClCompile>
|
92
|
+
<Optimization>Disabled</Optimization>
|
93
|
+
<AdditionalIncludeDirectories>..\..\include;..\..\..\libzmq\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
94
|
+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
95
|
+
<MinimalRebuild>true</MinimalRebuild>
|
96
|
+
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
97
|
+
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
98
|
+
<PrecompiledHeader />
|
99
|
+
<WarningLevel>Level3</WarningLevel>
|
100
|
+
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
101
|
+
</ClCompile>
|
102
|
+
<Link>
|
103
|
+
<AdditionalDependencies>czmq.lib;libzmq_d.lib;Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
104
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
105
|
+
<SubSystem>Console</SubSystem>
|
106
|
+
<TargetMachine>MachineX86</TargetMachine>
|
107
|
+
<AdditionalLibraryDirectories>..\..\..\libzmq\bin\win32;$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
108
|
+
</Link>
|
109
|
+
</ItemDefinitionGroup>
|
110
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
111
|
+
<ClCompile>
|
112
|
+
<Optimization>MaxSpeed</Optimization>
|
113
|
+
<IntrinsicFunctions>true</IntrinsicFunctions>
|
114
|
+
<AdditionalIncludeDirectories>..\..\include;..\..\..\libzmq\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
115
|
+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
116
|
+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
117
|
+
<FunctionLevelLinking>true</FunctionLevelLinking>
|
118
|
+
<PrecompiledHeader />
|
119
|
+
<WarningLevel>Level3</WarningLevel>
|
120
|
+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
121
|
+
</ClCompile>
|
122
|
+
<Link>
|
123
|
+
<AdditionalDependencies>czmq.lib;libzmq.lib;Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
124
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
125
|
+
<SubSystem>Console</SubSystem>
|
126
|
+
<OptimizeReferences>true</OptimizeReferences>
|
127
|
+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
128
|
+
<TargetMachine>MachineX86</TargetMachine>
|
129
|
+
<AdditionalLibraryDirectories>..\..\..\libzmq\bin\win32;$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
130
|
+
</Link>
|
131
|
+
</ItemDefinitionGroup>
|
132
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'">
|
133
|
+
<ClCompile>
|
134
|
+
<Optimization>Disabled</Optimization>
|
135
|
+
<AdditionalIncludeDirectories>..\..\include;..\..\..\libzmq\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
136
|
+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
137
|
+
<MinimalRebuild>true</MinimalRebuild>
|
138
|
+
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
139
|
+
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
140
|
+
<PrecompiledHeader />
|
141
|
+
<WarningLevel>Level3</WarningLevel>
|
142
|
+
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
143
|
+
</ClCompile>
|
144
|
+
<Link>
|
145
|
+
<AdditionalDependencies>czmq.lib;libzmq_d.lib;Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
146
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
147
|
+
<SubSystem>Console</SubSystem>
|
148
|
+
<TargetMachine>MachineX86</TargetMachine>
|
149
|
+
<AdditionalLibraryDirectories>..\..\..\libzmq\bin\win32;Debug</AdditionalLibraryDirectories>
|
150
|
+
</Link>
|
151
|
+
</ItemDefinitionGroup>
|
152
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|Win32'">
|
153
|
+
<ClCompile>
|
154
|
+
<Optimization>MaxSpeed</Optimization>
|
155
|
+
<IntrinsicFunctions>true</IntrinsicFunctions>
|
156
|
+
<AdditionalIncludeDirectories>..\..\include;..\..\..\libzmq\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
157
|
+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
158
|
+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
159
|
+
<FunctionLevelLinking>true</FunctionLevelLinking>
|
160
|
+
<PrecompiledHeader />
|
161
|
+
<WarningLevel>Level3</WarningLevel>
|
162
|
+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
163
|
+
</ClCompile>
|
164
|
+
<Link>
|
165
|
+
<AdditionalDependencies>czmq.lib;libzmq.lib;Ws2_32.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
166
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
167
|
+
<SubSystem>Console</SubSystem>
|
168
|
+
<OptimizeReferences>true</OptimizeReferences>
|
169
|
+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
170
|
+
<TargetMachine>MachineX86</TargetMachine>
|
171
|
+
<AdditionalLibraryDirectories>..\..\..\libzmq\bin\win32;Release</AdditionalLibraryDirectories>
|
172
|
+
</Link>
|
173
|
+
</ItemDefinitionGroup>
|
174
|
+
<ItemGroup>
|
175
|
+
<ClCompile Include="..\..\src\czmq_selftest.c">
|
176
|
+
<CompileAs Condition="'$(Configuration)|$(Platform)'=='DebugDLL|Win32'">CompileAsCpp</CompileAs>
|
177
|
+
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
|
178
|
+
</ClCompile>
|
179
|
+
</ItemGroup>
|
180
|
+
<ItemGroup>
|
181
|
+
<ProjectReference Include="czmq.vcxproj">
|
182
|
+
<Project>{0c4a2e28-8c9e-4b27-85d9-bb679ad84ac7}</Project>
|
183
|
+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
184
|
+
</ProjectReference>
|
185
|
+
</ItemGroup>
|
186
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
187
|
+
<ImportGroup Label="ExtensionTargets">
|
188
|
+
</ImportGroup>
|
189
|
+
</Project>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3
|
+
<ItemGroup>
|
4
|
+
<Filter Include="Source Files">
|
5
|
+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
6
|
+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
7
|
+
</Filter>
|
8
|
+
</ItemGroup>
|
9
|
+
<ItemGroup>
|
10
|
+
<ClCompile Include="..\..\src\czmq_selftest.c">
|
11
|
+
<Filter>Source Files</Filter>
|
12
|
+
</ClCompile>
|
13
|
+
</ItemGroup>
|
14
|
+
</Project>
|
data/ext/czmq/c
ADDED
@@ -0,0 +1,520 @@
|
|
1
|
+
#! /bin/sh
|
2
|
+
#
|
3
|
+
# c - C compile command
|
4
|
+
#
|
5
|
+
# Copyright (c) 1996-2009 iMatix Corporation
|
6
|
+
#
|
7
|
+
# This program is free software; you can redistribute it and/or modify
|
8
|
+
# it under the terms of the GNU General Public License as published by
|
9
|
+
# the Free Software Foundation; either version 2 of the License, or (at
|
10
|
+
# your option) any later version.
|
11
|
+
#
|
12
|
+
# This program is distributed in the hope that it will be useful, but
|
13
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
15
|
+
# General Public License for more details.
|
16
|
+
#
|
17
|
+
# For information on alternative licensing for OEMs, please contact
|
18
|
+
# iMatix Corporation.
|
19
|
+
#
|
20
|
+
|
21
|
+
# Syntax: c filename... Compile ANSI C program(s)
|
22
|
+
# c -c filename... (Backwards compatible: compile C programs)
|
23
|
+
# c -l main... Compile and link main program(s)
|
24
|
+
# c -L main... Link main program(s), no compile
|
25
|
+
# c -S Report detected system name
|
26
|
+
# c -C Report C compiler command syntax
|
27
|
+
# c -r lib file... Replace object file(s) into library
|
28
|
+
# -li path Local include path, additional to INCDIR
|
29
|
+
# -ll path Local library path, additional to LIBDIR
|
30
|
+
# -g Compile and link with debug information
|
31
|
+
# -p Use C++ compiler instead of C
|
32
|
+
# When linking, link with C++ runtime
|
33
|
+
# When replacing, replace .opp file
|
34
|
+
# -v Be verbose
|
35
|
+
# -q Be quiet
|
36
|
+
# -<xxxx> Arbitrary switch passed to compiler/linker
|
37
|
+
#
|
38
|
+
# Requires: Bourne shell
|
39
|
+
# Usage: Compiles a subroutine or compiles/links a main program.
|
40
|
+
#
|
41
|
+
# The following variables can be set to control the program:
|
42
|
+
# CCDEFINES Options required for ANSI C/C++ compilation
|
43
|
+
# CCLIBS Options required for ANSI C/C++ linking
|
44
|
+
# CCNAME Name of C compiler if not default
|
45
|
+
# CCPLUS Name of C++ compiler if not default
|
46
|
+
# CCCAT Command used to print listings (cat)
|
47
|
+
# INCDIR Directory to search for include files
|
48
|
+
# LIBDIR Directory to search for libraries
|
49
|
+
#
|
50
|
+
# When using iMatix Boom, if the IBASE environment variable is set and
|
51
|
+
# conflicts with INCDIR or LIBDIR, c will issue a warning.
|
52
|
+
#
|
53
|
+
# To make compile/link errors less verbose, set CCCAT to "head".
|
54
|
+
#
|
55
|
+
# Note that these environment variables have different semantics to the
|
56
|
+
# "standard" GNU variables such as CFLAGS which is why these are not
|
57
|
+
# used in this script.
|
58
|
+
#
|
59
|
+
#----------------------------------------------------------------------------
|
60
|
+
|
61
|
+
#
|
62
|
+
# Utility functions for parsing BOOM_MODEL
|
63
|
+
#
|
64
|
+
|
65
|
+
# Returns a list of all BOOM_MODEL_$MODEL variables set
|
66
|
+
boom_model_list () {
|
67
|
+
set |
|
68
|
+
awk 'BEGIN { FS="[=_]" }
|
69
|
+
/^BOOM_MODEL_[A-Z0-9]*=1$/ { print $3 }'
|
70
|
+
}
|
71
|
+
|
72
|
+
# Expands $BOOM_MODEL into individual BOOM_MODEL_$MODEL variables
|
73
|
+
boom_model_expand () {
|
74
|
+
# Clear any existing settings
|
75
|
+
for MODEL in `boom_model_list`; do
|
76
|
+
eval unset BOOM_MODEL_$MODEL
|
77
|
+
done
|
78
|
+
# Iterate over BOOM_MODEL using ',' as FS
|
79
|
+
OLD_IFS=$IFS
|
80
|
+
IFS=,
|
81
|
+
for MODEL in $BOOM_MODEL; do
|
82
|
+
MODEL=`echo $MODEL | tr \[a-z\] \[A-Z\]`
|
83
|
+
eval BOOM_MODEL_$MODEL=1
|
84
|
+
eval export BOOM_MODEL_$MODEL
|
85
|
+
done
|
86
|
+
IFS=$OLD_IFS
|
87
|
+
}
|
88
|
+
|
89
|
+
# If not already known, detect UNIX system type.
|
90
|
+
|
91
|
+
if [ -z "$UTYPE" ]; then
|
92
|
+
UTYPE=Generic # Default system name
|
93
|
+
if [ -s /usr/bin/uname ]; then UTYPE=`/usr/bin/uname`; fi
|
94
|
+
if [ -s /bin/uname ]; then UTYPE=`/bin/uname`; fi
|
95
|
+
fi
|
96
|
+
|
97
|
+
#
|
98
|
+
# Set default values for BOOM_MODEL
|
99
|
+
#
|
100
|
+
# Default is release,mt on all platforms.
|
101
|
+
#
|
102
|
+
if [ -z "$BOOM_MODEL" ]; then
|
103
|
+
BOOM_MODEL=release,mt
|
104
|
+
fi
|
105
|
+
boom_model_expand
|
106
|
+
if [ "$BOOM_MODEL_RELEASE" != "1" ]; then
|
107
|
+
if [ "$BOOM_MODEL_DEBUG" != "1" ]; then
|
108
|
+
BOOM_MODEL_RELEASE=1
|
109
|
+
BOOM_MODEL="$BOOM_MODEL,release"
|
110
|
+
fi
|
111
|
+
fi
|
112
|
+
if [ "$BOOM_MODEL_ST" != "1" ]; then
|
113
|
+
if [ "$BOOM_MODEL_MT" != "1" ]; then
|
114
|
+
BOOM_MODEL_MT=1
|
115
|
+
BOOM_MODEL="$BOOM_MODEL,mt"
|
116
|
+
fi
|
117
|
+
fi
|
118
|
+
|
119
|
+
# Set specific system compiler options and other flags
|
120
|
+
# CCNAME Name of compiler
|
121
|
+
# CCOPTS Compiler options, except -c
|
122
|
+
# LINKTYPE One of (before, after, gnu)
|
123
|
+
# RANLIB Use ranlib command to reindex library; else use 'ar rs'
|
124
|
+
#
|
125
|
+
# CCOPTS has no sensible default; so has to be either set by the
|
126
|
+
# general configuration variables, or detected based on system type
|
127
|
+
# and compiler. If CCOPTS is set, we assume the other values are
|
128
|
+
# set or the defaults are correct.
|
129
|
+
#
|
130
|
+
# NOTE: CCNAME default is set below these checks, so that we can test
|
131
|
+
# on CCNAME when setting CCOPTS, and/or set CCNAME and CCOPTS together.
|
132
|
+
#
|
133
|
+
CCCAT="${CCCAT:-cat}" # By default, "cat"
|
134
|
+
RANLIB="${RANLIB:-0}" # By default, "ar rs" is used
|
135
|
+
LINKTYPE="${LINKPATH:-after}" # By default, accept '-lsfl... -L.'
|
136
|
+
|
137
|
+
#
|
138
|
+
# First, check if GCC is present. If we can't find it and the
|
139
|
+
# user hasn't specified an alternative, then exit.
|
140
|
+
#
|
141
|
+
if [ -z "$CCNAME" -a -z "$CCOPTS" ]; then
|
142
|
+
if type gcc >/dev/null 2>/dev/null; then
|
143
|
+
CCNAME="gcc"
|
144
|
+
CCPLUS="g++"
|
145
|
+
else
|
146
|
+
cat <<EOM 1>&2
|
147
|
+
E: Could not find 'gcc' on PATH. 'c' requires gcc to build.
|
148
|
+
E: For other alternatives that may be available on your platform
|
149
|
+
E: please consult the 'c' script.
|
150
|
+
EOM
|
151
|
+
exit 1
|
152
|
+
fi
|
153
|
+
fi
|
154
|
+
|
155
|
+
#
|
156
|
+
# Generic modern GCC system
|
157
|
+
#
|
158
|
+
if [ "$CCNAME" = "gcc" ]; then
|
159
|
+
[ -z "$BOOM_MODEL_NOOPT" ] && CCDEBUG="-O2"
|
160
|
+
[ -z "$BOOM_MODEL_NOOPT" ] && CCNODEBUG="$CCNODEBUG -O2"
|
161
|
+
CCOPTS="-D_REENTRANT -D_GNU_SOURCE -Wall -Wno-unused -fno-strict-aliasing"
|
162
|
+
# We assume the following standard libraries are all present.
|
163
|
+
# If your build is failing because of missing libraries then
|
164
|
+
# either you are missing development packages, or are on a non-standard/old
|
165
|
+
# system and should add a special case.
|
166
|
+
STDLIBS="-lpthread -lm"
|
167
|
+
|
168
|
+
#
|
169
|
+
# Linux-specific subsection
|
170
|
+
#
|
171
|
+
if [ "$UTYPE" = "Linux" ]; then
|
172
|
+
# Use -start-group / -end-group for linking
|
173
|
+
STDLIBS="$STDLIBS -lrt -lcrypt"
|
174
|
+
LINKTYPE="gnu"
|
175
|
+
#
|
176
|
+
# Darwin-specific subsection
|
177
|
+
#
|
178
|
+
elif [ "$UTYPE" = "Darwin" ]; then
|
179
|
+
# Use -start-group / -end-group for linking
|
180
|
+
STDLIBS="$STDLIBS -lstdc++"
|
181
|
+
LINKTYPE="after"
|
182
|
+
#
|
183
|
+
# Solaris-specific subsection
|
184
|
+
#
|
185
|
+
elif [ "$UTYPE" = "SunOS" ]; then
|
186
|
+
# Extra system libraries needed to link on Solaris
|
187
|
+
STDLIBS="$STDLIBS -lrt -lcrypt -lsocket -lnsl -lsendfile"
|
188
|
+
# Standard "dumb" linker
|
189
|
+
LINKTYPE="before"
|
190
|
+
# For MT release builds, pick the best possible memory allocator
|
191
|
+
# out of the available options. mtmalloc is available in
|
192
|
+
# at least Solaris 8 and newer, umem is available in
|
193
|
+
# Solaris 9 update 3 and newer. If either is available,
|
194
|
+
# request iCL use direct memory allocator by default for
|
195
|
+
# MT release builds.
|
196
|
+
if [ "$BOOM_MODEL_MT" -a "$BOOM_MODEL_RELEASE" ]; then
|
197
|
+
if [ -f /usr/lib/libumem.so ]; then
|
198
|
+
STDLIBS="$STDLIBS -lumem"
|
199
|
+
elif [ -f /usr/lib/libmtmalloc.so ]; then
|
200
|
+
STDLIBS="$STDLIBS -lmtmalloc"
|
201
|
+
fi
|
202
|
+
fi
|
203
|
+
# Workaround for FOR-24
|
204
|
+
STDLIBS="-lapr $STDLIBS"
|
205
|
+
fi
|
206
|
+
#
|
207
|
+
# AIX with xlc
|
208
|
+
#
|
209
|
+
elif [ "$UTYPE" = "AIX" -a "$CCNAME" = "xlc_r" ]; then
|
210
|
+
[ -z "$BOOM_MODEL_NOOPT" ] && CCNODEBUG="-O"
|
211
|
+
CCNAME="xlc_r" # Use VAC Threaded Mode
|
212
|
+
CCPLUS="xlC_r" # Use VAC Threaded Mode
|
213
|
+
CCOPTS="$CCOPTS -D_REENTRANT"
|
214
|
+
STDLIBS="-lpthread"
|
215
|
+
fi
|
216
|
+
|
217
|
+
# Patch together the CC options and defines into one variable
|
218
|
+
CCOPTS="$CCOPTS $CCDEFINES"
|
219
|
+
if [ "$BOOM_MODEL_DEBUG" ]; then
|
220
|
+
CCOPTS="-g -DDEBUG $CCDEBUG $CCOPTS"
|
221
|
+
else
|
222
|
+
CCOPTS="$CCNODEBUG $CCOPTS"
|
223
|
+
fi
|
224
|
+
|
225
|
+
# Select ST or MT build for iMatix Base2 framework
|
226
|
+
if [ "$BOOM_MODEL_MT" ]; then
|
227
|
+
CCOPTS="$CCOPTS -DBASE_THREADSAFE"
|
228
|
+
fi
|
229
|
+
|
230
|
+
# Parse command line arguments, figure out what we are doing
|
231
|
+
# (Parsing is currently fairly simplistic, and depends on ordering
|
232
|
+
# of flags. Could be improved later if required.)
|
233
|
+
LINKUP=no
|
234
|
+
COMPILE=yes
|
235
|
+
USECPP=no
|
236
|
+
VERBOSE=${VERBOSE:-no}
|
237
|
+
QUIET=${QUIET:-no} # Default is non-verbose messages
|
238
|
+
LOCALLIBDIR=. # By default, search current directory twice
|
239
|
+
|
240
|
+
if [ -n "$IBASE" ]; then
|
241
|
+
if [ -z "$INCDIR" ]; then
|
242
|
+
INCDIR=$IBASE/include
|
243
|
+
else
|
244
|
+
if [ "$INCDIR" != "$IBASE/include" ]; then
|
245
|
+
echo "W: INCDIR=$INCDIR is in conflict with IBASE=$IBASE" 1>&2
|
246
|
+
fi
|
247
|
+
fi
|
248
|
+
if [ -z "$LIBDIR" ]; then
|
249
|
+
LIBDIR=$IBASE/lib
|
250
|
+
else
|
251
|
+
if [ "$LIBDIR" != "$IBASE/lib" ]; then
|
252
|
+
echo "W: LIBDIR=$LIBDIR is in conflict with IBASE=$IBASE" 1>&2
|
253
|
+
fi
|
254
|
+
fi
|
255
|
+
else
|
256
|
+
if [ -z "$INCDIR" ]; then
|
257
|
+
INCDIR=.
|
258
|
+
fi
|
259
|
+
if [ -z "$LIBDIR" ]; then
|
260
|
+
LIBDIR=.
|
261
|
+
fi
|
262
|
+
fi
|
263
|
+
|
264
|
+
# Process switches in no particular order until there are none left
|
265
|
+
while true; do
|
266
|
+
# -v means verbose reports
|
267
|
+
if [ /$1/ = /-v/ ]; then
|
268
|
+
VERBOSE=yes
|
269
|
+
shift
|
270
|
+
|
271
|
+
# -q means quiet
|
272
|
+
elif [ /$1/ = /-q/ ]; then
|
273
|
+
QUIET=yes
|
274
|
+
shift
|
275
|
+
|
276
|
+
# -g means compile/link with debugging symbols
|
277
|
+
elif [ /$1/ = /-g/ ]; then
|
278
|
+
BOOM_MODEL_DEBUG=1
|
279
|
+
unset BOOM_MODEL_RELEASE
|
280
|
+
shift
|
281
|
+
|
282
|
+
# -p means use C++ compiler
|
283
|
+
elif [ /$1/ = /-p/ ]; then
|
284
|
+
USECPP=yes
|
285
|
+
shift
|
286
|
+
|
287
|
+
# -S means report detected system type
|
288
|
+
elif [ /$1/ = /-S/ ]; then
|
289
|
+
echo "$UTYPE"
|
290
|
+
exit
|
291
|
+
|
292
|
+
# -C means report compiler syntax type
|
293
|
+
elif [ /$1/ = /-C/ ]; then
|
294
|
+
echo "$CCNAME -c -I$INCDIR $CCOPTS"
|
295
|
+
exit
|
296
|
+
|
297
|
+
# -c means compile the object -- we were going to do that anyway,
|
298
|
+
# but this ensures backwards compatibility
|
299
|
+
elif [ /$1/ = /-c/ ]; then
|
300
|
+
shift
|
301
|
+
|
302
|
+
# -r means replace object file into library
|
303
|
+
# The RANLIB symbol should be set to 1 if 'ar rs' does not work.
|
304
|
+
elif [ /$1/ = /-r/ ]; then
|
305
|
+
LIBRARY=$2
|
306
|
+
LIBNAME=`echo $LIBRARY | cut -d"." -f1`
|
307
|
+
shift; shift
|
308
|
+
|
309
|
+
for i in $*; do
|
310
|
+
shift
|
311
|
+
OBJECT=`echo $i | cut -d"." -f1`
|
312
|
+
if [ "$USECPP" = "no" ]; then
|
313
|
+
OBJECT=$OBJECT.o
|
314
|
+
else
|
315
|
+
OBJECT=$OBJECT.opp
|
316
|
+
fi
|
317
|
+
|
318
|
+
TRACE="Replacing object $OBJECT in library $LIBRARY"
|
319
|
+
if [ -f $LIBNAME.a ]; then
|
320
|
+
AR_CREATE_OPT=""
|
321
|
+
else
|
322
|
+
AR_CREATE_OPT="c"
|
323
|
+
fi
|
324
|
+
if [ "$RANLIB" = "1" ]; then
|
325
|
+
COMMAND="ar ${AR_CREATE_OPT}r $LIBNAME.a $OBJECT"
|
326
|
+
else
|
327
|
+
COMMAND="ar ${AR_CREATE_OPT}rs $LIBNAME.a $OBJECT"
|
328
|
+
fi
|
329
|
+
if [ "$QUIET" = "no" ]; then
|
330
|
+
if [ "$VERBOSE" = "no" ]; then
|
331
|
+
echo "$TRACE..."
|
332
|
+
else
|
333
|
+
echo "$TRACE ($COMMAND)..."
|
334
|
+
fi
|
335
|
+
fi
|
336
|
+
if [ ! -z "$CCTRACE" ]; then
|
337
|
+
echo "$TRACE ($COMMAND)">>$CCTRACE
|
338
|
+
fi
|
339
|
+
$COMMAND
|
340
|
+
|
341
|
+
# Run ranlib if necessary
|
342
|
+
if [ "$RANLIB" = "1" ]; then
|
343
|
+
ranlib $LIBNAME.a
|
344
|
+
fi
|
345
|
+
done
|
346
|
+
exit
|
347
|
+
|
348
|
+
# Compile/link main if -l is first argument
|
349
|
+
elif [ /$1/ = /-l/ ]; then
|
350
|
+
LINKUP=yes
|
351
|
+
shift
|
352
|
+
|
353
|
+
# Link main if -L is first argument (assumed to already be compiled)
|
354
|
+
elif [ /$1/ = /-L/ ]; then
|
355
|
+
LINKUP=yes
|
356
|
+
COMPILE=no
|
357
|
+
shift
|
358
|
+
|
359
|
+
# -li means use local include path as well as INCDIR
|
360
|
+
elif [ /$1/ = /-li/ ]; then
|
361
|
+
CCOPTS="-I$2 $CCOPTS"
|
362
|
+
shift; shift
|
363
|
+
|
364
|
+
# -ll means use local library path as well as LIBDIR
|
365
|
+
elif [ /$1/ = /-ll/ ]; then
|
366
|
+
LOCALLIBDIR=$2
|
367
|
+
shift; shift
|
368
|
+
|
369
|
+
elif [ /`echo $1 | cut -c1`/ = /-/ ]; then
|
370
|
+
EXTRA="$EXTRA $1"
|
371
|
+
shift
|
372
|
+
|
373
|
+
else
|
374
|
+
break # Not a switch
|
375
|
+
fi
|
376
|
+
done
|
377
|
+
|
378
|
+
# If we will be linking, then build list of libraries to link with.
|
379
|
+
|
380
|
+
if [ "$LINKUP" = "yes" -o /$1/ = // ]; then
|
381
|
+
LIBLIST=""
|
382
|
+
for LIBRARY in lib*.a $LOCALLIBDIR/lib*.a $LIBDIR/lib*.a; do
|
383
|
+
if [ ! -f $LIBRARY ]; then
|
384
|
+
continue
|
385
|
+
fi
|
386
|
+
# Pull out the xxx from libxxx.a (or similar)
|
387
|
+
LIBNAME=`basename $LIBRARY | sed -e 's/^...\([^\.]*\)\..*$/\1/'`
|
388
|
+
LIBLIST="$LIBLIST -l$LIBNAME"
|
389
|
+
done
|
390
|
+
LIBLIST="$LIBLIST $STDLIBS $CCLIBS"
|
391
|
+
fi
|
392
|
+
|
393
|
+
CCOPTS="$EXTRA $CCOPTS"
|
394
|
+
# Show help if no arguments
|
395
|
+
if [ /$1/ = // ]; then
|
396
|
+
echo "Detected system=$UTYPE, compiles with:"
|
397
|
+
echo " $CCNAME -c -I$INCDIR $CCOPTS"
|
398
|
+
echo "Syntax: c filename... Compile ANSI C program(s)"
|
399
|
+
echo " c -c filename... Compile ANSI C programs(s)"
|
400
|
+
echo " c -l main... Compile and link main program(s)"
|
401
|
+
echo " c -L main... Link main(s) with" ${LIBLIST-"no libraries"}
|
402
|
+
echo " c -S Report detected system name"
|
403
|
+
echo " c -C Report C compiler command syntax"
|
404
|
+
echo " c -r lib file Replace file into specified library"
|
405
|
+
echo " -li path Local include path, additional to INCDIR"
|
406
|
+
echo " -ll path Local library path, additional to LIBDIR"
|
407
|
+
echo " -g Compile and link with debug information"
|
408
|
+
echo " -p Use C++ compiler instead of C"
|
409
|
+
echo " When linking, link with C++ runtime"
|
410
|
+
echo " When replacing, replace .opp file"
|
411
|
+
echo " -v Be verbose"
|
412
|
+
echo " -q Be quiet"
|
413
|
+
echo " -<xxxx> Arbitrary switch passed to compiler/linker"
|
414
|
+
exit
|
415
|
+
fi
|
416
|
+
|
417
|
+
# Compile and maybe link each filename on the command line
|
418
|
+
for i in $*; do
|
419
|
+
if [ "$i" = "-o" ]; then
|
420
|
+
exit 0 # Skip -o filename
|
421
|
+
fi
|
422
|
+
FILENAME=`echo $i | cut -d"." -f1`
|
423
|
+
|
424
|
+
# Compile, if required
|
425
|
+
if [ "$USECPP" = "no" ]; then
|
426
|
+
OBJEXT=o
|
427
|
+
else
|
428
|
+
OBJEXT=opp
|
429
|
+
fi
|
430
|
+
if [ "$COMPILE" = "yes" -o ! -f $FILENAME.$OBJEXT ]; then
|
431
|
+
if [ -f $FILENAME.$OBJEXT ]; then
|
432
|
+
rm $FILENAME.$OBJEXT
|
433
|
+
fi
|
434
|
+
|
435
|
+
TRACE="Compiling $FILENAME"
|
436
|
+
if [ "$USECPP" = "no" ]; then
|
437
|
+
COMMAND="$CCNAME -c $CCOPTS -I$INCDIR $FILENAME.c"
|
438
|
+
else
|
439
|
+
COMMAND="$CCPLUS -c $CCOPTS -I$INCDIR -o $FILENAME.opp $FILENAME.cpp"
|
440
|
+
fi
|
441
|
+
if [ "$QUIET" = "no" ]; then
|
442
|
+
if [ "$VERBOSE" = "no" ]; then
|
443
|
+
echo "$TRACE..."
|
444
|
+
else
|
445
|
+
echo "$TRACE ($COMMAND)..."
|
446
|
+
fi
|
447
|
+
fi
|
448
|
+
if [ ! -z "$CCTRACE" ]; then
|
449
|
+
echo "$TRACE ($COMMAND)">>$CCTRACE
|
450
|
+
fi
|
451
|
+
|
452
|
+
# Need to remove any quotes in command string to pass as macro
|
453
|
+
SYNTAX=`echo $COMMAND | sed -e "s/\"//g"`
|
454
|
+
$COMMAND -DCCOPTS="\"$SYNTAX\"" >$FILENAME.lst 2>&1
|
455
|
+
|
456
|
+
# Show listing and abort if there was a compile error
|
457
|
+
if [ $? -eq 0 ]; then
|
458
|
+
cat $FILENAME.lst
|
459
|
+
rm $FILENAME.lst
|
460
|
+
else
|
461
|
+
# Only show start of listing if there was an error
|
462
|
+
$CCCAT $FILENAME.lst
|
463
|
+
if [ ! -z "$CCTRACE" ]; then
|
464
|
+
cat $FILENAME.lst >>$CCTRACE
|
465
|
+
fi
|
466
|
+
exit 1
|
467
|
+
fi
|
468
|
+
fi
|
469
|
+
|
470
|
+
# If okay, link if required
|
471
|
+
if [ "$LINKUP" = "yes" ]; then
|
472
|
+
TRACE="Linking $FILENAME"
|
473
|
+
if [ "$USECPP" = "no" ]; then
|
474
|
+
COMMAND="$CCNAME $CCOPTS $FILENAME.o -o $FILENAME"
|
475
|
+
else
|
476
|
+
COMMAND="$CCPLUS $CCOPTS $FILENAME.opp -o $FILENAME"
|
477
|
+
fi
|
478
|
+
case "$LINKTYPE" in
|
479
|
+
gnu)
|
480
|
+
COMMAND="$COMMAND -Wl,--start-group $LIBLIST -Wl,--end-group -L. -L$LOCALLIBDIR -L$LIBDIR $STDLIBS"
|
481
|
+
;;
|
482
|
+
before)
|
483
|
+
COMMAND="$COMMAND -L. -L$LOCALLIBDIR -L$LIBDIR $LIBLIST $LIBLIST $STDLIBS"
|
484
|
+
;;
|
485
|
+
after)
|
486
|
+
COMMAND="$COMMAND $LIBLIST $LIBLIST -L. -L$LOCALLIBDIR -L$LIBDIR $STDLIBS"
|
487
|
+
;;
|
488
|
+
esac
|
489
|
+
|
490
|
+
if [ "$QUIET" = "no" ]; then
|
491
|
+
if [ "$VERBOSE" = "no" ]; then
|
492
|
+
echo "$TRACE..."
|
493
|
+
else
|
494
|
+
echo "$TRACE ($COMMAND)..."
|
495
|
+
fi
|
496
|
+
fi
|
497
|
+
if [ ! -z "$CCTRACE" ]; then
|
498
|
+
echo "$TRACE ($COMMAND)">>$CCTRACE
|
499
|
+
fi
|
500
|
+
|
501
|
+
$COMMAND 2> $FILENAME.lst
|
502
|
+
|
503
|
+
# Show listing and abort if there was a link error
|
504
|
+
if [ $? -eq 0 ]; then
|
505
|
+
cat $FILENAME.lst
|
506
|
+
rm $FILENAME.lst
|
507
|
+
else
|
508
|
+
if [ "$VERBOSE" = "yes" ]; then
|
509
|
+
cat $FILENAME.lst
|
510
|
+
else
|
511
|
+
# Show first page of link errors only
|
512
|
+
head $FILENAME.lst
|
513
|
+
fi
|
514
|
+
if [ ! -z "$CCTRACE" ]; then
|
515
|
+
cat $FILENAME.lst >>$CCTRACE
|
516
|
+
fi
|
517
|
+
exit 1
|
518
|
+
fi
|
519
|
+
fi
|
520
|
+
done
|