> With version id it would be the following (major,three digits for > minor,three digits for patch) > > #if ZMQ_VERSION_ID >= 2001001 > > Where as with ZMQ_MAJOR/MINOR/PATCH it would be: > > #if ZMQ_MAJOR > 2 || (ZMQ_MAJOR == 2 && ZMQ_MINOR >= 1 && ZMQ_PATCH >= 1) > > I guess this is a matter of taste but I prefer the former one (there > is no harm in defining both).
After a bit more thinking during the weekend (accompanied by some drinking as well), I would go for this: // These are the numbers you have to manually maintain: #define ZMQ_VERSION_MAJOR 2 #define ZMQ_VERSION_MINOR 0 #define ZMQ_VERSION_PATCH 1 // Everything in a single numeric value, easy for comparison: #define ZMQ_VERSION_FULL (((ZMQ_VERSION_MAJOR * 100)+ZMQ_VERSION_MINOR)*100+ZMQ_VERSION_PATCH) // These are for bindings that make this decision at run-time: int zmq_version_major() { return ZMQ_VERSION_MAJOR; } int zmq_version_minor() { return ZMQ_VERSION_MINOR; } int zmq_version_patch() { return ZMQ_VERSION_PATCH; } int zmq_version_full() { return ZMQ_VERSION_FULL; } > What would be the benefit of using YYYYMMDD instead of the actual > version number? None, that was my brain calling for a break... -- Gonzalo Diethelm _______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev