Define _BSD_SOURCE in Stg.h
authorIan Lynagh <igloo@earth.li>
Tue, 9 Jun 2009 12:17:05 +0000 (12:17 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 9 Jun 2009 12:17:05 +0000 (12:17 +0000)
This means that, on Linux, we get functions like gamma defined when we
#include math.h

includes/Stg.h

index 341cda3..06a8662 100644 (file)
 // Turn on C99 for .hc code.  This gives us the INFINITY and NAN
 // constants from math.h, which we occasionally need to use in .hc (#1861)
 # define _ISOC99_SOURCE
 // Turn on C99 for .hc code.  This gives us the INFINITY and NAN
 // constants from math.h, which we occasionally need to use in .hc (#1861)
 # define _ISOC99_SOURCE
+
+// We need _BSD_SOURCE so that math.h defines things like gamma
+// on Linux
+# define _BSD_SOURCE
 #endif
 
 #if IN_STG_CODE == 0
 #endif
 
 #if IN_STG_CODE == 0