1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 06:20:23 +02:00

(_POSIX_C_SOURCE): Use this only on hpux, it

causes too many problems elsewhere (glibc, freebsd, mingw).  Reported
by Andreas Vögele.
This commit is contained in:
Kevin Ryde 2004-09-08 22:14:59 +00:00
parent eb8d0af1f5
commit 464ee095ff
2 changed files with 18 additions and 3 deletions

View file

@ -17,9 +17,11 @@
/* See stime.c for comments on why _POSIX_C_SOURCE is not always defined. */
#define _GNU_SOURCE /* ask glibc for everything */
#ifndef __MINGW32__
#define _POSIX_C_SOURCE 199506L /* for readdir_r elsewhere */
#ifdef __hpux
#define _POSIX_C_SOURCE 199506L /* for readdir_r */
#endif
#if HAVE_CONFIG_H

View file

@ -18,8 +18,21 @@
/* _POSIX_C_SOURCE is not defined always, because it causes problems on some
systems, notably
- FreeBSD loses all BSD and XOPEN defines.
- glibc loses some things like CLK_TCK.
- On MINGW it conflicts with the pthread headers.
But on HP-UX _POSIX_C_SOURCE is needed, as noted, for gmtime_r.
Perhaps a configure test could figure out what _POSIX_C_SOURCE gives and
what it takes away, and decide from that whether to use it, instead of
hard coding __hpux. */
#define _GNU_SOURCE /* ask glibc for everything, in particular strptime */
#ifndef __MINGW32__
#ifdef __hpux
#define _POSIX_C_SOURCE 199506L /* for gmtime_r prototype */
#endif