From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1105) id A607F3858D33; Tue, 14 Mar 2023 18:11:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A607F3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678817511; bh=kL6XGGNXGAvOUC6z6dRCgO2AteD29f0jxSaxAWgyzgk=; h=From:To:Subject:Date:From; b=A7cfmu89d2PXjpUeOocrzZXdnMSbEsNnMoJtQ8gOBaX9NqPEwU2Vg8AzCg+bFDiEn cnIkgb6DWUd+uRBeIOzlUQx+RXL2nmXe9XU8n/0POogSwn0zzzwmTjWDaxfkIipzEN QNLnF7oYFRW0koV7b1h6JUCQUAYfH1dZfuWW/UhM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Joseph Myers To: glibc-cvs@sourceware.org Subject: [glibc] Declare wcstofN, wcstofNx for C2x X-Act-Checkin: glibc X-Git-Author: Joseph Myers X-Git-Refname: refs/heads/master X-Git-Oldrev: 2d4728e60621c8844ec679291aa5458c622d8f4f X-Git-Newrev: 9e2ff880f3cbc0b4ec8505ad2ce4a1c92d7f6d56 Message-Id: <20230314181151.A607F3858D33@sourceware.org> Date: Tue, 14 Mar 2023 18:11:51 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9e2ff880f3cbc0b4ec8505ad2ce4a1c92d7f6d56 commit 9e2ff880f3cbc0b4ec8505ad2ce4a1c92d7f6d56 Author: Joseph Myers Date: Tue Mar 14 18:11:27 2023 +0000 Declare wcstofN, wcstofNx for C2x WG14 accepted the changes in N3105 to define wcstofN and wcstofNx functions for C2x. Thus enable those for C2x (given also __GLIBC_USE (IEC_60559_TYPES_EXT) and support for the relevant _FloatN / _FloatNx type) rather than only for __USE_GNU. Tested for x86_64. Diff: --- wcsmbs/wchar.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index 7ab99ba93b..acc2eb9ddf 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -386,42 +386,44 @@ extern long double wcstold (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif /* C99 */ +#if __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X) /* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */ -#if __HAVE_FLOAT16 && defined __USE_GNU +# if __HAVE_FLOAT16 extern _Float16 wcstof16 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT32 && defined __USE_GNU +# if __HAVE_FLOAT32 extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT64 && defined __USE_GNU +# if __HAVE_FLOAT64 extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT128 && defined __USE_GNU +# if __HAVE_FLOAT128 extern _Float128 wcstof128 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT32X && defined __USE_GNU +# if __HAVE_FLOAT32X extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT64X && defined __USE_GNU +# if __HAVE_FLOAT64X extern _Float64x wcstof64x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif -#if __HAVE_FLOAT128X && defined __USE_GNU +# if __HAVE_FLOAT128X extern _Float128x wcstof128x (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; -#endif +# endif +#endif /* __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X) */ /* Convert initial portion of wide string NPTR to `long int'