A problem with that is that our php_config.h will unconditionally include
various system headers, not allowing an individual source file to set more
flags.

This is a problem, for example, on Solaris where defining the correct symbols
to get Unix98 and the uint type working in turn causes stdio.h to define
va_list.  Solaris doesn't protect itself from redefining it in stdarg.h later,
and we end up with a warning for each source file.

>From what I've been able to determine, it seems that only linux and solaris
support unix98 ptys (waiting to hear about IRIX), so I'll probably end up
committing this to proc_open.c instead:

#if defined(__linux__) || defined(sun)
# define _BSD_SOURCE        /* linux wants this when XOPEN mode is on */
# define _XOPEN_SOURCE 500  /* turn on Unix98 */
# define __EXTENSIONS__ 1   /* Solaris: uint */
#endif 

--Wez.

>     It is extremely unwise to play with these flags, because
>     there is nothing portable about them.  Getting it right and
>     making it work everywhere is basically impossible.  I suggest
>     you drop them from the source file and add them on a
>     per-source base in configure.in depending on $host_alias.
> 
>     - Sascha

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to