X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FPosixSource.h;h=d139dd50af65bdb9ae178a7a706d42ddc8536915;hb=b2bd63f99d643f6b3eb30bb72bb9ae26d4183252;hp=23101ea47076b1adf4bcffe5acdc6d07ce8ba588;hpb=757d3c5aa87ff18c0cd8a27870ffc5d7836338ed;p=ghc-hetmet.git diff --git a/rts/PosixSource.h b/rts/PosixSource.h index 23101ea..d139dd5 100644 --- a/rts/PosixSource.h +++ b/rts/PosixSource.h @@ -11,8 +11,21 @@ #include +#if defined(freebsd_HOST_OS) #define _POSIX_C_SOURCE 200112L #define _XOPEN_SOURCE 600 +#else +#define _POSIX_SOURCE 1 +#define _POSIX_C_SOURCE 199506L +#define _XOPEN_SOURCE 500 +// FreeBSD takes a different approach to _ISOC99_SOURCE: on FreeBSD it +// means "I want *just* C99 things", whereas on GNU libc and Solaris +// it means "I also want C99 things". +// +// On both GNU libc and FreeBSD, _ISOC99_SOURCE is implied by +// _XOPEN_SOURCE==600, but on Solaris it is an error to omit it. +#define _ISOC99_SOURCE +#endif #if defined(darwin_HOST_OS) /* If we don't define this the including sysctl breaks with things like