From aaf39182ad0d0dff0a2bbf88596c28e9621b686a Mon Sep 17 00:00:00 2001 From: ken Date: Tue, 24 Jul 2001 04:35:36 +0000 Subject: [PATCH] [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.) --- ghc/lib/std/Time.hsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 1.7.10.4