mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-09 15:26:04 +00:00
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 <sustrik@250bpm.com>
This commit is contained in:
parent
79aea5ffa6
commit
ef8db789a1
@ -24,11 +24,7 @@
|
|||||||
// As a first step of the build process it is copied to
|
// As a first step of the build process it is copied to
|
||||||
// zmq directory to take place of platform.hpp generated from
|
// zmq directory to take place of platform.hpp generated from
|
||||||
// platform.hpp.in on platforms supported by GNU autotools.
|
// platform.hpp.in on platforms supported by GNU autotools.
|
||||||
|
// Place any MSVC-specific definitions here.
|
||||||
// 0MQ version information
|
|
||||||
#define PACKAGE_VERSION_MAJOR 2
|
|
||||||
#define PACKAGE_VERSION_MINOR 0
|
|
||||||
#define PACKAGE_VERSION_PATCH 10
|
|
||||||
|
|
||||||
#define ZMQ_HAVE_WINDOWS
|
#define ZMQ_HAVE_WINDOWS
|
||||||
|
|
||||||
|
13
configure.in
13
configure.in
@ -13,19 +13,6 @@ AC_CONFIG_MACRO_DIR(config)
|
|||||||
AM_CONFIG_HEADER(src/platform.hpp)
|
AM_CONFIG_HEADER(src/platform.hpp)
|
||||||
AM_INIT_AUTOMAKE(tar-ustar dist-zip foreign)
|
AM_INIT_AUTOMAKE(tar-ustar dist-zip foreign)
|
||||||
|
|
||||||
# This defines PACKAGE_VERSION_... in src/platform.hpp
|
|
||||||
PV_MAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1`
|
|
||||||
PV_MINOR=`echo $PACKAGE_VERSION | cut -d . -f 2`
|
|
||||||
PV_PATCH=`echo $PACKAGE_VERSION | cut -d . -f 3`
|
|
||||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],[$PV_MAJOR],
|
|
||||||
[0MQ major version])
|
|
||||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],[$PV_MINOR],
|
|
||||||
[0MQ minor version])
|
|
||||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCH],[$PV_PATCH],
|
|
||||||
[0MQ patchlevel])
|
|
||||||
# This lets us use PACKAGE_VERSION in Makefiles
|
|
||||||
AC_SUBST(PACKAGE_VERSION)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Libtool -version-info (ABI version)
|
# Libtool -version-info (ABI version)
|
||||||
#
|
#
|
||||||
|
@ -30,6 +30,16 @@ extern "C" {
|
|||||||
#include "winsock2.h"
|
#include "winsock2.h"
|
||||||
#endif
|
#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 */
|
/* Win32 needs special handling for DLL exports */
|
||||||
#if defined _WIN32
|
#if defined _WIN32
|
||||||
# if defined DLL_EXPORT
|
# if defined DLL_EXPORT
|
||||||
|
@ -57,9 +57,9 @@
|
|||||||
|
|
||||||
void zmq_version (int *major_, int *minor_, int *patch_)
|
void zmq_version (int *major_, int *minor_, int *patch_)
|
||||||
{
|
{
|
||||||
*major_ = PACKAGE_VERSION_MAJOR;
|
*major_ = ZMQ_VERSION_MAJOR;
|
||||||
*minor_ = PACKAGE_VERSION_MINOR;
|
*minor_ = ZMQ_VERSION_MINOR;
|
||||||
*patch_ = PACKAGE_VERSION_PATCH;
|
*patch_ = ZMQ_VERSION_PATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *zmq_strerror (int errnum_)
|
const char *zmq_strerror (int errnum_)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user