From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 9A6BD3850069; Fri, 3 Jun 2022 14:03:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A6BD3850069 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 monetary-ldbl.h X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 8782866113431233a8501d14e71f1b4db9c83840 X-Git-Newrev: 2953a877a0b0494346fbd0b49a36a4a74c556e2c Message-Id: <20220603140313.9A6BD3850069@sourceware.org> Date: Fri, 3 Jun 2022 14:03:13 +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: Fri, 03 Jun 2022 14:03:13 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2953a877a0b0494346fbd0b49a36a4a74c556e2c commit 2953a877a0b0494346fbd0b49a36a4a74c556e2c Author: Adhemerval Zanella Date: Tue Mar 1 16:43:12 2022 -0300 Remove monetary-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/monetary-ldbl.h | 1 - stdlib/Makefile | 1 - stdlib/bits/monetary-ldbl.h | 27 --------------------------- stdlib/monetary.h | 25 ++++++++++++------------- 4 files changed, 12 insertions(+), 42 deletions(-) diff --git a/include/bits/monetary-ldbl.h b/include/bits/monetary-ldbl.h deleted file mode 100644 index 6b6713ffc1..0000000000 --- a/include/bits/monetary-ldbl.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/stdlib/Makefile b/stdlib/Makefile index adbda5f8a5..faa7ee3985 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -26,7 +26,6 @@ headers := \ alloca.h \ bits/errno.h \ bits/indirect-return.h \ - bits/monetary-ldbl.h \ bits/stdint-intn.h \ bits/stdint-uintn.h \ bits/stdlib-bsearch.h \ diff --git a/stdlib/bits/monetary-ldbl.h b/stdlib/bits/monetary-ldbl.h deleted file mode 100644 index fff6704c39..0000000000 --- a/stdlib/bits/monetary-ldbl.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -mlong-double-64 compatibility mode for monetary 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 _MONETARY_H -# error "Never include directly; use instead." -#endif - -__LDBL_REDIR_DECL (strfmon) - -#ifdef __USE_GNU -__LDBL_REDIR_DECL (strfmon_l) -#endif diff --git a/stdlib/monetary.h b/stdlib/monetary.h index 0a90814486..15066292a5 100644 --- a/stdlib/monetary.h +++ b/stdlib/monetary.h @@ -25,6 +25,7 @@ #define __need_size_t #include #include +#include #ifndef __ssize_t_defined typedef __ssize_t ssize_t; @@ -35,28 +36,26 @@ typedef __ssize_t ssize_t; __BEGIN_DECLS /* Formatting a monetary value according to the current locale. */ -extern ssize_t strfmon (char *__restrict __s, size_t __maxsize, - const char *__restrict __format, ...) - __THROW __attribute_format_strfmon__ (3, 4) +extern ssize_t __REDIRECT_LDBL_NTH (strfmon, (char *__restrict __s, size_t __maxsize, + const char *__restrict __format, ...), + __strfmonieee128, __nldbl_strfmon) + __attribute_format_strfmon__ (3, 4) __attr_access ((__write_only__, 1, 2)); #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ # include -/* Formatting a monetary value according to the given locale. */ -extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize, - locale_t __loc, - const char *__restrict __format, ...) - __THROW __attribute_format_strfmon__ (4, 5) +extern ssize_t __REDIRECT_LDBL_NTH (strfmon_l, (char *__restrict __s, + size_t __maxsize, + locale_t __loc, + const char *__restrict __format, + ...), + __strfmon_lieee128, __nldbl_strfmon_l) + __attribute_format_strfmon__ (4, 5) __attr_access ((__write_only__, 1, 2)); #endif -#include -#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 -# include -#endif - __END_DECLS #endif /* monetary.h */