haiku/headers/compatibility/bsd
Adrien Destugues 4950607607 Add a features.h to auto enable _DEFAULT_SOURCE
Unless __STRICT_ANSI__ is defined (as it is when running the compiler in
--std=c89 or --std=c99, but not when running it without any specific
args), we can enable these by default and behave like most other
systems. I don't know why no one has done this yet despite suggesting it
multiple times and people prefer to #define _BSD_SOURCE manually
everywhere.

Remove all places in our Jamfiles and sources where it had been defined.
_DEFAULT_SOURCE is now enabled by default for all sources of Haiku, since we
let the compiler use GNU extensions (no strict C standard specified on
command line)

Use _DEFAULT_SOURCE as the define name to match current versions of
glibc. Enable it if _BSD_SOURCE is #defined in compiler flags, for
backward compatibility.

Change-Id: I6db04da5f6db437723cdfba3478f5094a69d7727
Reviewed-on: https://review.haiku-os.org/c/1633
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-07-29 20:26:46 +00:00
..
arpa Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
netinet Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
sys Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
endian.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
err.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
errno.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
features.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
ifaddrs.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
libutil.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
link.h Import link.h and link_elf.h from FreeBSD master 2019-07-17 22:17:49 +00:00
paths.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
pty.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
readpassphrase.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
signal.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
stdio.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
stdlib.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
string.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
stringlist.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
sysexits.h
time.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
unistd.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00
vis.h Add a features.h to auto enable _DEFAULT_SOURCE 2019-07-29 20:26:46 +00:00