am 071bed80
: Merge "_GNU_SOURCE implies _BSD_SOURCE and the latest _POSIX_C_SOURCE."
* commit '071bed8091cab4e070a1f5e6b2eb0dd1141f0498': _GNU_SOURCE implies _BSD_SOURCE and the latest _POSIX_C_SOURCE.
This commit is contained in:
commit
32dc56a1ca
@ -362,13 +362,22 @@
|
|||||||
* do it in <sys/cdefs.h> instead because that's where our existing
|
* do it in <sys/cdefs.h> instead because that's where our existing
|
||||||
* _POSIX_C_SOURCE tests were, and we're already confident that <sys/cdefs.h>
|
* _POSIX_C_SOURCE tests were, and we're already confident that <sys/cdefs.h>
|
||||||
* is included everywhere it should be.
|
* is included everywhere it should be.
|
||||||
|
*
|
||||||
|
* The _GNU_SOURCE test needs to come before any _BSD_SOURCE or _POSIX* tests
|
||||||
|
* because _GNU_SOURCE implies everything else.
|
||||||
*/
|
*/
|
||||||
#if defined(_BSD_SOURCE)
|
|
||||||
# define __USE_BSD 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE)
|
#if defined(_GNU_SOURCE)
|
||||||
# define __USE_GNU 1
|
# define __USE_GNU 1
|
||||||
|
# undef _POSIX_SOURCE
|
||||||
|
# define _POSIX_SOURCE 1
|
||||||
|
# undef _POSIX_C_SOURCE
|
||||||
|
# define _POSIX_C_SOURCE 200809L
|
||||||
|
# undef _BSD_SOURCE
|
||||||
|
# define _BSD_SOURCE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_BSD_SOURCE)
|
||||||
|
# define __USE_BSD 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
|
Loading…
Reference in New Issue
Block a user