]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Avoid including apr_general.h.
authorGuenter Knauf <fuankg@apache.org>
Thu, 4 Jul 2013 13:12:42 +0000 (13:12 +0000)
committerGuenter Knauf <fuankg@apache.org>
Thu, 4 Jul 2013 13:12:42 +0000 (13:12 +0000)
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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1499742 13f79535-47bb-0310-9956-ffa450edef68

include/ap_release.h

index 089c1420127b27951f2fb719b628aa77a228eb43..9b2b133c9c2878e1121006888745ed26c69c65a3 100644 (file)
@@ -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."
 
 #endif
 #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)