From 03962d5f869b658b0a07f94e103e4bfa4e5e7197 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sun, 13 May 2001 12:21:25 +0000 Subject: [PATCH] Separate enablement of AP_DEBUG code from enablement of code which depends on the compiler supporting designated initializers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89103 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 6 +++--- include/http_config.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index ff83aafe3e8..e16e21d379b 100644 --- a/configure.in +++ b/configure.in @@ -190,6 +190,9 @@ AC_HEADER_SYS_WAIT dnl ## Check for typedefs, structures, and compiler characteristics. AC_C_CONST +if test "$ac_cv_prog_gcc" = "yes"; then + APR_ADDTO(CPPFLAGS,-DAP_HAVE_DESIGNATED_INITIALIZER) +fi dnl ## Check for library functions @@ -209,9 +212,6 @@ AC_ARG_WITH(port,[ --with-port=PORT Port on which to listen (default is AC_ARG_ENABLE(maintainer-mode,[ --enable-maintainer-mode Turn on debugging and compile time warnings], [ - if test "$ac_cv_prog_gcc" = "yes"; then - APR_ADDTO(CPPFLAGS,-DAP_DEBUG_HAVE_GCC) - fi APR_ADDTO(CPPFLAGS, -DAP_DEBUG) ])dnl diff --git a/include/http_config.h b/include/http_config.h index 7706ba51d7c..b514743187e 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -120,7 +120,7 @@ enum cmd_how { typedef struct cmd_parms_struct cmd_parms; -#ifdef AP_DEBUG_HAVE_GCC +#ifdef AP_HAVE_DESIGNATED_INITIALIZER typedef union { const char *(*no_args) (cmd_parms *parms, void *mconfig); @@ -162,7 +162,7 @@ typedef union { # define AP_INIT_FLAG(directive, func, mconfig, where, help) \ { directive, { .flag=func }, mconfig, where, FLAG, help } -#else /* AP_DEBUG_HAVE_GCC */ +#else /* AP_HAVE_DESIGNATED_INITIALIZER */ typedef const char *(*cmd_func) (); @@ -194,7 +194,7 @@ typedef const char *(*cmd_func) (); # define AP_INIT_FLAG(directive, func, mconfig, where, help) \ { directive, func, mconfig, where, FLAG, help } -#endif /* AP_DEBUG_HAVE_GCC */ +#endif /* AP_HAVE_DESIGNATED_INITIALIZER */ typedef struct command_struct command_rec; /** -- 2.47.2