On 64-bit UNIX and Windows, Haskell Int has 64 bits
but C int msecs has 32 bits, resulting in an overflow.
This commit fixes it by switching fdReady() to take int64_t,
into which a Haskell Int will always fit.
(Note we could not switch to long long because that is
32 bit on 64-bit Windows machines.)
Further, to be able to actually wait longer than ~49 days,
we put loops around the waiting syscalls (they all accept only
Note the timer signal would typically interrupt the syscalls
before the ~49 days are over, but you can run Haskell programs
without the timer signal, an we want it to be correct in all