[PATCH] Define _TIMEVAL_DEFINED consistently whenever defining timeval.
Mon Sep 14 02:37:00 GMT 2009
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.
* 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?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 493 bytes
Desc: not available
More information about the Cygwin-patches