]> granicus.if.org Git - curl/commitdiff
curlver: introducing new version number (checking) macros
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 May 2015 21:33:27 +0000 (23:33 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 18 May 2015 09:09:13 +0000 (11:09 +0200)
include/curl/curlver.h

index c0501c7c51697fb233973134cd34552ba05d4edf..ad85e509353005dd7ac4e1d154707b394a0064b8 100644 (file)
@@ -53,7 +53,9 @@
    and it is always a greater number in a more recent release. It makes
    comparisons with greater than and less than work.
 */
-#define LIBCURL_VERSION_NUM 0x072B00
+#define LIBCURL_VERSION_NUM CURL_VERSION_BITS(LIBCURL_VERSION_MAJOR,    \
+                                              LIBCURL_VERSION_MINOR,    \
+                                              LIBCURL_VERSION_PATCH)
 
 /*
  * This is the date and time when the full source package was created. The
@@ -66,4 +68,8 @@
  */
 #define LIBCURL_TIMESTAMP "DEV"
 
+#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
+#define CURL_AT_LEAST_VERSION(x,y,z) \
+  (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
+
 #endif /* __CURL_CURLVER_H */