History log of /haiku/headers/compatibility/bsd/ifaddrs.h
Revision Date Author Comments
# 49506076 19-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

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>


# 091a80ae 15-Apr-2015 Adrien Destugues <pulkomandy@gmail.com>

Protect all BSD extensions with _BSD_SOURCE

* Do not define the symbols by default, as they are not in the default
libraries.
* Adjust jamfiles of all code using BSD extensions to define
_BSD_SOURCE.
* This makes Haiku slightly more compliant to standard C/POSIX.


# e3468ef6 26-Feb-2015 Adrien Destugues <pulkomandy@gmail.com>

ifaddrs: add extern "C"

We need this to be callable from C programs. Thanks to Diver for
reporting!


# e2fc7cd3 16-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

Implement getifaddrs.

This is a BSD extension also available in glibc, but is not POSIX.
Fixes #6279.


# 091a80aeed690e629167ea9e5603f51d950e49b8 15-Apr-2015 Adrien Destugues <pulkomandy@gmail.com>

Protect all BSD extensions with _BSD_SOURCE

* Do not define the symbols by default, as they are not in the default
libraries.
* Adjust jamfiles of all code using BSD extensions to define
_BSD_SOURCE.
* This makes Haiku slightly more compliant to standard C/POSIX.


# e3468ef6007f1737c671a024422d53d72e7c3844 26-Feb-2015 Adrien Destugues <pulkomandy@gmail.com>

ifaddrs: add extern "C"

We need this to be callable from C programs. Thanks to Diver for
reporting!


# e2fc7cd3c7be1918e8de18e984d10acb5ea2626d 16-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

Implement getifaddrs.

This is a BSD extension also available in glibc, but is not POSIX.
Fixes #6279.