diff options
author | simonmar <unknown> | 2002-05-03 08:39:17 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-05-03 08:39:17 +0000 |
commit | d33f77b7ff83802219823a88cc5c0a36834b7256 (patch) | |
tree | 5e21a46246aaf509e0f55e7532f8af789d7c9df2 /libraries | |
parent | ea54d6c1e9a05a9e9e4a227ff0d3db9e8c23fc62 (diff) | |
download | haskell-d33f77b7ff83802219823a88cc5c0a36834b7256.tar.gz |
[project @ 2002-05-03 08:39:17 by simonmar]
Fix the build on Sparc-Solaris, hopefully without breaking it on Windows.
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/System/Time.hsc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libraries/base/System/Time.hsc b/libraries/base/System/Time.hsc index 9bf935eb2a..060b796e02 100644 --- a/libraries/base/System/Time.hsc +++ b/libraries/base/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 |