httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1500183 - /httpd/httpd/branches/2.2.x/include/ap_release.h
Date Sat, 06 Jul 2013 00:48:47 GMT
Author: fuankg
Date: Sat Jul  6 00:48:47 2013
New Revision: 1500183

URL: http://svn.apache.org/r1500183
Log:
Avoid including apr_general.h.
The MSVC Resource Compiler truncates macro names at char 31.
Since apr_general.h includes apr.h which in turn includes
system headers we get warnings or errors with the Resource
Compiler with newer system headers (VC10 and later) which
have macro names defined with more than 31 chars.
(backport from trunk r1499742 / httpd-2.4.x r1499855)
Reviewed by: gsmith, sf

Modified:
    httpd/httpd/branches/2.2.x/include/ap_release.h

Modified: httpd/httpd/branches/2.2.x/include/ap_release.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/include/ap_release.h?rev=1500183&r1=1500182&r2=1500183&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/include/ap_release.h (original)
+++ httpd/httpd/branches/2.2.x/include/ap_release.h Sat Jul  6 00:48:47 2013
@@ -22,8 +22,6 @@
 #ifndef AP_RELEASE_H
 #define AP_RELEASE_H
 
-#include "apr_general.h" /* stringify */
-
 #define AP_SERVER_COPYRIGHT \
     "Copyright 2013 The Apache Software Foundation."
 
@@ -56,6 +54,14 @@
 #define AP_SERVER_ADD_STRING          ""
 #endif
 
+/* APR_STRINGIFY is defined here, and also in apr_general.h, so wrap it */
+#ifndef APR_STRINGIFY
+/** Properly quote a value as a string in the C preprocessor */
+#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
+/** Helper macro for APR_STRINGIFY */
+#define APR_STRINGIFY_HELPER(n) #n
+#endif
+
 /* keep old macros as well */
 #define AP_SERVER_MAJORVERSION  APR_STRINGIFY(AP_SERVER_MAJORVERSION_NUMBER)
 #define AP_SERVER_MINORVERSION  APR_STRINGIFY(AP_SERVER_MINORVERSION_NUMBER)



Mime
View raw message