File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ import Data.Data
71
71
#endif
72
72
73
73
#include "HsXlib.h"
74
+ #include <sys/time.h>
74
75
75
76
{-# CFILES cbits/fdset.c #-}
76
77
@@ -398,7 +399,7 @@ get_ConfigureEvent p = peekXConfigureEvent (castPtr p)
398
399
-- Returns True if timeout occurs.
399
400
waitForEvent :: Display -> Word32 -> IO Bool
400
401
waitForEvent display usecs =
401
- with (TimeVal (usecs `div` 1000000 ) (usecs `mod` 1000000 )) $ \ tv_ptr ->
402
+ with (TimeVal (fromIntegral usecs `div` 1000000 ) (fromIntegral usecs `mod` 1000000 )) $ \ tv_ptr ->
402
403
allocaBytes # {size fd_set} $ \ readfds ->
403
404
allocaBytes # {size fd_set} $ \ nofds -> do
404
405
let fd = connectionNumber display
@@ -429,7 +430,7 @@ gettimeofday_in_milliseconds =
429
430
TimeVal sec usec <- peek tv_ptr
430
431
return (toInteger sec * 1000 + toInteger usec `div` 1000 )
431
432
432
- data TimeVal = TimeVal Word32 Word32
433
+ data TimeVal = TimeVal CLong CLong
433
434
434
435
instance Storable TimeVal where
435
436
alignment _ = # {size int}
Original file line number Diff line number Diff line change 1
1
name : X11
2
- version : 1.10.3.9
2
+ version : 1.10.3.10
3
3
synopsis : A binding to the X11 graphics library
4
4
description : A Haskell binding to the X11 graphics library . The binding is a direct
5
5
translation of the C binding; for documentation of these calls, refer
You can’t perform that action at this time.
0 commit comments