|
28 | 28 | #ifndef __ZMQ_H_INCLUDED__
|
29 | 29 | #define __ZMQ_H_INCLUDED__
|
30 | 30 |
|
| 31 | +/* Version macros for compile-time API version detection */ |
| 32 | +#define ZMQ_VERSION_MAJOR 4 |
| 33 | +#define ZMQ_VERSION_MINOR 0 |
| 34 | +#define ZMQ_VERSION_PATCH 2 |
| 35 | + |
| 36 | +#define ZMQ_MAKE_VERSION(major, minor, patch) \ |
| 37 | + ((major) * 10000 + (minor) * 100 + (patch)) |
| 38 | +#define ZMQ_VERSION \ |
| 39 | + ZMQ_MAKE_VERSION(ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH) |
| 40 | + |
31 | 41 | #ifdef __cplusplus
|
32 | 42 | extern "C" {
|
33 | 43 | #endif
|
@@ -78,23 +88,6 @@ typedef unsigned __int8 uint8_t;
|
78 | 88 | #endif
|
79 | 89 |
|
80 | 90 |
|
81 |
| -/******************************************************************************/ |
82 |
| -/* 0MQ versioning support. */ |
83 |
| -/******************************************************************************/ |
84 |
| - |
85 |
| -/* Version macros for compile-time API version detection */ |
86 |
| -#define ZMQ_VERSION_MAJOR 4 |
87 |
| -#define ZMQ_VERSION_MINOR 0 |
88 |
| -#define ZMQ_VERSION_PATCH 1 |
89 |
| - |
90 |
| -#define ZMQ_MAKE_VERSION(major, minor, patch) \ |
91 |
| - ((major) * 10000 + (minor) * 100 + (patch)) |
92 |
| -#define ZMQ_VERSION \ |
93 |
| - ZMQ_MAKE_VERSION(ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH) |
94 |
| - |
95 |
| -/* Run-time API version detection */ |
96 |
| -ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch); |
97 |
| - |
98 | 91 | /******************************************************************************/
|
99 | 92 | /* 0MQ errors. */
|
100 | 93 | /******************************************************************************/
|
@@ -165,6 +158,9 @@ ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch);
|
165 | 158 | #define ETERM (ZMQ_HAUSNUMERO + 53)
|
166 | 159 | #define EMTHREAD (ZMQ_HAUSNUMERO + 54)
|
167 | 160 |
|
| 161 | +/* Run-time API version detection */ |
| 162 | +ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch); |
| 163 | + |
168 | 164 | /* This function retrieves the errno as it is known to 0MQ library. The goal */
|
169 | 165 | /* of this function is to make the code 100% portable, including where 0MQ */
|
170 | 166 | /* compiled with certain CRT library (on Windows) is linked to an */
|
|
0 commit comments