public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-03-11 17:20 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-03-11 17:20 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=21bdcfad066e602e98c01c63603405f095bd0adf

commit 21bdcfad066e602e98c01c63603405f095bd0adf
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  2 +-
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 43 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 4b9ca9f174..5510ce5ae7 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -22,7 +22,7 @@ subdir	:= stdlib
 
 include ../Makeconfig
 
-headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
+headers	:= stdlib.h bits/stdlib.h bits/stdlib-float.h                         \
 	   monetary.h 							      \
 	   inttypes.h stdint.h bits/wordsize.h bits/timesize.h		      \
 	   errno.h sys/errno.h bits/errno.h bits/types/error_t.h	      \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-06-09 21:17 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:17 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=54e620df5f836382fdca0671bc52b04eb09b6370

commit 54e620df5f836382fdca0671bc52b04eb09b6370
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  1 -
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 42 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index faa7ee3985..9dda53a64c 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -31,7 +31,6 @@ headers := \
   bits/stdlib-bsearch.h \
   bits/stdlib-float.h \
   bits/stdlib.h \
-  bits/stdlib-ldbl.h \
   bits/time64.h \
   bits/timesize.h \
   bits/types/error_t.h \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-06-09 13:13 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:13 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=54e620df5f836382fdca0671bc52b04eb09b6370

commit 54e620df5f836382fdca0671bc52b04eb09b6370
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  1 -
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 42 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index faa7ee3985..9dda53a64c 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -31,7 +31,6 @@ headers := \
   bits/stdlib-bsearch.h \
   bits/stdlib-float.h \
   bits/stdlib.h \
-  bits/stdlib-ldbl.h \
   bits/time64.h \
   bits/timesize.h \
   bits/types/error_t.h \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-06-03 14:03 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:03 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=40cafe910efc3e83443a426b3a70e55b5b323ac0

commit 40cafe910efc3e83443a426b3a70e55b5b323ac0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  1 -
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 42 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index faa7ee3985..9dda53a64c 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -31,7 +31,6 @@ headers := \
   bits/stdlib-bsearch.h \
   bits/stdlib-float.h \
   bits/stdlib.h \
-  bits/stdlib-ldbl.h \
   bits/time64.h \
   bits/timesize.h \
   bits/types/error_t.h \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-05-13 14:17 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:17 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=75150f632fb3d1f43dc61676334ca4515b89dd2c

commit 75150f632fb3d1f43dc61676334ca4515b89dd2c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  1 -
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 42 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index faa7ee3985..9dda53a64c 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -31,7 +31,6 @@ headers := \
   bits/stdlib-bsearch.h \
   bits/stdlib-float.h \
   bits/stdlib.h \
-  bits/stdlib-ldbl.h \
   bits/time64.h \
   bits/timesize.h \
   bits/types/error_t.h \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-05-12 19:30 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:30 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1800839833fc2f39c05f80dc57fe2ead3a955754

commit 1800839833fc2f39c05f80dc57fe2ead3a955754
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  1 -
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 42 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index faa7ee3985..9dda53a64c 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -31,7 +31,6 @@ headers := \
   bits/stdlib-bsearch.h \
   bits/stdlib-float.h \
   bits/stdlib.h \
-  bits/stdlib-ldbl.h \
   bits/time64.h \
   bits/timesize.h \
   bits/types/error_t.h \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-05-10 18:21 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:21 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e2846147fac2ba66016f6e8aea7d78fded5f486f

commit e2846147fac2ba66016f6e8aea7d78fded5f486f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  1 -
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 42 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index faa7ee3985..9dda53a64c 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -31,7 +31,6 @@ headers := \
   bits/stdlib-bsearch.h \
   bits/stdlib-float.h \
   bits/stdlib.h \
-  bits/stdlib-ldbl.h \
   bits/time64.h \
   bits/timesize.h \
   bits/types/error_t.h \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-04-29 14:01 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:01 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=637b4cc3f9058081b923e419caf4495e84083e36

commit 637b4cc3f9058081b923e419caf4495e84083e36
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  1 -
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 42 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index faa7ee3985..9dda53a64c 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -31,7 +31,6 @@ headers := \
   bits/stdlib-bsearch.h \
   bits/stdlib-float.h \
   bits/stdlib.h \
-  bits/stdlib-ldbl.h \
   bits/time64.h \
   bits/timesize.h \
   bits/types/error_t.h \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-04-04 12:51 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:51 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e3d6360b941203c8aded9ad20117cd0c6ef46646

commit e3d6360b941203c8aded9ad20117cd0c6ef46646
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  2 +-
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 43 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 4b9ca9f174..5510ce5ae7 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -22,7 +22,7 @@ subdir	:= stdlib
 
 include ../Makeconfig
 
-headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
+headers	:= stdlib.h bits/stdlib.h bits/stdlib-float.h                         \
 	   monetary.h 							      \
 	   inttypes.h stdint.h bits/wordsize.h bits/timesize.h		      \
 	   errno.h sys/errno.h bits/errno.h bits/types/error_t.h	      \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-03-31 19:03 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:03 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dbefb2b6f14c9594f1578407c64aa1076e67fbf5

commit dbefb2b6f14c9594f1578407c64aa1076e67fbf5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  2 +-
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 43 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 4b9ca9f174..5510ce5ae7 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -22,7 +22,7 @@ subdir	:= stdlib
 
 include ../Makeconfig
 
-headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
+headers	:= stdlib.h bits/stdlib.h bits/stdlib-float.h                         \
 	   monetary.h 							      \
 	   inttypes.h stdint.h bits/wordsize.h bits/timesize.h		      \
 	   errno.h sys/errno.h bits/errno.h bits/types/error_t.h	      \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-03-29 20:26 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:26 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=063168583c1eae1ec9384279915a39533354c4b0

commit 063168583c1eae1ec9384279915a39533354c4b0
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  2 +-
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 43 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 4b9ca9f174..5510ce5ae7 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -22,7 +22,7 @@ subdir	:= stdlib
 
 include ../Makeconfig
 
-headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
+headers	:= stdlib.h bits/stdlib.h bits/stdlib-float.h                         \
 	   monetary.h 							      \
 	   inttypes.h stdint.h bits/wordsize.h bits/timesize.h		      \
 	   errno.h sys/errno.h bits/errno.h bits/types/error_t.h	      \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-03-16 17:58 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-03-16 17:58 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d5b9d42060d23fcdbc29bac36ee211bba8719893

commit d5b9d42060d23fcdbc29bac36ee211bba8719893
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  2 +-
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 43 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 4b9ca9f174..5510ce5ae7 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -22,7 +22,7 @@ subdir	:= stdlib
 
 include ../Makeconfig
 
-headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
+headers	:= stdlib.h bits/stdlib.h bits/stdlib-float.h                         \
 	   monetary.h 							      \
 	   inttypes.h stdint.h bits/wordsize.h bits/timesize.h		      \
 	   errno.h sys/errno.h bits/errno.h bits/types/error_t.h	      \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-03-15 18:36 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-03-15 18:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d5b9d42060d23fcdbc29bac36ee211bba8719893

commit d5b9d42060d23fcdbc29bac36ee211bba8719893
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  2 +-
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 43 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 4b9ca9f174..5510ce5ae7 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -22,7 +22,7 @@ subdir	:= stdlib
 
 include ../Makeconfig
 
-headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
+headers	:= stdlib.h bits/stdlib.h bits/stdlib-float.h                         \
 	   monetary.h 							      \
 	   inttypes.h stdint.h bits/wordsize.h bits/timesize.h		      \
 	   errno.h sys/errno.h bits/errno.h bits/types/error_t.h	      \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [glibc/azanella/clang] Remove stdlib-ldbl.h
@ 2022-03-08 18:57 Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2022-03-08 18:57 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=81d8027d3cb21497d1f9c50758040292f36a3d32

commit 81d8027d3cb21497d1f9c50758040292f36a3d32
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 3 09:46:39 2022 -0300

    Remove stdlib-ldbl.h
    
    The functions which require different alias to long double depending
    of the ABI now uses a set os macros that defines the expected alias
    on the function prototype, instead of redefine them using the
    __LDBL_REDIR_DEC macros.
    
    Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Diff:
---
 include/bits/stdlib-ldbl.h |  1 -
 stdlib/Makefile            |  2 +-
 stdlib/bits/stdlib-ldbl.h  | 63 ---------------------------------------
 stdlib/stdlib.h            | 73 ++++++++++++++++++++++++++--------------------
 4 files changed, 43 insertions(+), 96 deletions(-)

diff --git a/include/bits/stdlib-ldbl.h b/include/bits/stdlib-ldbl.h
deleted file mode 100644
index 62509494a3..0000000000
--- a/include/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <stdlib/bits/stdlib-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 4b9ca9f174..5510ce5ae7 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -22,7 +22,7 @@ subdir	:= stdlib
 
 include ../Makeconfig
 
-headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
+headers	:= stdlib.h bits/stdlib.h bits/stdlib-float.h                         \
 	   monetary.h 							      \
 	   inttypes.h stdint.h bits/wordsize.h bits/timesize.h		      \
 	   errno.h sys/errno.h bits/errno.h bits/types/error_t.h	      \
