You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 2001/05/13 00:08:00 UTC
Re: cvs commit: httpd-2.0 configure.in
-1. Please back out.
AP_DEBUG is used for a lot more than just the cmd_func stuff. This
effectively disables AP_DEBUG functionality for *everybody*.
The correct approach would be to modify the conditions on how the cmd_func
stuff is applied. Something like #if defined(AP_DEBUG) && defined(__GCC__)
Cheers,
-g
On Sat, May 12, 2001 at 01:05:28PM -0000, trawick@apache.org wrote:
> trawick 01/05/12 06:05:28
>
> Modified: . configure.in
> Log:
> Only turn on AP_DEBUG if we're using gcc.
>
> The AP_DEBUG flavor of the cmd_func declarations is not portable.
> Last night Roy removed the check for gcc before turning on AP_DEBUG.
> Interestingly (or not :) ) the AP_DEBUG flavor of cmd_func compiles
> cleanly on gcc but the non-AP_DEBUG flavor doesn't. The non-AP_DEBUG
> flavor compiles cleanly with Tru64 cc and AIX xlc but the AP_DEBUG
> flavor doesn't. (On Tru64 we get a bunch of warnings with the
> AP_DEBUG flavor but at least it compiles; the same cannot be said of
> AIX xlc.)
>
> Perhaps we should use a symbol other than AP_DEBUG to distinguish
> between the cmd_func flavors. Then AP_DEBUG can be turned on
> regardless of compiler. The new flag can be turned on for gcc+
> --enable-maintainer-mode, or perhaps for gcc always since the non-
> AP_DEBUG flavor won't compile cleanly with gcc. (what a mess; this
> probably wouldn't work right for different levels of gcc anyway)
>
> Revision Changes Path
> 1.153 +1 -1 httpd-2.0/configure.in
>
> Index: configure.in
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/configure.in,v
> retrieving revision 1.152
> retrieving revision 1.153
> diff -u -r1.152 -r1.153
> --- configure.in 2001/05/12 03:48:30 1.152
> +++ configure.in 2001/05/12 13:05:27 1.153
> @@ -208,7 +208,7 @@
> [PORT=80])
>
> AC_ARG_ENABLE(maintainer-mode,[ --enable-maintainer-mode Turn on debugging and compile time warnings],
> - [APR_ADDTO(CPPFLAGS,-DAP_DEBUG)
> + [if test "$ac_cv_prog_gcc" = "yes"; then APR_ADDTO(CPPFLAGS,-DAP_DEBUG); fi
> ])dnl
>
> APACHE_ENABLE_LAYOUT
>
>
>
--
Greg Stein, http://www.lyra.org/
Re: cvs commit: httpd-2.0 configure.in
Posted by Jeff Trawick <tr...@bellsouth.net>.
Greg Stein <gs...@lyra.org> writes:
> -1. Please back out.
Huh? Platforms that used to compile no longer compiled. I reverted
the part that hurt. Now, we're back to where we were for months (with
nobody complaining as far as I can recall).
Why veto a trivial change to fix a showstopper build problem? There
is no need to keep people from being able to build until there is an
agreed solution for the problem.
> AP_DEBUG is used for a lot more than just the cmd_func stuff. This
> effectively disables AP_DEBUG functionality for *everybody*.
No, the code in http_config.h is what effectively disables AP_DEBUG
functionality for everybody.
> The correct approach would be to modify the conditions on how the cmd_func
> stuff is applied. Something like #if defined(AP_DEBUG) &&
> defined(__GCC__)
Actually, I outlined a different strategy in my commit message which I
still am interested in. Perhaps it achieves the same end *and* gets
non-AP_DEBUG compiles to build cleanly with gcc. The AP_DEBUG_foo can
also be turned on in configure.in for other compilers which don't
bitch and moan about the alternate cmd_func decls (should we pretend
that there might be such a beast?).
I really don't think checking the compiler in the header file is cool,
as this is an area where we might want a more specific test in the
future, and configure.in is much better for that. Examples:
1) checking for gcc levels it turns out to be required
2) allowing non-gcc compilers which grok the declarations
3) we may want to always enable that code for gcc since gcc without
AP_DEBUG is a noisy compile (but then this may depend on the level
of gcc)
> Cheers,
> -g
>
> On Sat, May 12, 2001 at 01:05:28PM -0000, trawick@apache.org wrote:
> > trawick 01/05/12 06:05:28
> >
> > Modified: . configure.in
> > Log:
> > Only turn on AP_DEBUG if we're using gcc.
> >
> > The AP_DEBUG flavor of the cmd_func declarations is not portable.
> > Last night Roy removed the check for gcc before turning on AP_DEBUG.
> > Interestingly (or not :) ) the AP_DEBUG flavor of cmd_func compiles
> > cleanly on gcc but the non-AP_DEBUG flavor doesn't. The non-AP_DEBUG
> > flavor compiles cleanly with Tru64 cc and AIX xlc but the AP_DEBUG
> > flavor doesn't. (On Tru64 we get a bunch of warnings with the
> > AP_DEBUG flavor but at least it compiles; the same cannot be said of
> > AIX xlc.)
> >
> > Perhaps we should use a symbol other than AP_DEBUG to distinguish
> > between the cmd_func flavors. Then AP_DEBUG can be turned on
> > regardless of compiler. The new flag can be turned on for gcc+
> > --enable-maintainer-mode, or perhaps for gcc always since the non-
> > AP_DEBUG flavor won't compile cleanly with gcc. (what a mess; this
> > probably wouldn't work right for different levels of gcc anyway)
> >
> > Revision Changes Path
> > 1.153 +1 -1 httpd-2.0/configure.in
> >
> > Index: configure.in
> > ===================================================================
> > RCS file: /home/cvs/httpd-2.0/configure.in,v
> > retrieving revision 1.152
> > retrieving revision 1.153
> > diff -u -r1.152 -r1.153
> > --- configure.in 2001/05/12 03:48:30 1.152
> > +++ configure.in 2001/05/12 13:05:27 1.153
> > @@ -208,7 +208,7 @@
> > [PORT=80])
> >
> > AC_ARG_ENABLE(maintainer-mode,[ --enable-maintainer-mode Turn on debugging and compile time warnings],
> > - [APR_ADDTO(CPPFLAGS,-DAP_DEBUG)
> > + [if test "$ac_cv_prog_gcc" = "yes"; then APR_ADDTO(CPPFLAGS,-DAP_DEBUG); fi
> > ])dnl
> >
> > APACHE_ENABLE_LAYOUT
> >
> >
> >
>
> --
> Greg Stein, http://www.lyra.org/
--
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...