X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FPosixSource.h;h=fa61b99926cdc63bc4cf282d2decf51cb2df5c6d;hb=d6d7fe4976d4265dbfd6b1ad048339b8ff8f9120;hp=b3da60fe37ce36d85e3195b61a60c2d684808636;hpb=b3bd828c358cbd79887dbd873357e265d8d6060a;p=ghc-hetmet.git diff --git a/rts/PosixSource.h b/rts/PosixSource.h index b3da60f..fa61b99 100644 --- a/rts/PosixSource.h +++ b/rts/PosixSource.h @@ -11,12 +11,19 @@ #include -#define _POSIX_SOURCE 1 -#define _POSIX_C_SOURCE 199506L -#define _XOPEN_SOURCE 500 -#define _ISOC99_SOURCE +#define _POSIX_C_SOURCE 200112L +#define _XOPEN_SOURCE 600 -/* Let's be ISO C99 too... */ +#if !defined(freebsd_HOST_OS) +// 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