subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1337478 - /subversion/trunk/subversion/libsvn_ra_serf/util.c
Date Sat, 12 May 2012 08:11:03 GMT
Author: rhuijben
Date: Sat May 12 08:11:02 2012
New Revision: 1337478

URL: http://svn.apache.org/viewvc?rev=1337478&view=rev
Log:
Fix compilation of ra_serf by performing a proper version check and
introducing an helper macro to make it easier to perform similar checks.

* subversion/libsvn_ra_serf/util.c
  (XML_VERSION_AT_LEAST): New macro.
  (EXPAT_HAS_STOPPARSER): Perform proper check (to disallow 1.95.8)

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/util.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1337478&r1=1337477&r2=1337478&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Sat May 12 08:11:02 2012
@@ -58,7 +58,15 @@
 #define XML_STATUS_ERROR 0
 #endif
 
-#if XML_MAJOR_VERSION >= 2 || XML_MINOR_VERSION >= 95 || XML_MICRO_VERSION >= 8
+#ifndef XML_VERSION_AT_LEAST
+#define XML_VERSION_AT_LEAST(major,minor,patch)                  \
+(((major) < XML_MAJOR_VERSION)                                       \
+ || ((major) == XML_MAJOR_VERSION && (minor) < XML_MINOR_VERSION)    \
+ || ((major) == XML_MAJOR_VERSION && (minor) == XML_MINOR_VERSION && \
+     (patch) <= XML_PATCH_VERSION))
+#endif /* APR_VERSION_AT_LEAST */
+
+#if XML_VERSION_AT_LEAST(2, 95, 8)
 #define EXPAT_HAS_STOPPARSER
 #endif
 



Mime
View raw message