From 077ec128f2f79a4d729599c5227a752f63f1aaf0 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 3 May 2002 08:39:17 +0000 Subject: [PATCH] [project @ 2002-05-03 08:39:17 by simonmar] Fix the build on Sparc-Solaris, hopefully without breaking it on Windows. --- System/Time.hsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/System/Time.hsc b/System/Time.hsc index 9bf935e..060b796 100644 --- a/System/Time.hsc +++ b/System/Time.hsc @@ -316,7 +316,6 @@ gmtoff x = (#peek struct tm,tm_gmtoff) x # endif # ifndef mingw32_TARGET_OS foreign import ccall unsafe "&tzname" tzname :: Ptr (Ptr CChar) -foreign import ccall unsafe "timezone" timezone :: Ptr CLong # else foreign import ccall unsafe "__hscore_timezone" timezone :: Ptr CLong foreign import ccall unsafe "__hscore_tzname" tzname :: Ptr (Ptr CChar) @@ -335,14 +334,15 @@ zone x = do #endif # if HAVE_ALTZONE -foreign import ccall "&altzone" :: Ptr CTime -foreign import ccall "&timezone" :: Ptr CTime +foreign import ccall "&altzone" altzone :: Ptr CTime +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) # define GMTOFF(x) (((struct tm *)x)->tm_isdst ? altzone : timezone ) # else /* ! HAVE_ALTZONE */ +foreign import ccall unsafe "timezone" timezone :: Ptr CLong -- Assume that DST offset is 1 hour ... gmtoff x = do dst <- (#peek struct tm,tm_isdst) x -- 1.7.10.4