X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fhsc2hs%2FMain.hs;h=420111ace9b6e9ca26b51746e0284ab739fe2db4;hb=c320c9fc91703182ae0f53f66fb0920b9177b723;hp=eae0bbfa6b365f902422b4efcaec2a492e1e8402;hpb=550efe6e5026b3b9b5681782a1518b9c2c6aca87;p=ghc-hetmet.git diff --git a/ghc/utils/hsc2hs/Main.hs b/ghc/utils/hsc2hs/Main.hs index eae0bbf..420111a 100644 --- a/ghc/utils/hsc2hs/Main.hs +++ b/ghc/utils/hsc2hs/Main.hs @@ -1,7 +1,7 @@ {-# OPTIONS -fffi -cpp #-} ------------------------------------------------------------------------ --- $Id: Main.hs,v 1.70 2005/01/28 16:28:56 ross Exp $ +-- $Id: Main.hs,v 1.72 2005/03/10 17:58:42 malcolm 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. @@ -512,7 +512,7 @@ output flags name toks = do let cProgName = outDir++outBase++"_hsc_make.c" oProgName = outDir++outBase++"_hsc_make.o" progName = outDir++outBase++"_hsc_make" -#if defined(mingw32_HOST_OS) +#if defined(mingw32_HOST_OS) || defined(__CYGWIN32__) -- This is a real hack, but the quoting mechanism used for calling the C preprocesseor -- via GHC has changed a few times, so this seems to be the only way... :-P * * * ++ ".exe" @@ -724,7 +724,7 @@ outHeaderHs flags inH toks = " printf (\"{-# OPTIONS %s #-}\\n\", \""++ showCString s++"\");\n"++ "#else\n"++ - " printf (\"{-# GHC_OPTIONS %s #-}\\n\", \""++ + " printf (\"{-# OPTIONS_GHC %s #-}\\n\", \""++ showCString s++"\");\n"++ "#endif\n" outInclude s = @@ -873,7 +873,7 @@ showCString = concatMap showCChar -- Convert paths foo/baz to foo\baz on Windows dosifyPath, unDosifyPath :: String -> String -#if defined(mingw32_HOST_OS) +#if defined(mingw32_HOST_OS) || defined(__CYGWIN32__) dosifyPath xs = subst '/' '\\' xs unDosifyPath xs = subst '\\' '/' xs