From: panne Date: Sat, 6 Nov 2004 13:01:20 +0000 (+0000) Subject: [project @ 2004-11-06 13:01:18 by panne] X-Git-Tag: nhc98-1-18-release~204 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=40001ff06f1058c5b375f8b6c6c3dfd0471600ba;p=haskell-directory.git [project @ 2004-11-06 13:01:18 by panne] * 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. --- diff --git a/Foreign/C/Error.hs b/Foreign/C/Error.hs index 927924c..6d420d9 100644 --- a/Foreign/C/Error.hs +++ b/Foreign/C/Error.hs @@ -91,7 +91,7 @@ module Foreign.C.Error ( -- calculated for us -- #ifndef __NHC__ -#include "ghcconfig.h" +#include "HsBaseConfig.h" #endif -- system dependent imports diff --git a/Foreign/C/Types.hs b/Foreign/C/Types.hs index f34b445..c40e197 100644 --- a/Foreign/C/Types.hs +++ b/Foreign/C/Types.hs @@ -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. diff --git a/Foreign/Storable.hs b/Foreign/Storable.hs index 31b1b94..3ee78d0 100644 --- a/Foreign/Storable.hs +++ b/Foreign/Storable.hs @@ -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 diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs index e21a01c..943b58f 100644 --- a/System/Posix/Internals.hs +++ b/System/Posix/Internals.hs @@ -22,6 +22,7 @@ module System.Posix.Internals where #include "ghcconfig.h" +#include "HsBaseConfig.h" import Control.Monad import System.Posix.Types diff --git a/System/Posix/Types.hs b/System/Posix/Types.hs index f87614f..7c30a54 100644 --- a/System/Posix/Types.hs +++ b/System/Posix/Types.hs @@ -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) diff --git a/include/CTypes.h b/include/CTypes.h index d867936..f82faa8 100644 --- a/include/CTypes.h +++ b/include/CTypes.h @@ -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 diff --git a/include/Typeable.h b/include/Typeable.h index ea3fda7..b4ea475 100644 --- a/include/Typeable.h +++ b/include/Typeable.h @@ -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