From: stolz Date: Fri, 10 Sep 2004 08:29:14 +0000 (+0000) Subject: [project @ 2004-09-10 08:29:14 by stolz] X-Git-Tag: nhc98-1-18-release~252 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1339e9b3bc3edb8c87c8212a546099f6f2bb529b;p=ghc-base.git [project @ 2004-09-10 08:29:14 by stolz] Fix build on Solaris: CTime is no longer an instance of Integral, so do the realToInteger-dance. --- diff --git a/System/Time.hsc b/System/Time.hsc index ec1c2b8..6b59353 100644 --- a/System/Time.hsc +++ b/System/Time.hsc @@ -377,7 +377,8 @@ foreign import ccall "&timezone" timezone :: Ptr CTime gmtoff x = do dst <- (#peek struct tm,tm_isdst) x tz <- if dst then peek altzone else peek timezone - return (-fromIntegral tz) + let realToInteger = round . realToFrac :: Real a => a -> Integer + return (-fromIntegral (realToInteger tz)) # else /* ! HAVE_DECL_ALTZONE */ #if !defined(mingw32_TARGET_OS)