This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
sys/reent.h and time.h
- To: newlib at sources dot redhat dot com
- Subject: sys/reent.h and time.h
- From: geoffb at bops dot com
- Date: Tue, 7 Aug 2001 16:52:01 -0400
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