NON_POSIX_SOURCE
Simon Marlow
simonmar@microsoft.com
Fri, 10 Aug 2001 14:28:50 +0100
> > Folks,
> >=20
> > Julian & I had discussed the NON_POSIX_SOURCE situation=20
> yesterday and
> > came to the conclusion that the current situation is unworkable.
> >=20
> > Ok, currently what happens is that in Stg.h we #define=20
> _POSIX_C_SOURCE,
> > which means that all RTS sources and via-C compilations are compiled
> > with this symbol, which on most systems causes the header=20
> files to only
> > bring into scope those features defined by POSIX. So far=20
> so good, this
> > helps us write portable software by getting the compiler to complain
> > when we use non-POSIX features.
>=20
> Could you preserve this useful feature by occasionally doing a compile
> with -Onot -D_POSIX_C_SOURCE, perhaps as part of the release
> checklist?
Compiling things different ways is a pain. If a particular source file
only uses POSIX features, then we should #define _POSIX_C_SOURCE at the
top.
Cheers,
Simon