+2019-08-13 Joseph Myers <joseph@codesourcery.com>
+
+ * include/features.h (_ISOC2X_SOURCE): New feature test macro.
+ Undefine and define to 1 if [_GNU_SOURCE].
+ (__GLIBC_USE_ISOC2X): New macro. Undefine and redefine depending
+ on [_ISOC2X_SOURCE] and [__STDC_VERSION__ > 201710L].
+ (__USE_ISOC11): Also define to 1 if [_ISOC2X_SOURCE].
+ (__USE_ISOC99): Likewise.
+ (__USE_ISOC95): Likewise.
+ * manual/creature.texi (_ISOC2X_SOURCE): Document.
+
2019-08-13 Florian Weimer <fweimer@redhat.com>
* login/getutid_r.c (__getutid_r): _HAVE_UT_ID and _HAVE_UT_TYPE
Major new features:
- [Add new features here]
+* The GNU C Library now supports a feature test macro _ISOC2X_SOURCE to
+ enable features from the draft ISO C2X standard. Only some features from
+ this draft standard are supported by the GNU C Library, and as the draft
+ is under active development, the set of features enabled by this macro is
+ liable to change. Features from C2X are also enabled by _GNU_SOURCE, or
+ by compiling with "gcc -std=gnu2x".
Deprecated and removed features, and other changes affecting compatibility:
__STRICT_ANSI__ ISO Standard C.
_ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
_ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
+ _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
__STDC_WANT_LIB_EXT2__
Extensions to ISO C99 from TR 27431-2:2010.
__STDC_WANT_IEC_60559_BFP_EXT__
#undef __USE_GNU
#undef __USE_FORTIFY_LEVEL
#undef __KERNEL_STRICT_NAMES
+#undef __GLIBC_USE_ISOC2X
#undef __GLIBC_USE_DEPRECATED_GETS
#undef __GLIBC_USE_DEPRECATED_SCANF
# define _ISOC99_SOURCE 1
# undef _ISOC11_SOURCE
# define _ISOC11_SOURCE 1
+# undef _ISOC2X_SOURCE
+# define _ISOC2X_SOURCE 1
# undef _POSIX_SOURCE
# define _POSIX_SOURCE 1
# undef _POSIX_C_SOURCE
#if (defined _DEFAULT_SOURCE \
|| (!defined __STRICT_ANSI__ \
&& !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \
+ && !defined _ISOC2X_SOURCE \
&& !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \
&& !defined _XOPEN_SOURCE))
# undef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE 1
#endif
+/* This is to enable the ISO C2X extension. */
+#if (defined _ISOC2X_SOURCE \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
+# define __GLIBC_USE_ISOC2X 1
+#else
+# define __GLIBC_USE_ISOC2X 0
+#endif
+
/* This is to enable the ISO C11 extension. */
-#if (defined _ISOC11_SOURCE \
+#if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
# define __USE_ISOC11 1
#endif
/* This is to enable the ISO C99 extension. */
-#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
+ || defined _ISOC2X_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
# define __USE_ISOC99 1
#endif
/* This is to enable the ISO C90 Amendment 1:1995 extension. */
-#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
+ || defined _ISOC2X_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
# define __USE_ISOC95 1
#endif
If this macro is defined, ISO C11 extensions to ISO C99 are included.
@end defvr
+@defvr Macro _ISOC2X_SOURCE
+@standards{C2X, (none)}
+If this macro is defined, ISO C2X extensions to ISO C11 are included.
+Only some features from this draft standard are supported by
+@theglibc{}.
+@end defvr
+
@defvr Macro __STDC_WANT_LIB_EXT2__
@standards{ISO, (none)}
If you define this macro to the value @code{1}, features from ISO/IEC