In PosixSource.h, conditionally define things based on platform
authorIan Lynagh <igloo@earth.li>
Thu, 17 Jun 2010 17:49:12 +0000 (17:49 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 17 Jun 2010 17:49:12 +0000 (17:49 +0000)
This may not be ideal, but it should get GHC building on all platforms
again.

rts/PosixSource.h

index fa61b99..d139dd5 100644 (file)
 
 #include <ghcplatform.h>
 
+#if defined(freebsd_HOST_OS)
 #define _POSIX_C_SOURCE 200112L
 #define _XOPEN_SOURCE   600
-
-#if !defined(freebsd_HOST_OS)
+#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