This is the mail archive of the newlib@sources.redhat.com 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]

sys/reent.h and time.h


The comment at the top of sys/reent.h says:

/* WARNING: All identifiers here must begin with an underscore.  This file
is
   included by stdio.h and others and we therefore must only use identifiers
   in the namespace allotted to us.  */

but reent.h includes time.h (presumably to get `struct tm') which brings in
quite a few identifiers that don't begin with an underscore.  The upshot is
the following program won't compile:

	#include <stdio.h>

	int
	main ()
	{
		int time = 0;
		printf ("%d", time);
	}

since time is defined in time.h.

Is this a known problem?  What is the best approach to fixing this?

Please CC me as I'm not on the list (yet).

-- 
Geoff Berry



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