Make _POSIX_C_SOURCE hack work with Solaris headers

Solaris headers are very literal - if you ask for POSIX_C_SOURCE 199309L,
they limit to only the functions in that standard and no more, unless you
also specify __EXTENSIONS__ to allow functions beyond the standard base.
This commit is contained in:
Alan Coopersmith 2006-10-31 15:57:59 -08:00
parent 645d057620
commit a2434ec5f3

View File

@ -58,6 +58,8 @@ OR PERFORMANCE OF THIS SOFTWARE.
#ifdef _POSIX_C_SOURCE
#define _SAVED_POSIX_C_SOURCE _POSIX_C_SOURCE
#undef _POSIX_C_SOURCE
#else if defined(sun) /* Needed to tell Solaris headers not to restrict to */
#define __EXTENSIONS__ /* only the functions defined in POSIX 199309. */
#endif
#define _POSIX_C_SOURCE 199309L
#include <time.h>