Change our #defines to work on FreeBSD too
authorSimon Marlow <marlowsd@gmail.com>
Mon, 24 May 2010 10:58:28 +0000 (10:58 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 24 May 2010 10:58:28 +0000 (10:58 +0000)
With glibc, things like _POSIX_C_SOURCE and _ISOC99_SOURCE are
additive, but on FreeBSD they are mutually exclusive.  However, it
turns out we only need to define _POSIX_C_SOURCE and _XOPEN_SOURCE to
get all the C99 stuff we need too, so there's no need for any #ifdefs.

Submitted by: Gabor PALI <pgj@FreeBSD.org>

rts/PosixSource.h

index b3da60f..23101ea 100644 (file)
 
 #include <ghcplatform.h>
 
-#define _POSIX_SOURCE   1
-#define _POSIX_C_SOURCE 199506L
-#define _XOPEN_SOURCE   500
-#define _ISOC99_SOURCE
-
-/* Let's be ISO C99 too... */
+#define _POSIX_C_SOURCE 200112L
+#define _XOPEN_SOURCE   600
 
 #if defined(darwin_HOST_OS)
 /* If we don't define this the including sysctl breaks with things like