This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] confine _TIMEVAL_DEFINED guard in libc/include/sys/time.h


On Nov 11 13:58, Christopher Faylor wrote:
> The _TIMEVAL_DEFINED guard in time.h is a little to enthusiastic in what
> it is guarding.  It's possible that there are other guards needed here
> but, IMO, _TIMEVAL_DEFINED shouldn't be turning off the declaration of
> timezone.  Without this change, using Mingw64 headers becomes
> problematic.
> 
> Ok to apply?

More or less, yes.  The Mingw64 header uses the _TIMEVAL_DEFINED guard
also to guard the macros timerisset, timercmp, and timerclear, so we
should do the same.  Would you mind to add that?

As a sidenote, using timeval in calls to Windows functions should be
replace with using the type TIMEVAL.  The Mingw64 winsock headers use
TIMEVAL from ./psdk_inc/_ip_types.h throughout.  The Windows timeval
definition differs from the Cygwin definition on 64 bit due to the
different size of the datatype long, while TIMEVAL is defined to work
for LP64 as well as for LLP64.

> 2012-11-11  Christopher Faylor  <...>
> 
>         * libc/include/sys/time.h: Avoid guarding other than timeval
>         declaration with _TIMEVAL_DEFINED.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]