@@ -28,6 +28,7 @@ import FileCleanup
2828import System.Directory
2929import System.FilePath
3030import Control.Monad
31+import System.Info
3132import Data.List ( intercalate )
3233import Data.Maybe
3334import Data.Version
@@ -52,11 +53,12 @@ doCpp dflags raw input_fn output_fn = do
5253 | otherwise = SysTools.runCc
5354 dflags (SysTools.Option "-E" : args)
5455
55− let target_defs = [] {-
56− [ "-D" ++ HOST_OS ++ "_BUILD_OS",
57− "-D" ++ HOST_ARCH ++ "_BUILD_ARCH",
58− "-D" ++ TARGET_OS ++ "_HOST_OS",
59− "-D" ++ TARGET_ARCH ++ "_HOST_ARCH" ] -}
56+ let target_defs =
57+ -- NEIL: Patched to use System.Info instead of constants from CPP
58+ [ "-D" ++ os ++ "_BUILD_OS",
59+ "-D" ++ arch ++ "_BUILD_ARCH",
60+ "-D" ++ os ++ "_HOST_OS",
61+ "-D" ++ arch ++ "_HOST_ARCH" ]
6062 -- remember, in code we *compile*, the HOST is the same our TARGET,
6163 -- and BUILD is the same as our HOST.
6264