Fix building RtsProbes.d on Mac OS X 10.9 (#8139)
authorDarin Morrison <darinmorrison+git@gmail.com>
Thu, 26 Sep 2013 06:32:17 +0000 (00:32 -0600)
committerAustin Seipp <austin@well-typed.com>
Sat, 12 Oct 2013 04:08:00 +0000 (23:08 -0500)
Signed-off-by: Austin Seipp <austin@well-typed.com>
includes/HsFFI.h
rts/RtsProbes.d

index 652fbea..a21811e 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
 #include "stg/Types.h"
 
 /* get limits for integral types */
-#ifdef HAVE_STDINT_H
+#if defined HAVE_STDINT_H && !defined USE_INTTYPES_H_FOR_RTS_PROBES_D
 /* ISO C 99 says:
  * "C++ implementations should define these macros only when
  * __STDC_LIMIT_MACROS is defined before <stdint.h> is included."
index 13f40f8..226f881 100644 (file)
@@ -6,6 +6,12 @@
  *
  * ---------------------------------------------------------------------------*/
 
+#ifdef __APPLE__ && __MACH__
+# if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+#  define USE_INTTYPES_H_FOR_RTS_PROBES_D
+# endif
+#endif
+
 #include "HsFFI.h"
 #include "rts/EventLogFormat.h"