Marc-André Lureau wrote:
> >>> Oops.  struct timeval is generating a struct timeval with a 32-bit
> >>> tv_sec even when time_t is 64-bits.
> ...
> Mingw64 reviewer said Windows actually defines it. I dig the msdn and
> found this:
> 
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms740560(v=vs.85).aspx
> 
> I suppose they are correct, and they should follow what Windows uses.
> 
> The problem was reported in an msdn discussion too:
> 
> http://social.msdn.microsoft.com/Forums/en/windowssdk/thread/674d34c9-b6f6-4380-bc7b-181eae99847a

Thanks for the deeper investigation. Indeed, 'struct timeval' is defined
by the Winsock2 API, and used by the functions GetAddrInfoEx, SetAddrInfoEx,
WSAConnectByList, WSAConnectByName, select. mingw64 cannot easily change
this struct.

> Should gnulib redefine this struct similarly to other incompatible types?

Yes, this will make sense. As far as I can see, it's a manageable task:
Only the replacements of <sys/time.h>, <sys/select.h>, select(),
gettimeofday(), getsockopt(), setsockopt() will need work.

Bruno


Reply via email to