[commit: ghc] master: Fix building RtsProbes.d on Mac OS X 10.9 (#8139) (8878541)

git at git.haskell.org git
Sat Oct 12 05:54:50 UTC 2013


Repository : ssh://git at git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8878541d02ad15fbdbd04608cbc6ea3fde5d5beb/ghc

>---------------------------------------------------------------

commit 8878541d02ad15fbdbd04608cbc6ea3fde5d5beb
Author: Darin Morrison <darinmorrison+git at gmail.com>
Date:   Thu Sep 26 00:32:17 2013 -0600

    Fix building RtsProbes.d on Mac OS X 10.9 (#8139)
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

8878541d02ad15fbdbd04608cbc6ea3fde5d5beb
 includes/HsFFI.h |    2 +-
 rts/RtsProbes.d  |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/includes/HsFFI.h b/includes/HsFFI.h
index 652fbea..a21811e 100644
--- a/includes/HsFFI.h
+++ b/includes/HsFFI.h
@@ -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."
diff --git a/rts/RtsProbes.d b/rts/RtsProbes.d
index 13f40f8..226f881 100644
--- a/rts/RtsProbes.d
+++ b/rts/RtsProbes.d
@@ -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"
 




More information about the ghc-commits mailing list