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 Add first fixes for conformtest for POSIX2008 2012-02-26 21:32:56 -05:00
bits Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
gnu Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
net First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
netinet First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
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 First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
aliases.h Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
alloca.h Account for alloca size rounding in extend_alloca 2011-11-01 18:29:34 +01:00
argp.h
argz.h Remove use of INTDEF/INTUSE in intl 2012-05-24 23:08:18 +02:00
assert.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
atomic.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
byteswap.h
caller.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
complex.h conformtest: Fix namespace testing. 2013-09-04 20:47:21 +00:00
ctype.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
des.h
dirent.h Declare __getdirentries in internal dirent.h. 2012-08-15 10:09:18 -07:00
dlfcn.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
elf.h Check supported DF_1_XXX bits 2012-11-21 06:33:19 -08:00
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 Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
fcntl.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
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 First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
fpu_control.h
ftw.h
gconv.h
getopt.h
getopt_int.h
glob.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
gmp.h
gnu-versions.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
grp.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
gshadow.h
iconv.h
ifaddrs.h Cache network interface information 2011-10-31 01:51:16 -04:00
ifunc-impl-list.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
inline-hashtab.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
langinfo.h Add first fixes for conformtest for POSIX2008 2012-02-26 21:32:56 -05:00
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 Remove use of INTDEF/INTUSE in intl 2012-05-24 23:08:18 +02:00
libio.h Remove use of INTDEF/INTUSE in libio 2012-05-24 23:06:20 +02:00
limits.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
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 First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
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 Remove use of INTUSE/INTDEF in misc. 2012-05-31 13:10:02 +02:00
monetary.h Add first fixes for conformtest for POSIX2008 2012-02-26 21:32:56 -05:00
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 First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
pty.h
pwd.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
regex.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
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 First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
search.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
set-hooks.h Remove __ptrvalue, __bounded and __unbounded. 2013-02-13 23:30:40 +00:00
setjmp.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
sgtty.h
shadow.h Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
shlib-compat.h Remove --disable-versioning. 2013-09-04 15:25:42 +00:00
signal.h Remove use of INTDEF/INTUSE in stdio-common 2012-06-01 01:25:41 +02:00
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.h Remove use of INTDEF/INTUSE in libio 2012-05-24 23:06:20 +02:00
stdio_ext.h Remove use of INTDEF/INTUSE in libio 2012-05-24 23:06:20 +02:00
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 First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
stubs-prologue.h
syscall.h
sysexits.h
syslog.h
tar.h
termios.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
tgmath.h
time.h Fix symbol definitions for __clock_* functions 2013-06-11 11:11:11 +05:30
ttyent.h
uchar.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
ucontext.h
ulimit.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
unistd.h add attribute_hidden to __have_{sock_cloexec,pipe2,dup3 2012-08-18 01:54:12 -04:00
utime.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
utmp.h Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
values.h Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
wchar.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
wctype.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
wordexp.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
xlocale.h