Re: CVS update: php3/functions
| From: | Sascha Schumann | Date: | Wed, 16 Jun 1999 11:43:25 +0000 |
| Subject: | Re: CVS update: php3/functions | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-7018@lists.php.net to get a copy of this message | ||
On Wed, Jun 16, 1999 at 01:33:59PM +0200, Stig Bakken wrote:
> On Wed, 16 Jun 1999, Sascha Schumann wrote:
>
> > 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
>
> This has always caused some confusion, perhaps we should try cleaning it
> up? It has worked until now, either because compilers are forgiving about
> "#if FOO" when FOO is not defined, because the tests returned the same
> results on all platforms PHP is commonly used on or because those who have
> had problems did not report them.
>
> What about this:
>
> We rename all the macros that tell whether an extension should be included
> to WITH_FOO instead of HAVE_FOO, and reserve HAVE_FOO exclusively for
> macros that are either undefined or 1, like autoconf-defined ones. Then
> it'll be easier for people to know when to do what.
>
> - Stig
Smells like trouble, if you want to convert all existing code. We
should define a policy for this, so module authors can do the
right thing for new modules and adapt old modules as well, if
they feel the need to do that.
Your proposal sounds rational.
--
Regards,
Sascha Schumann
Consultant