public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] Remove monetary-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=ccb32cfe8303ac56e93e7fc3297fad07614bd428

commit ccb32cfe8303ac56e93e7fc3297fad07614bd428
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 <stdlib/bits/monetary-ldbl.h>
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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=ccb32cfe8303ac56e93e7fc3297fad07614bd428

commit ccb32cfe8303ac56e93e7fc3297fad07614bd428
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 <stdlib/bits/monetary-ldbl.h>
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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=2953a877a0b0494346fbd0b49a36a4a74c556e2c

commit 2953a877a0b0494346fbd0b49a36a4a74c556e2c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 <stdlib/bits/monetary-ldbl.h>
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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=6cbe8f6fbd82ba5ba566a7864c954e95ca942c3e

commit 6cbe8f6fbd82ba5ba566a7864c954e95ca942c3e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 <stdlib/bits/monetary-ldbl.h>
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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=31a6f89f2d5c677094111e7a952f548ecafa38ce

commit 31a6f89f2d5c677094111e7a952f548ecafa38ce
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 <stdlib/bits/monetary-ldbl.h>
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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=c52bbeb6a2289a46b46440e772fcb811e4bb3b3e

commit c52bbeb6a2289a46b46440e772fcb811e4bb3b3e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 <stdlib/bits/monetary-ldbl.h>
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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=a0b6b1fcaf339dfce27ac183e8668b01269f80e5

commit a0b6b1fcaf339dfce27ac183e8668b01269f80e5
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 <stdlib/bits/monetary-ldbl.h>
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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=facf264a97d4facf6ad274d561c683871ce1b9c8

commit facf264a97d4facf6ad274d561c683871ce1b9c8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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              |  2 +-
 stdlib/bits/monetary-ldbl.h  | 27 ---------------------------
 stdlib/monetary.h            | 25 ++++++++++++-------------
 4 files changed, 13 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 <stdlib/bits/monetary-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 8236741984..4b9ca9f174 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -23,7 +23,7 @@ subdir	:= stdlib
 include ../Makeconfig
 
 headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
-	   monetary.h bits/monetary-ldbl.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	      \
 	   ucontext.h sys/ucontext.h bits/indirect-return.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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=16835e149de736deece94c5cbfae626d1ff60a42

commit 16835e149de736deece94c5cbfae626d1ff60a42
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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              |  2 +-
 stdlib/bits/monetary-ldbl.h  | 27 ---------------------------
 stdlib/monetary.h            | 25 ++++++++++++-------------
 4 files changed, 13 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 <stdlib/bits/monetary-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 8236741984..4b9ca9f174 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -23,7 +23,7 @@ subdir	:= stdlib
 include ../Makeconfig
 
 headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
-	   monetary.h bits/monetary-ldbl.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	      \
 	   ucontext.h sys/ucontext.h bits/indirect-return.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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=b76401757842de051ec54c90ac69b5db02294734

commit b76401757842de051ec54c90ac69b5db02294734
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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              |  2 +-
 stdlib/bits/monetary-ldbl.h  | 27 ---------------------------
 stdlib/monetary.h            | 25 ++++++++++++-------------
 4 files changed, 13 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 <stdlib/bits/monetary-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 8236741984..4b9ca9f174 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -23,7 +23,7 @@ subdir	:= stdlib
 include ../Makeconfig
 
 headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
-	   monetary.h bits/monetary-ldbl.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	      \
 	   ucontext.h sys/ucontext.h bits/indirect-return.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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=0a0bdf5a911a47cb4bef0dc1885ff0c074e391e4

commit 0a0bdf5a911a47cb4bef0dc1885ff0c074e391e4
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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              |  2 +-
 stdlib/bits/monetary-ldbl.h  | 27 ---------------------------
 stdlib/monetary.h            | 25 ++++++++++++-------------
 4 files changed, 13 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 <stdlib/bits/monetary-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 8236741984..4b9ca9f174 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -23,7 +23,7 @@ subdir	:= stdlib
 include ../Makeconfig
 
 headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
-	   monetary.h bits/monetary-ldbl.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	      \
 	   ucontext.h sys/ucontext.h bits/indirect-return.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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=0a0bdf5a911a47cb4bef0dc1885ff0c074e391e4

commit 0a0bdf5a911a47cb4bef0dc1885ff0c074e391e4
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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              |  2 +-
 stdlib/bits/monetary-ldbl.h  | 27 ---------------------------
 stdlib/monetary.h            | 25 ++++++++++++-------------
 4 files changed, 13 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 <stdlib/bits/monetary-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 8236741984..4b9ca9f174 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -23,7 +23,7 @@ subdir	:= stdlib
 include ../Makeconfig
 
 headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
-	   monetary.h bits/monetary-ldbl.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	      \
 	   ucontext.h sys/ucontext.h bits/indirect-return.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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=d92ca7fba434497e809158fe9b2aec87c2cee987

commit d92ca7fba434497e809158fe9b2aec87c2cee987
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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              |  2 +-
 stdlib/bits/monetary-ldbl.h  | 27 ---------------------------
 stdlib/monetary.h            | 25 ++++++++++++-------------
 4 files changed, 13 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 <stdlib/bits/monetary-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 8236741984..4b9ca9f174 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -23,7 +23,7 @@ subdir	:= stdlib
 include ../Makeconfig
 
 headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
-	   monetary.h bits/monetary-ldbl.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	      \
 	   ucontext.h sys/ucontext.h bits/indirect-return.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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.h */


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

* [glibc/azanella/clang] Remove monetary-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=21b83071d074fd236e698bb8183b31e8fb553b9b

commit 21b83071d074fd236e698bb8183b31e8fb553b9b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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              |  2 +-
 stdlib/bits/monetary-ldbl.h  | 27 ---------------------------
 stdlib/monetary.h            | 25 ++++++++++++-------------
 4 files changed, 13 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 <stdlib/bits/monetary-ldbl.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 8236741984..4b9ca9f174 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -23,7 +23,7 @@ subdir	:= stdlib
 include ../Makeconfig
 
 headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
-	   monetary.h bits/monetary-ldbl.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	      \
 	   ucontext.h sys/ucontext.h bits/indirect-return.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
-   <https://www.gnu.org/licenses/>.  */
-
-#ifndef _MONETARY_H
-# error "Never include <bits/monetary-ldbl.h> directly; use <monetary.h> 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 <stddef.h>
 #include <bits/types.h>
+#include <bits/floatn.h>
 
 #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 <bits/types/locale_t.h>
 
-/* 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 <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/monetary-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif	/* monetary.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-06-09 13:13 [glibc/azanella/clang] Remove monetary-ldbl.h Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2022-06-09 21:17 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-11 17:20 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).