This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
#define POSIX, string.h and time.h
- To: gcc at gcc dot gnu dot org
- Subject: #define POSIX, string.h and time.h
- From: "Zack Weinberg" <zackw at stanford dot edu>
- Date: Mon, 19 Mar 2001 09:50:28 -0800
This is the only use of the POSIX macro in the entire source tree:
/* tsystem.h */
#if defined(POSIX) || defined(USG)
#include <string.h>
#endif
/* ... */
#if defined(POSIX) || defined(USG)
#include <time.h>
#endif
Both of those headers are required to exist by C89. However, they
often do not exist - particularly <string.h> - in pre-C89 systems.
We're in the same boat with <stdlib.h>, but fixproto can fake that
header. I am not sure it's feasible to fake string.h or time.h;
their required contents include functions and typedefs that often
do not exist in pre-C89 libcs.
Does anyone have a suggestion for how we might solve this problem?
zw