httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <>
Subject Re: cvs commit: apache-2.0/src/modules/standard mod_include.c mod_log_config.c mod_negotiation.c
Date Sat, 22 Jan 2000 00:44:49 GMT
(Text rearranged, and extra context provided, since I took so long to
respond to this)

On Tue, Dec 21, 1999 at 05:54:10PM -0500, Ryan Bloom wrote:
> Option 1)
> In
> In (In psuedo-code)
> if {check for threading support}
> else
> fi
> I initially opted for the first method, because it stuck with the #if rule
> that Apache had adopted.  I happened to have made this change a few days
> before leaving work for a few days for personal reasons.  While I was
> gone, I had three different people contact me to find out what those
> @THREADS@ things were there for.  One of these people was trying to get
> autoconf working on his system again, the other two were trying to port
> APR to a platform without autoconf.

This probably would've been much clearer to people if the macro had
been DEFINE_IF_THREADS_ENABLED, with a comment mentioning what each
of these were. Then, I would think people wouldn't be confused.


Option 3)

(what PHP does for some vars it wants to expose)

echo "/* automatically generated by configure */" >
echo "/* edit to change version number */" >>
echo "#define PHP_VERSION \"$PHP_VERSION\"" >>


> Option 2)
> In apr.h:
> In
> if {check for threading support}
>     THREADS="1"
> else
>     THREADS="0"
> fi
> Option 2 is much clearer in this respect.  It is obvious what we are
> trying to figure out.  Plus, #if is much more powerful that #ifdef.  There
> are times that we don't want to check if something is defined, but we want
> to check what the value of a definition is.  Case in point, What version
> of AIX are we on?

Some autoconf macros' content are inspected. See the results of

> If we are going to come right out and limit
> ourselves to either #if or #ifdef, them we had better choose wisely,
> because this issue will bite us when we want the added functionality of
> #if, but we can't use it because Apache 2.0 only uses #ifdef.

The autoheader convention is to #undef feature macros. And AFAIK, the
overwhelming possibility is that all ANSI compilers will support #if
if the feature macros are undefed.

So, I think that we should #undef feature macros, and we will have the
ability to convert #ifs to #ifdefs or back whenever we want.

View raw message