summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>2007-07-06 04:56:49 +0000
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>2007-07-06 04:56:49 +0000
commit1143c0e63ab9925697dcd553bbdb65aa8d51fdb5 (patch)
tree686459c15c2f3a73c83d0b7158d4b6f5d97b95f8
parent9c2ac80e6b9c2fd3b7dcfc805ef64039ca5587c4 (diff)
downloadhaskell-1143c0e63ab9925697dcd553bbdb65aa8d51fdb5.tar.gz
FIX BUILD (OS X): Include correct gmp.h if using GMP.framework
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.
-rw-r--r--includes/Regs.h4
-rw-r--r--includes/Rts.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/includes/Regs.h b/includes/Regs.h
index f2f70821d1..0bfde5b0c8 100644
--- a/includes/Regs.h
+++ b/includes/Regs.h
@@ -22,7 +22,11 @@
#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
diff --git a/includes/Rts.h b/includes/Rts.h
index 7375798c62..d009618442 100644
--- a/includes/Rts.h
+++ b/includes/Rts.h
@@ -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"