From: ken Date: Tue, 24 Jul 2001 04:35:36 +0000 (+0000) Subject: [project @ 2001-07-24 04:35:36 by ken] X-Git-Tag: Approximately_9120_patches~1454 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=aaf39182ad0d0dff0a2bbf88596c28e9621b686a;p=ghc-hetmet.git [project @ 2001-07-24 04:35:36 by ken] Fixed: The type of sec and usec in struct timeval are always 32 bits, but not always a CLong. (On Alphas, CLong is 64 bits.) --- diff --git a/ghc/lib/std/Time.hsc b/ghc/lib/std/Time.hsc index d6692f7..0e77f37 100644 --- a/ghc/lib/std/Time.hsc +++ b/ghc/lib/std/Time.hsc @@ -3,7 +3,7 @@ -- to compile on sparc-solaris. Blargh. -- ----------------------------------------------------------------------------- --- $Id: Time.hsc,v 1.16 2001/07/13 11:48:52 rrt Exp $ +-- $Id: Time.hsc,v 1.17 2001/07/24 04:35:36 ken Exp $ -- -- (c) The University of Glasgow, 1995-2001 -- @@ -209,8 +209,8 @@ noTimeDiff = TimeDiff 0 0 0 0 0 0 0 getClockTime = do allocaBytes (#const sizeof(struct timeval)) $ \ p_timeval -> do throwErrnoIfMinus1_ "getClockTime" $ gettimeofday p_timeval nullPtr - sec <- (#peek struct timeval,tv_sec) p_timeval :: IO CLong - usec <- (#peek struct timeval,tv_usec) p_timeval :: IO CLong + sec <- (#peek struct timeval,tv_sec) p_timeval :: IO Int32 + usec <- (#peek struct timeval,tv_usec) p_timeval :: IO Int32 return (TOD (fromIntegral sec) ((fromIntegral usec) * 1000)) #elif HAVE_FTIME