[RFA] confine _TIMEVAL_DEFINED guard in libc/include/sys/time.h
Christopher Faylor
cgf-use-the-mailinglist-please@sourceware.org
Mon Nov 12 17:27:00 GMT 2012
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". Also, moving the macros has
potential side-effects for rtems. Do they have to weigh in on this too?
I thought this was an obvious change architecturally for newlib since
the guard (or at least the naming of the guard) was clearly wrong.
Moving the macros seems slightly less obvious.
cgf
*I've had to make a number of changes to Cygwin to get it to build with
the latest released version of the mingw64 headers.
More information about the Newlib
mailing list