[RFA] confine _TIMEVAL_DEFINED guard in libc/include/sys/time.h
Fri Nov 16 11:47:00 GMT 2012
On Mon, Nov 12, 2012 at 05:04:18PM +0100, Corinna Vinschen wrote:
>On Nov 12 10:20, Christopher Faylor wrote:
>> On Mon, Nov 12, 2012 at 11:40:31AM +0100, Corinna Vinschen wrote:
>> >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?
>> Well, maybe, but that isn't a necessary change as far as getting 32-bit
>> Cygwin building is concerned*. Although I can see the sense in putting
>> the macros under this conditional, the macros on Linux are not protected
>> by the equivalent "__need_timeval".
>It's not really equivalent. The __need_timeval is used to pull in
>only the timeval definition from other headers, while the newlib
>_TIMEVAL_DEFINED macro has been explicitely added to handle inclusion
>of Windows headers.
Ok. Excuse me for not being accurate. The actual equivalent ifdef
guard is _STRUCT_TIMEVAL. The point was, however, that linux doesn't
do things this way.
But, regardless, the change was checked in before you sent this email
so there is no need for more debate on the subject.
More information about the Newlib