Repository : ssh://darcs.haskell.org//srv/darcs/hsc2hs

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/fc8a91274534f8f94ec5480ad7504b9fb94b6b6d

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

commit fc8a91274534f8f94ec5480ad7504b9fb94b6b6d
Author: Michał Masłowski <[email protected]>
Date:   Fri May 11 15:18:06 2012 +0200

    Recognize huge unsigned long long values as integers when cross compiling.
    
    MIPS N32 has RLIM_INFINITY in resource.h defined as
    0x7fffffffffffffffULL which doesn't fit in a 32 bit unsigned long to
    which it was casted before applying this patch, so a cross build of
    libraries/unix for mips64el failed.

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

 CrossCodegen.hs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/CrossCodegen.hs b/CrossCodegen.hs
index b4f648f..7fbd20a 100644
--- a/CrossCodegen.hs
+++ b/CrossCodegen.hs
@@ -499,7 +499,7 @@ checkConditional _ = error "checkConditional argument isn't 
a Special"
 -- Make sure the value we're trying to binary search isn't floating point.
 checkValueIsIntegral :: ZCursor Token -> Bool -> TestMonad Bool
 checkValueIsIntegral z@(ZCursor (Special _ _ value) _ _) nonNegative = do
-    let intType = if nonNegative then "unsigned long" else "long"
+    let intType = if nonNegative then "unsigned long long" else "long long"
     testLog ("checking if " ++ value ++ " is an integer") $ do
         success <- runCompileBooleanTest z $ "(" ++ intType ++ ")(" ++ value 
++ ") == (" ++ value ++ ")"
         testLog' $ "result: " ++ (if success then "integer" else "floating")



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to