diff options
author | Martin Lucina <mato@kotelna.sk> | 2010-10-15 15:05:54 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-10-15 16:53:15 +0200 |
commit | 3b3df731e60d604794538d0b9f6cb5b802a8745d (patch) | |
tree | e1362a18c465430842370c5319933726f3c4148e /include | |
parent | 26d7669464054a4aed3f0ee9643bffa0e01aab5c (diff) |
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 <mato@kotelna.sk>
Diffstat (limited to 'include')
-rw-r--r-- | include/zmq.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/zmq.h b/include/zmq.h index efa3edb..1cb6c03 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -30,16 +30,6 @@ extern "C" { #include "winsock2.h" #endif -/* Version macros */ -#define ZMQ_VERSION_MAJOR 2 -#define ZMQ_VERSION_MINOR 0 -#define ZMQ_VERSION_PATCH 10 - -#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) - /* Win32 needs special handling for DLL exports */ #if defined _WIN32 # if defined DLL_EXPORT @@ -55,6 +45,17 @@ extern "C" { /* 0MQ versioning support. */ /******************************************************************************/ +/* Version macros for compile-time API version detection */ +#define ZMQ_VERSION_MAJOR 2 +#define ZMQ_VERSION_MINOR 0 +#define ZMQ_VERSION_PATCH 10 + +#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); /******************************************************************************/ |