apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r265011 - in /apr/apr/trunk: CHANGES include/apr_version.h
Date Wed, 31 Aug 2005 11:00:17 GMT
Author: trawick
Date: Wed Aug 31 04:00:14 2005
New Revision: 265011

URL: http://svn.apache.org/viewcvs?rev=265011&view=rev
Log:
Provide APR_VERSION_AT_LEAST() macro for applications which
want to enable features based on a required level of APR.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/include/apr_version.h

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/CHANGES?rev=265011&r1=265010&r2=265011&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES (original)
+++ apr/apr/trunk/CHANGES Wed Aug 31 04:00:14 2005
@@ -1,5 +1,9 @@
 Changes for APR 1.3.0
 
+  *) Provide APR_VERSION_AT_LEAST() macro for applications which 
+     want to enable features based on a required level of APR.
+     [Jeff Trawick]
+
   *) jlibtool: Teach to use static libraries with -static.
      [Justin Erenkrantz]
 

Modified: apr/apr/trunk/include/apr_version.h
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/include/apr_version.h?rev=265011&r1=265010&r2=265011&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_version.h (original)
+++ apr/apr/trunk/include/apr_version.h Wed Aug 31 04:00:14 2005
@@ -68,6 +68,22 @@
  */
 #define APR_IS_DEV_VERSION
 
+/**
+ * Check at compile time if the APR version is at least a certain
+ * level.
+ * @param major The major version component of the version checked
+ * for (e.g., the "1" of "1.3.0").
+ * @param minor The minor version component of the version checked
+ * for (e.g., the "3" of "1.3.0").
+ * @param patch The patch level component of the version checked
+ * for (e.g., the "0" of "1.3.0").
+ * @remark This macro is available with APR versions starting with
+ * 1.3.0.
+ */
+#define APR_VERSION_AT_LEAST(major,minor,patch)                    \
+(((major) < APR_MAJOR_VERSION)                                     \
+ || ((major) == APR_MAJOR_VERSION && (minor) < APR_MINOR_VERSION) \
+ || ((major) == APR_MAJOR_VERSION && (minor) == APR_MINOR_VERSION && (patch)
<= APR_PATCH_VERSION))
 
 #if defined(APR_IS_DEV_VERSION) || defined(DOXYGEN)
 /** Internal: string form of the "is dev" flag */



Mime
View raw message