diff --git a/stdlib/bits/stdlib-ldbl.h b/stdlib/bits/stdlib-ldbl.h
deleted file mode 100644
index bf2c0b551d..0000000000
--- a/stdlib/bits/stdlib-ldbl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
-   Copyright (C) 2006-2022 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _STDLIB_H
-# error "Never include <bits/stdlib-ldbl.h> directly; use <stdlib.h> instead."
-#endif
-
-#ifdef	__USE_ISOC99
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold, strtod)
-# else
-__LDBL_REDIR1_DECL (strtold, __strtoieee128)
-# endif
-#endif
-
-#ifdef __USE_GNU
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strtold_l, strtod_l)
-# else
-__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l)
-# endif
-#endif
-
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
-# ifdef __LDBL_COMPAT
-__LDBL_REDIR1_DECL (strfroml, strfromd)
-# else
-__LDBL_REDIR1_DECL (strfroml, __strfromieee128)
-# endif
-#endif
-
-#ifdef __USE_MISC
-# if defined __LDBL_COMPAT
-__LDBL_REDIR1_DECL (qecvt, ecvt)
-__LDBL_REDIR1_DECL (qfcvt, fcvt)
-__LDBL_REDIR1_DECL (qgcvt, gcvt)
-__LDBL_REDIR1_DECL (qecvt_r, ecvt_r)
-__LDBL_REDIR1_DECL (qfcvt_r, fcvt_r)
-# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-__LDBL_REDIR1_DECL (qecvt, __qecvtieee128)
-__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128)
-__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128)
-__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r)
-__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r)
-# else
-#  error bits/stdlib-ldbl.h included when no ldbl redirections are required.
-# endif
-#endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index bf7cd438e1..122cf95c80 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -124,9 +124,10 @@ extern double strtod (const char *__restrict __nptr,
 extern float strtof (const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1));
 
-extern long double strtold (const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1));
+extern long double __REDIRECT_LDBL_NTH (strtold, (const char *__restrict __nptr,
+						  char **__restrict __endptr),
+					__strtoieee128, strtod)
+     __nonnull ((1));
 #endif
 
 /* Likewise for '_FloatN' and '_FloatNx'.  */
@@ -218,9 +219,11 @@ extern int strfromf (char *__dest, size_t __size, const char *__format,
 		     float __f)
      __THROW __nonnull ((3));
 
-extern int strfroml (char *__dest, size_t __size, const char *__format,
-		     long double __f)
-     __THROW __nonnull ((3));
+extern int __REDIRECT_LDBL_NTH (strfroml, (char *__dest, size_t __size,
+					   const char *__format,
+					   long double __f),
+				__strfromieee128, strfromd)
+     __nonnull ((3));
 #endif
 
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
@@ -301,10 +304,11 @@ extern float strtof_l (const char *__restrict __nptr,
 		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
-extern long double strtold_l (const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      locale_t __loc)
-     __THROW __nonnull ((1, 3));
+extern long double __REDIRECT_LDBL_NTH (strtold_l, (const char *__restrict __nptr,
+						    char **__restrict __endptr,
+						    locale_t __loc),
+					__strtoieee128_l, strtod_l)
+     __nonnull ((1, 3));
 
 # if __HAVE_FLOAT16
 extern _Float16 strtof16_l (const char *__restrict __nptr,
@@ -895,14 +899,20 @@ extern char *gcvt (double __value, int __ndigit, char *__buf)
 
 #ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qecvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qecvtieee128, ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qfcvt, (long double __value, int __ndigit,
+					   int *__restrict __decpt,
+					   int *__restrict __sign),
+				   __qfcvtieee128, fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char * __REDIRECT_LDBL_NTH (qgcvt, (long double __value, int __ndigit,
+					   char *__buf),
+				   __qgcvtieee128, gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -914,14 +924,20 @@ extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qecvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qecvtieee128_r, ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __REDIRECT_LDBL_NTH (qfcvt_r, (long double __value, int __ndigit,
+					  int *__restrict __decpt,
+					  int *__restrict __sign,
+					  char *__restrict __buf,
+					  size_t __len),
+				__qfcvtieee128_r, fcvt_r)
+     __nonnull ((3, 4, 5));
 #endif	/* misc */
 
 
@@ -1027,11 +1043,6 @@ extern int ttyslot (void) __THROW;
 # include <bits/stdlib.h>
 #endif
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/stdlib-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* stdlib.h  */


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-06-09 21:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 17:20 [glibc/azanella/clang] Remove stdlib-ldbl.h Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2022-06-09 21:17 Adhemerval Zanella
2022-06-09 13:13 Adhemerval Zanella
2022-06-03 14:03 Adhemerval Zanella
2022-05-13 14:17 Adhemerval Zanella
2022-05-12 19:30 Adhemerval Zanella
2022-05-10 18:21 Adhemerval Zanella
2022-04-29 14:01 Adhemerval Zanella
2022-04-04 12:51 Adhemerval Zanella
2022-03-31 19:03 Adhemerval Zanella
2022-03-29 20:26 Adhemerval Zanella
2022-03-16 17:58 Adhemerval Zanella
2022-03-15 18:36 Adhemerval Zanella
2022-03-08 18:57 Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).