diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-02-25 15:58:41 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-02-25 15:58:41 +0000 |
commit | 67d150ca141181c55957c594346691ae8f9f5c3f (patch) | |
tree | 584dd57238807e7aae3e83006a20e6e47e573a7c /newlib/libc/include/sys/cdefs.h | |
parent | 28edc819f27d12e617f5a20935a1206c56a9c1bd (diff) | |
download | cygnal-67d150ca141181c55957c594346691ae8f9f5c3f.tar.gz cygnal-67d150ca141181c55957c594346691ae8f9f5c3f.tar.bz2 cygnal-67d150ca141181c55957c594346691ae8f9f5c3f.zip |
* libc/include/sys/cdefs.h (_GNU_SOURCE): Move check so it has an
effect when _XOPEN_SOURCE is also defined.
Diffstat (limited to 'newlib/libc/include/sys/cdefs.h')
-rw-r--r-- | newlib/libc/include/sys/cdefs.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h index a5e613c63..f1747d0f1 100644 --- a/newlib/libc/include/sys/cdefs.h +++ b/newlib/libc/include/sys/cdefs.h @@ -606,6 +606,14 @@ * Our macros begin with two underscores to avoid namespace screwage. */ +/* Deal with _GNU_SOURCE, which implies everything and the kitchen sink */ +#ifdef _GNU_SOURCE +#undef _XOPEN_SOURCE +#define _XOPEN_SOURCE 700 +#define __BSD_VISIBLE 1 +#define __GNU_VISIBLE 1 +#endif + /* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ #if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 #undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */ @@ -693,12 +701,6 @@ #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 2011 -#elif defined(_GNU_SOURCE) /* Everything and the kitchen sink. */ -#define __POSIX_VISIBLE 200809 -#define __XSI_VISIBLE 700 -#define __BSD_VISIBLE 1 -#define __ISO_C_VISIBLE 2011 -#define __GNU_VISIBLE 1 #else /* Default: everything except __GNU_VISIBLE. */ #define __POSIX_VISIBLE 200809 #define __XSI_VISIBLE 700 |