From: Greg Stein Date: Sun, 13 May 2001 10:37:06 +0000 (+0000) Subject: Implement Jeff's idea for an autoconf-defined symbol to enable the special X-Git-Tag: 2.0.18~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab9d00b0c4cb7ce4c5f9902db9de490e04af0971;p=apache Implement Jeff's idea for an autoconf-defined symbol to enable the special command function prototype stuff. AP_DEBUG is always set in maintainer mode and AP_DEBUG_HAVE_GCC is set when the compiler is GCC. Submitted by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89102 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/configure.in b/configure.in index 1b6b93892b..ff83aafe3e 100644 --- a/configure.in +++ b/configure.in @@ -208,7 +208,11 @@ AC_ARG_WITH(port,[ --with-port=PORT Port on which to listen (default is [PORT=80]) 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) fi +[ + if test "$ac_cv_prog_gcc" = "yes"; then + APR_ADDTO(CPPFLAGS,-DAP_DEBUG_HAVE_GCC) + fi + APR_ADDTO(CPPFLAGS, -DAP_DEBUG) ])dnl APACHE_ENABLE_LAYOUT diff --git a/include/http_config.h b/include/http_config.h index fc93ba9f3d..7706ba51d7 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 +#ifdef AP_DEBUG_HAVE_GCC 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 +#else /* AP_DEBUG_HAVE_GCC */ 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 +#endif /* AP_DEBUG_HAVE_GCC */ typedef struct command_struct command_rec; /**