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: [PATCH] Define _TIMEVAL_DEFINED consistently whenever defining timeval.


On 13/09/09 10:51 PM, Dave Korn wrote:

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

Patch checked in.


-- Jeff J.


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