glibc/include
Joseph Myers c688b41960 Add _DEFAULT_SOURCE feature test macro.
This patch adds a feature test macro _DEFAULT_SOURCE to enable the
default set of header declarations.

The intention is: if _DEFAULT_SOURCE is not used there is no change to
the set of __USE_* macros glibc defines; if it's used on its own, and
without compiler options such as -std=c99 that define __STRICT_ANSI__,
again, there is no change; if it's used together with the macros it
approximately (i.e., apart from __USE_POSIX_IMPLICITLY) implies
(-D_BSD_SOURCE -D_SVID_SOURCE -D_POSIX_C_SOURCE=200809L), again, there
is no change.  Otherwise, it causes the relevant features to be
enabled, even if __STRICT_ANSI__, or another feature test macro, would
cause them to be disabled.

This macro deliberately bundles the POSIX.1-2008 (non-X/Open)
functionality with the BSD/SVID/"misc" functionality, rather than
defining a macro that gives just the latter, as many of the header
cleanups resulting from removing _BSD_SOURCE and _SVID_SOURCE support
are only possible when BSD/SVID/"misc" is always bundled with
POSIX.1-2008.

Tested x86_64.

	* include/features.h: Update comment documenting feature test
	macros.  Mention _DEFAULT_SOURCE in comment.
	[_GNU_SOURCE] (_DEFAULT_SOURCE): Undefine and redefine.
	[_DEFAULT_SOURCE]: Undefine and redefine _DEFAULT_SOURCE,
	_BSD_SOURCE and _SVID_SOURCE.
	[!__STRICT_ANSI__ && !_ISOC99_SOURCE && !_POSIX_SOURCE &&
	!_POSIX_C_SOURCE && !_XOPEN_SOURCE && !_BSD_SOURCE &&
	!_SVID_SOURCE]: Likewise.
	[_DEFAULT_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE]
	(__USE_POSIX_IMPLICITLY): Define.
	[_DEFAULT_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE]
	(_POSIX_SOURCE): Undefine and redefine.
	[_DEFAULT_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE]
	(_POSIX_C_SOURCE): Likewise.
	* manual/creature.texi (_DEFAULT_SOURCE): Document.
	(Feature Test Macros): Update documentation of default features.
2013-12-19 13:32:42 +00:00
..
arpa
bits
gnu
net
netinet
programs sys/cdefs.h: export __attribute_alloc_size__ 2013-02-18 17:18:57 -05:00
protocols
rpc Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
rpcsvc
sys Fix indentation and add copyright header to time.h 2013-06-11 18:42:42 +05:30
aio.h
aliases.h
alloca.h
argp.h
argz.h
assert.h
atomic.h
byteswap.h
caller.h
complex.h conformtest: Fix namespace testing. 2013-09-04 20:47:21 +00:00
ctype.h
des.h
dirent.h
dlfcn.h
elf.h
endian.h
envz.h
err.h
errno.h Don't use GLIBC_PRIVATE errno outside of libraries 2013-02-04 10:01:54 +01:00
error.h
execinfo.h
fcntl.h
features.h Add _DEFAULT_SOURCE feature test macro. 2013-12-19 13:32:42 +00:00
fenv.h Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271). 2013-11-28 16:50:38 +00:00
fnmatch.h
fpu_control.h
ftw.h
gconv.h
getopt_int.h
getopt.h
glob.h
gmp.h
gnu-versions.h
grp.h
gshadow.h
iconv.h
ifaddrs.h
ifunc-impl-list.h
inline-hashtab.h
langinfo.h
libc-internal.h libc-internal.h: add ALIGN helper macros 2013-06-24 20:25:15 -04:00
libc-symbols.h Define TLS version of libc_hidden_proto. 2013-11-18 23:02:55 +00:00
libgen.h
libintl.h
libio.h
limits.h
link.h Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
locale.h
malloc.h
math.h New <math.h> macro named issignaling to check for a signaling NaN (sNaN). 2013-04-02 13:51:02 +02:00
mcheck.h
memory.h
mntent.h
monetary.h
mqueue.h
netdb.h Clean up h_errno declaration to use __thread unconditionally. 2013-08-27 11:09:33 -07:00
netgroup.h
nl_types.h
nss.h
nsswitch.h
obstack.h
poll.h
printf.h
pthread.h
pty.h
pwd.h
regex.h
resolv.h Clean up _res declaration to use __thread unconditionally. 2013-08-27 11:04:46 -07:00
rounding-mode.h Remove lots of inline keywords. 2013-02-07 14:44:18 -08:00
sched.h
search.h
set-hooks.h Remove __ptrvalue, __bounded and __unbounded. 2013-02-13 23:30:40 +00:00
setjmp.h
sgtty.h
shadow.h
shlib-compat.h Remove --disable-versioning. 2013-09-04 15:25:42 +00:00
signal.h
spawn.h
stab.h
stap-probe.h [BZ #16195] Fix build warnings from systemtap probes in non-systemtap configurations 2013-12-03 12:26:12 +05:30
stdc-predef.h Define __STDC_IEC_559* based on __GCC_IEC_559*. 2013-11-04 15:43:57 +00:00
stdio_ext.h
stdio.h
stdlib.h Avoid unconditional __call_tls_dtors calls in static linking. 2013-03-28 16:52:57 -07:00
string.h Make __ffs hidden 2013-09-20 21:25:31 +02:00
strings.h
stropts.h
stubs-prologue.h
syscall.h
sysexits.h
syslog.h
tar.h
termios.h
tgmath.h
time.h Fix symbol definitions for __clock_* functions 2013-06-11 11:11:11 +05:30
ttyent.h
uchar.h
ucontext.h
ulimit.h
unistd.h
utime.h
utmp.h
values.h
wchar.h
wctype.h
wordexp.h
xlocale.h