From ef8db789a1c97152e84ff03c9a7f6e1e77d95981 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 9 Oct 2010 07:53:24 +0200 Subject: 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 --- include/zmq.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/zmq.h b/include/zmq.h index 90a73c2..efa3edb 100644 --- a/include/zmq.h +++ b/include/zmq.h @@ -30,6 +30,16 @@ 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 -- cgit v1.2.3