From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 9D76E3839816; Thu, 31 Mar 2022 19:03:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D76E3839816 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Remove stdlib-ldbl.h X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 16835e149de736deece94c5cbfae626d1ff60a42 X-Git-Newrev: dbefb2b6f14c9594f1578407c64aa1076e67fbf5 Message-Id: <20220331190353.9D76E3839816@sourceware.org> Date: Thu, 31 Mar 2022 19:03:53 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2022 19:03:53 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dbefb2b6f14c9594f1578407c64aa1076e67fbf5 commit dbefb2b6f14c9594f1578407c64aa1076e67fbf5 Author: Adhemerval Zanella 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 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 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 - . */ - -#ifndef _STDLIB_H -# error "Never include directly; use 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 #endif -#include -#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 -# include -#endif - __END_DECLS #endif /* stdlib.h */