ext/zeromq/include/zmq.h in rbczmq-1.7.4 vs ext/zeromq/include/zmq.h in rbczmq-1.7.5
- old
+ new
@@ -26,10 +26,20 @@
*/
#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 3
+
+#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
@@ -77,27 +87,10 @@
# include <stdint.h>
#endif
/******************************************************************************/
-/* 0MQ versioning support. */
-/******************************************************************************/
-
-/* Version macros for compile-time API version detection */
-#define ZMQ_VERSION_MAJOR 4
-#define ZMQ_VERSION_MINOR 0
-#define ZMQ_VERSION_PATCH 1
-
-#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)
-
-/* Run-time API version detection */
-ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch);
-
-/******************************************************************************/
/* 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. */
@@ -163,10 +156,13 @@
#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);
@@ -183,10 +179,10 @@
#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 1024
+#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);