From 2a5fd67032f37735240a8bca9cdbf0c497818a20 Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 29 Oct 2002 10:50:54 +0000 Subject: [PATCH] [project @ 2002-10-29 10:50:53 by simonpj] Make imports work for pre-504 --- ghc/utils/ghc-pkg/Main.hs | 9 +++++++-- ghc/utils/hsc2hs/Main.hs | 10 ++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ghc/utils/ghc-pkg/Main.hs b/ghc/utils/ghc-pkg/Main.hs index cf3adc9..0c9d2f0 100644 --- a/ghc/utils/ghc-pkg/Main.hs +++ b/ghc/utils/ghc-pkg/Main.hs @@ -1,7 +1,7 @@ {-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- --- $Id: Main.hs,v 1.29 2002/10/27 10:38:32 mthomas Exp $ +-- $Id: Main.hs,v 1.30 2002/10/29 10:50:53 simonpj Exp $ -- -- Package management tool ----------------------------------------------------------------------------- @@ -34,8 +34,13 @@ import ParsePkgConfLite #include "../../includes/config.h" #ifdef mingw32_HOST_OS -import Foreign.C.String import Foreign + +#if __GLASGOW_HASKELL__ >= 504 +import Foreign.C.String +#else +import CString +#endif #endif main = do diff --git a/ghc/utils/hsc2hs/Main.hs b/ghc/utils/hsc2hs/Main.hs index 3a41426..22b54da 100644 --- a/ghc/utils/hsc2hs/Main.hs +++ b/ghc/utils/hsc2hs/Main.hs @@ -1,7 +1,7 @@ {-# OPTIONS -fglasgow-exts #-} ------------------------------------------------------------------------ --- $Id: Main.hs,v 1.42 2002/10/28 10:11:17 simonpj Exp $ +-- $Id: Main.hs,v 1.43 2002/10/29 10:50:54 simonpj Exp $ -- -- Program for converting .hsc files to .hs files, by converting the -- file into a C program which is run to generate the Haskell source. @@ -27,11 +27,17 @@ import List (intersperse) #include "../../includes/config.h" #ifdef mingw32_HOST_OS -import Foreign.C.String import Foreign + +#if __GLASGOW_HASKELL__ >= 504 +import Foreign.C.String +#else +import CString +#endif #endif + version :: String version = "hsc2hs-0.65" -- 1.7.10.4