Am Sonntag, 6. Mai 2007 schrieb Ari Johnson:
> On 5/6/07, Dennis Schridde <[EMAIL PROTECTED]> wrote:
> > Am Sonntag, 6. Mai 2007 schrieb Dennis Schridde:
> > > Am Sonntag, 6. Mai 2007 schrieb Per Inge Mathisen:
> > > > [EMAIL PROTECTED] warzone]$ svn log -r 864
> > > > ---------------------------------------------------------------------
> > > >--- r864 | devurandom | 2007-03-10 20:43:02 +0100 (Sat, 10 Mar 2007) |
> > > > 5 lines
> > > >
> > > > - New macro: WZ_OS_POSIX (if _XOPEN_SOURCE >= 500)
> > > > - Added a bit more safety to WZ_DECL_UNUSED (not sure since which GCC
> > > > version this exists, so choose >=3.2)
> > > > - Encapsulate GLibC extensions and use rest of errorHandler for all
> > > > POSIX systems (thus renamed to posixErrorHandler)
> > > > - A little bit more verbosity in the gdmp
> > > >
> > > > This change made it stop working. The culprit is the check for
> > > > _XOPEN_SOURCE, which is AFAICT supposed to be set by the user (if you
> > > > want posix-y code), not something the user can read to figure out the
> > > > system.
> > >
> > > You are right: "An XSI-conforming application should ensure that the
> > > feature test macro _XOPEN_SOURCE is defined with the value 600 before
> > > inclusion of any header."
> > >
> > > Thus we may want to define _XOPEN_SOURCE=600 in case we need the XSI
> > > extension (which I think I used for the exceptionhandler) or just
> > > define _POSIX_C_SOURCE=200112L in case we don't.
> > > Additionaly we could check for _XOPEN_VERSION=600 (or
> > > _POSIX_VERSION=200112L) or find out how to make autotools find out
> > > about this.
> >
> > r1233 tries to do this partly. A slightly better fix might work like
> > this:
> >
> > #ifdef WZ_OS_UNIX
> > # define _XOPEN_SOURCE 500
> > # include <unistd.h>
> > [...]
> > // Where required:
> > # if _XOPEN_VERSION >= 500
> > [...]
> > # endif
> > [...]
> > #endif
>
> MacOS X compiling is now broken.  SIGPOLL is undeclared in
> exceptionhandler.c.  SIGPOLL only gets defined on MacOS X if
> _POSIX_C_SOURCE is defined.
Nice. As it seems MacOSX breaks the POSIX specs:

"Since this volume of IEEE Std 1003.1-2001 is aligned with the ISO C standard, 
and since all functionality enabled by _POSIX_C_SOURCE set equal to 200112L 
is enabled by _XOPEN_SOURCE set equal to 600, there should be no need to 
define _POSIX_C_SOURCE if _XOPEN_SOURCE is so defined. Therefore, if 
_XOPEN_SOURCE is set equal to 600 and _POSIX_C_SOURCE is set equal to 
200112L, the behavior is the same as if only _XOPEN_SOURCE is defined and set 
equal to 600. However, should _POSIX_C_SOURCE be set to a value greater than 
200112L, the behavior is unspecified."

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to