httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r356234 - in /httpd/httpd/trunk: configure.in include/ap_config.h
Date Mon, 12 Dec 2005 10:10:40 GMT
Author: jorton
Date: Mon Dec 12 02:10:33 2005
New Revision: 356234

URL: http://svn.apache.org/viewcvs?rev=356234&view=rev
Log:
* include/ap_config.h: Define AP_HAVE_DESIGNATED_INITIALIZER for GCC
(but not G++) or any compiler which claims C99 support.

* configure.in: Don't define AP_HAVE_DESIGNATED_INITIALIZER here.

Modified:
    httpd/httpd/trunk/configure.in
    httpd/httpd/trunk/include/ap_config.h

Modified: httpd/httpd/trunk/configure.in
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/configure.in?rev=356234&r1=356233&r2=356234&view=diff
==============================================================================
--- httpd/httpd/trunk/configure.in (original)
+++ httpd/httpd/trunk/configure.in Mon Dec 12 02:10:33 2005
@@ -360,10 +360,6 @@
 dnl ## Check for typedefs, structures, and compiler characteristics.
 
 AC_C_CONST
-if test "x$GCC" = "xyes"; then
-  AC_DEFINE([AP_HAVE_DESIGNATED_INITIALIZER], 1,
-            [Define if the compiler supports designated initializers])
-fi
 
 dnl ## Check for library functions
 AC_SEARCH_LIBS(sqrt, m)

Modified: httpd/httpd/trunk/include/ap_config.h
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/include/ap_config.h?rev=356234&r1=356233&r2=356234&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_config.h (original)
+++ httpd/httpd/trunk/include/ap_config.h Mon Dec 12 02:10:33 2005
@@ -252,4 +252,12 @@
 #define AP_HAVE_RELIABLE_PIPED_LOGS TRUE
 #endif
 
+/* Presume that the compiler supports C99-style designated
+ * initializers if using GCC (but not G++), or for any other compiler
+ * which claims C99 support. */
+#if (defined(__GNUC__) && !defined(__cplusplus))                \
+     || (defined(__STDC_VERSION) && __STDC_VERSION__ >= 199901L)
+#define AP_HAVE_DESIGNATED_INITIALIZER
+#endif
+
 #endif /* AP_CONFIG_H */



Mime
View raw message