From 777d75fbc07b98115f4868c3290eb8a5d1f3a5b2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 13 Aug 2019 11:26:00 +0000 Subject: Add feature test macro _ISOC2X_SOURCE. This patch starts preparation for C2X support in glibc headers by adding a feature test macro _ISOC2X_SOURCE and corresponding __GLIBC_USE (ISOC2X). (I chose to use the newer __GLIBC_USE style for this rather than the older __USE_* macros tested with #ifdef.) As with other such macros, C2X features are also enabled by compiling for a standard newer than C17, or by using _GNU_SOURCE. This patch does not itself enable anything new in the headers for C2X; that is to be done in followup patches. (For example, most of the TS 18661-1 functions should be declared for C2X without any __STDC_WANT_IEC_60559_BFP_EXT__ being needed, but the ones that 18661-1 adds to Annex F because of their close relation to IEEE 754 formats do still need the WANT macro in C2X.) Once C2X becomes an actual standard we'll presumably move to using the actual year in the feature test macro and __GLIBC_USE, with some period when both macro spellings are accepted, as was done with _ISOC9X_SOURCE. Tested for x86_64. * 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. --- ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 5b1ab7f40a..9263294b07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2019-08-13 Joseph Myers + + * 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 * login/getutid_r.c (__getutid_r): _HAVE_UT_ID and _HAVE_UT_TYPE -- cgit 1.4.1