Re: CVS update: php3/functions
| From: | Stig Bakken | Date: | Wed, 16 Jun 1999 11:12:21 +0000 |
| Subject: | Re: CVS update: php3/functions | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-7014@lists.php.net to get a copy of this message | ||
On Wed, 16 Jun 1999, Sascha Schumann wrote:
> On Wed, Jun 16, 1999 at 09:57:41AM -0000, ssb wrote:
> > Date: Wednesday June 16, 1999 @ 5:57
> > Author: ssb
> >
> > Update of /repository/php3/functions
> > In directory php:/tmp/cvs-serv20152
> >
> > Modified Files:
> > fsock.c
> > Log Message:
> > Some #if -> #ifdef changes.
>
> Won't autoconf define them always?
>
> > -#if HAVE_SYS_SOCKET_H
> > +#ifdef HAVE_SYS_SOCKET_H
>
> For example, that one. Win32 does not have a <sys/socket.h>, but
> defines it anyway:
>
> $ grep HAVE_SYS_SOCKET_H config.w32.h
> #define HAVE_SYS_SOCKET_H 0
autoconf's default behaviour is not not define the macros if the test was
false, and to define them to 1 if the test was true. This is the
"standard practice".
The "#if HAVE_FOO" practice was introduced in PHP 3.0, because some macros
were used in 3.0 alphas to determine whether a module was to be included.
They were part of the modules list in internal_functions.c, so they had to
be defined to 0 or 1. It has given a whole bunch of PHP developers
deviant habits :-)
- Stig