Commit bf60815a authored by Greg Stein's avatar Greg Stein
Browse files

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
parent 37c6bf18
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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
+3 −3
Original line number Diff line number Diff line
@@ -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; 
/**