[project @ 2004-11-06 13:01:18 by panne]
authorpanne <unknown>
Sat, 6 Nov 2004 13:01:20 +0000 (13:01 +0000)
committerpanne <unknown>
Sat, 6 Nov 2004 13:01:20 +0000 (13:01 +0000)
* Changed some '#include "ghcconfig.h"' to '#include "HsBaseConfig.h"' (or added
  the latter), tracking the recent autoconf-related changes.

* Continued my crusade against CVS keywords.

* Made CTypes.h self-contained.

* Protected headers against multiple inclusions.

Foreign/C/Error.hs
Foreign/C/Types.hs
Foreign/Storable.hs
System/Posix/Internals.hs
System/Posix/Types.hs
include/CTypes.h
include/Typeable.h

index 927924c..6d420d9 100644 (file)
@@ -91,7 +91,7 @@ module Foreign.C.Error (
 -- calculated for us
 --
 #ifndef __NHC__
-#include "ghcconfig.h"
+#include "HsBaseConfig.h"
 #endif
 
 -- system dependent imports
index f34b445..c40e197 100644 (file)
@@ -83,7 +83,7 @@ import Control.Monad
 import Foreign.Ptr
 #endif
 
-#include "Typeable.h"
+#include "HsBaseConfig.h"
 #include "CTypes.h"
 
 -- | Haskell type representing the C @char@ type.
index 31b1b94..3ee78d0 100644 (file)
@@ -37,7 +37,7 @@ import NHC.FFI (Storable(..),Ptr,FunPtr,StablePtr
 import Control.Monad           ( liftM )
 
 #include "MachDeps.h"
-#include "ghcconfig.h"
+#include "HsBaseConfig.h"
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Storable
index e21a01c..943b58f 100644 (file)
@@ -22,6 +22,7 @@
 module System.Posix.Internals where
 
 #include "ghcconfig.h"
+#include "HsBaseConfig.h"
 
 import Control.Monad
 import System.Posix.Types
index f87614f..7c30a54 100644 (file)
@@ -14,7 +14,7 @@
 --
 -----------------------------------------------------------------------------
 
-#include "ghcconfig.h"
+#include "HsBaseConfig.h"
 
 module System.Posix.Types (
 
@@ -101,7 +101,6 @@ import GHC.Show
 import Control.Monad
 #endif
 
-#include "Typeable.h"
 #include "CTypes.h"
 
 #if defined(HTYPE_DEV_T)
index d867936..f82faa8 100644 (file)
@@ -1,12 +1,13 @@
 /* -----------------------------------------------------------------------------
- * $Id: CTypes.h,v 1.8 2004/06/13 21:03:47 panne Exp $
- *
  * Dirty CPP hackery for CTypes/CTypesISO
  *
  * (c) The FFI task force, 2000
  * -------------------------------------------------------------------------- */
 
-#include "MachDeps.h"
+#ifndef CTYPES__H
+#define CTYPES__H
+
+#include "Typeable.h"
 
 /* As long as there is no automatic derivation of classes for newtypes we resort
    to extremely dirty cpp-hackery.   :-P   Some care has to be taken when the
@@ -205,3 +206,5 @@ instance Show T where { \
    showList            = unsafeCoerce# (showList :: [B] -> ShowS); }
 
 #endif /* __GLASGOW_HASKELL__ */
+
+#endif
index ea3fda7..b4ea475 100644 (file)
@@ -10,6 +10,9 @@
  *     instance (Typeable a1, ..., Typeable an) => Typeable (tc a1 ... an)
  * -------------------------------------------------------------------------- */
 
+#ifndef TYPEABLE_H
+#define TYPEABLE_H
+
 #define INSTANCE_TYPEABLE0(tycon,tcname,str) \
 tcname = mkTyCon str; \
 instance Typeable tycon where { typeOf _ = mkTyConApp tcname [] }
@@ -57,3 +60,5 @@ instance (Typeable a, Typeable b, Typeable c) => Typeable (tycon a b c) where {
   typeOf = typeOfDefault }
 
 #endif /* !__GLASGOW_HASKELL__ */
+
+#endif