diff mbox series

Declare wcstofN, wcstofNx for C2x

Message ID 1da9c0d3-877c-a096-4699-2a748555efb@codesourcery.com
State New
Headers show
Series Declare wcstofN, wcstofNx for C2x | expand

Commit Message

Joseph Myers Feb. 25, 2023, 1:18 a.m. UTC
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.

Comments

Joseph Myers March 13, 2023, 9:33 p.m. UTC | #1
Ping.  This patch 
<https://sourceware.org/pipermail/libc-alpha/2023-February/145884.html> is 
pending review.
Andreas Schwab March 14, 2023, 4:04 p.m. UTC | #2
On Feb 25 2023, Joseph Myers wrote:

> 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.

Ok.
diff mbox series

Patch

diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index cde0d32b0a..191427830e 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'