[project @ 1998-08-15 16:45:07 by sof]
authorsof <unknown>
Sat, 15 Aug 1998 16:45:07 +0000 (16:45 +0000)
committersof <unknown>
Sat, 15 Aug 1998 16:45:07 +0000 (16:45 +0000)
#undef __GLASGOW_HASKELL__ before including "rtsdefs.h"
(see source code for reasons as to why we need to do this now).

ghc/runtime/prims/PrimArith.lc

index 4cad02f..22646ef 100644 (file)
@@ -7,6 +7,23 @@
 \begin{code}
 /* basic definitions, just as if this were a module */
 
+/* 
+  Sigh, ieee-flpt.h (which we need here) uses
+  __GLASGOW_HASKELL__ in a place or two to check
+  whether it is being included in a Haskell source file
+  or not. This is no longer the case! __GLASGOW_HASKELL__
+  is also defined when compiling .c files (C code that
+  depend on the RTS API needs to know this).
+  
+  An unfortunate state of affairs, but since this is
+  the only place where the two uses of __GLASGOW_HASKELL__
+  clash, we hack around and undefine it before including
+  the header file.    -- sof 8/98
+*/
+#ifdef __GLASGOW_HASKELL__
+#undef __GLASGOW_HASKELL__
+#endif
+
 #include "rtsdefs.h"
 \end{code}