[PATCH] Define _TIMEVAL_DEFINED consistently whenever defining timeval.
Dave Korn
dave.korn.cygwin@googlemail.com
Tue Sep 15 16:57:00 GMT 2009
Hi all,
Granted that the whole _TIMEVAL_DEFINED/__USE_W32_SOCKETS thing is basically
an ugly and undesirable hack, but until we have a plan to fix the whole
tcl/tk/expect/dejagnu/gdb/insight combo (as well as gnat), I figure we have to
live with it, and so it should at least be correct consistent and complete.
There is still one place that struct timeval is defined but _TIMEVAL_DEFINED
is not, causing order-of-include problems. The attached patch is the most
minimal adjustment that could be made to the whole thing to make it
at-least-not-any-worse-than-it-already-is, and solves problems compiling GNAT
from upstream sources.
newlib/ChangeLog:
* libc/include/sys/time.h (_TIMEVAL_DEFINED): Define when
defining struct timeval.
Sanity-checked by building winsup on i686-pc-cygwin, but I think it's fairly
clear by inspection that this could only ever prevent a redefinition error,
and it's exactly how the MinGW headers solve the same problem. Is this OK?
cheers,
DaveK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeval-defined-patch.diff
Type: text/x-c
Size: 493 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20090915/e8fd65dc/attachment.bin>
More information about the Newlib
mailing list