summaryrefslogtreecommitdiff
path: root/features.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-03-19 21:59:41 +0000
committerRoland McGrath <roland@gnu.org>1996-03-19 21:59:41 +0000
commitd3669add24e6ebc86ed25683ff4d4eb7c67e4d56 (patch)
tree8dd2bcd753727f20d10781d212197f8708ef8b44 /features.h
parentc8cf0b14ed2a085f17c6c5c58ca4a92d97591fcc (diff)
downloadglibc-d3669add24e6ebc86ed25683ff4d4eb7c67e4d56.tar.gz
* features.h (__FAVOR_BSD): Define only if _BSD_SOURCE is defined
and no other _*_SOURCE macro is. (_GNU_SOURCE): Don't define by default. * libc-symbols.h (_GNU_SOURCE): Define it.
Diffstat (limited to 'features.h')
-rw-r--r--features.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/features.h b/features.h
index 1249bb50b3..675eac5d52 100644
--- a/features.h
+++ b/features.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */
_GNU_SOURCE All of the above, plus GNU extensions.
The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
- If none of these are defined, the default is _GNU_SOURCE.
+ If none of these are defined, the default is all but _GNU_SOURCE.
If more than one of these are defined, they accumulate.
For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE
together give you ANSI C, 1003.1, and 1003.2, but nothing else.
@@ -69,20 +69,14 @@ Cambridge, MA 02139, USA. */
#undef __FAVOR_BSD
-/* If nothing is defined, define _GNU_SOURCE. */
-#if (!defined(_GNU_SOURCE) && !defined(__STRICT_ANSI__) && \
- !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) && \
- !defined(_BSD_SOURCE) && !defined(_SVID_SOURCE))
-#define _GNU_SOURCE 1
-#endif
-
-
/* Always use ANSI things. */
#define __USE_ANSI 1
/* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */
-#ifdef _BSD_SOURCE
+#if defined (_BSD_SOURCE) && \
+ !(defined (_POSIX_SOURCE) || defined (_POSIX_C_SOURCE) ||
+ defiend (_GNU_SOURCE) || defined (_SVID_SOURCE))
#define __FAVOR_BSD 1
#endif