FIX BUILD (OS X): Include correct gmp.h if using GMP.framework
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>
Fri, 6 Jul 2007 04:56:49 +0000 (04:56 +0000)
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Fri, 6 Jul 2007 04:56:49 +0000 (04:56 +0000)
On OS X, we have to #include <GMP/gmp.h> if we are using GMP.framework. Before
the recent GMP changes, gcc (incorrectly) used the gmp.h supplied by ghc but
that is gone now.

includes/Regs.h
includes/Rts.h

index f2f7082..0bfde5b 100644 (file)
 #ifndef REGS_H
 #define REGS_H
 
+#if defined(HAVE_FRAMEWORK_GMP)
+#include <GMP/gmp.h>
+#else
 #include "gmp.h" // Needs MP_INT definition 
+#endif
 
 /*
  * Spark pools: used to store pending sparks 
index 7375798..d009618 100644 (file)
@@ -145,7 +145,11 @@ extern void _assertFail (const char *, unsigned int);
 #include "SMP.h"
 
 /* GNU mp library */
+#if defined(HAVE_FRAMEWORK_GMP)
+#include <GMP/gmp.h>
+#else
 #include "gmp.h"
+#endif
 
 /* Macros for STG/C code */
 #include "Block.h"