[commit: ghc] master: Windows build fix (7f5af24)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/7f5af24fb2af9b0469c79180c72d78cb12e7358f

>---------------------------------------------------------------

commit 7f5af24fb2af9b0469c79180c72d78cb12e7358f
Author: Ian Lynagh <[email protected]>
Date:   Sun Sep 16 13:40:22 2012 +0100

    Windows build fix

>---------------------------------------------------------------

 compiler/ghci/ByteCodeGen.lhs |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs
index 59dfbc8..e400d7a 100644
--- a/compiler/ghci/ByteCodeGen.lhs
+++ b/compiler/ghci/ByteCodeGen.lhs
@@ -22,7 +22,10 @@ import ByteCodeAsm
 import ByteCodeLink
 import LibFFI
 
+import Constants
+import DynFlags
 import Outputable
+import Platform
 import Name
 import MkId
 import Id
@@ -40,7 +43,6 @@ import TyCon
 import Util
 import VarSet
 import TysPrim
-import DynFlags
 import ErrUtils
 import Unique
 import FastString
@@ -1032,8 +1034,9 @@ generateCCall d0 s p (CCallSpec target cconv safety) fn args_r_to_l
             void marshall_code ( StgWord* ptr_to_top_of_stack )
          -}
          -- resolve static address
-         get_target_info
-            = case target of
+         get_target_info = do
+             dflags <- getDynFlags
+             case target of
                  DynamicTarget
                     -> return (False, panic "ByteCodeGen.generateCCall(dyn)")
 
@@ -1044,11 +1047,10 @@ generateCCall d0 s p (CCallSpec target cconv safety) fn args_r_to_l
                           return (True, res)
                    where
                       stdcall_adj_target
-#ifdef mingw32_TARGET_OS
-                          | StdCallConv <- cconv
+                          | OSMinGW32 <- platformOS (targetPlatform dflags)
+                          , StdCallConv <- cconv
                           = let size = fromIntegral a_reps_sizeW * wORD_SIZE in
                             mkFastString (unpackFS target ++ '@':show size)
-#endif
                           | otherwise
                           = target
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.