]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* include/ap_config.h: Define AP_HAVE_DESIGNATED_INITIALIZER for GCC
authorJoe Orton <jorton@apache.org>
Mon, 12 Dec 2005 10:10:33 +0000 (10:10 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 12 Dec 2005 10:10:33 +0000 (10:10 +0000)
(but not G++) or any compiler which claims C99 support.

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

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

configure.in
include/ap_config.h

index 06436d47558679c9e727e429ecc75903cd1ac984..09ff3041a098a0f18072b3ecaea6bad53f44f288 100644 (file)
@@ -360,10 +360,6 @@ AC_HEADER_SYS_WAIT
 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)
index a580e67b4995a5126583d17b854a70f6f85f8359..8bd6e0de4fb1946360c1d92447e3a34713c4e291 100644 (file)
 #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 */