Commit 20c7ceb0 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

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
parent bf60815a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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

+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_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; 
/**