|
@@ -40,7 +40,8 @@
|
|
_SVID_SOURCE ISO C, POSIX, and SVID things.
|
|
_SVID_SOURCE ISO C, POSIX, and SVID things.
|
|
_ATFILE_SOURCE Additional *at interfaces.
|
|
_ATFILE_SOURCE Additional *at interfaces.
|
|
_GNU_SOURCE All of the above, plus GNU extensions.
|
|
_GNU_SOURCE All of the above, plus GNU extensions.
|
|
- _DEFAULT_SOURCE Equivalent to defining _BSD_SOURCE and _SVID_SOURCE.
|
|
+ _DEFAULT_SOURCE Equivalent to defining _BSD_SOURCE and _SVID_SOURCE,
|
|
|
|
+ as well as _POSIX_C_SOURCE=200809L.
|
|
_REENTRANT Select additionally reentrant object.
|
|
_REENTRANT Select additionally reentrant object.
|
|
_THREAD_SAFE Same as _REENTRANT, often used by other systems.
|
|
_THREAD_SAFE Same as _REENTRANT, often used by other systems.
|
|
_FORTIFY_SOURCE If set to numeric value > 0 additional security
|
|
_FORTIFY_SOURCE If set to numeric value > 0 additional security
|
|
@@ -142,18 +143,19 @@
|
|
/* Whether to use feature set F. */
|
|
/* Whether to use feature set F. */
|
|
#define __GLIBC_USE(F) __GLIBC_USE_ ## F
|
|
#define __GLIBC_USE(F) __GLIBC_USE_ ## F
|
|
|
|
|
|
-/* _DEFAULT_SOURCE is equivalent to defining _BSD_SOURCE and _SVID_SOURCE
|
|
+/* _DEFAULT_SOURCE is equivalent to defining _BSD_SOURCE, _SVID_SOURCE
|
|
- * and vice versa. */
|
|
+ * and _POSIX_C_SOURCE=200809L and vice versa. */
|
|
-#ifdef _DEFAULT_SOURCE
|
|
+#if defined _DEFAULT_SOURCE || defined _BSD_SOURCE || defined _SVID_SOURCE
|
|
|
|
+# undef _DEFAULT_SOURCE
|
|
|
|
+# define _DEFAULT_SOURCE 1
|
|
# undef _BSD_SOURCE
|
|
# undef _BSD_SOURCE
|
|
# define _BSD_SOURCE 1
|
|
# define _BSD_SOURCE 1
|
|
# undef _SVID_SOURCE
|
|
# undef _SVID_SOURCE
|
|
# define _SVID_SOURCE 1
|
|
# define _SVID_SOURCE 1
|
|
-#endif
|
|
+# if _POSIX_C_SOURCE < 200809L
|
|
-
|
|
+# undef _POSIX_C_SOURCE
|
|
-#if defined _BSD_SOURCE || defined _SVID_SOURCE
|
|
+# define _POSIX_C_SOURCE 200809L
|
|
-# undef _DEFAULT_SOURCE
|
|
+# endif
|
|
-# define _DEFAULT_SOURCE 1
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/* If _GNU_SOURCE was defined by the user, turn on all the other features. */
|
|
/* If _GNU_SOURCE was defined by the user, turn on all the other features. */
|