public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/redir-refactor] Remove error-ldbl.h
@ 2022-03-03 19:23 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2022-03-03 19:23 UTC (permalink / raw)
  To: glibc-cvs

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

commit 23f78dc8364bc82fab5fb1bcb9f27747a5e33a66
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 1 14:35:12 2022 -0300

    Remove error-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/error-ldbl.h |  1 -
 misc/Makefile             |  1 -
 misc/bits/error-ldbl.h    | 24 ------------------------
 misc/error.h              | 18 ++++++++++--------
 4 files changed, 10 insertions(+), 34 deletions(-)

diff --git a/include/bits/error-ldbl.h b/include/bits/error-ldbl.h
deleted file mode 100644
index 84b2646867..0000000000
--- a/include/bits/error-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <misc/bits/error-ldbl.h>
diff --git a/misc/Makefile b/misc/Makefile
index b0302a5b40..4472dd7ba2 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -37,7 +37,6 @@ headers	:= sys/uio.h bits/uio-ext.h bits/uio_lim.h \
 	   bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h \
 	   bits/select2.h bits/hwcap.h sys/auxv.h \
 	   sys/sysmacros.h bits/sysmacros.h bits/types/struct_iovec.h \
-	   bits/error-ldbl.h \
 	   sys/single_threaded.h
 
 routines := brk sbrk sstk ioctl \
diff --git a/misc/bits/error-ldbl.h b/misc/bits/error-ldbl.h
deleted file mode 100644
index 942b05aa08..0000000000
--- a/misc/bits/error-ldbl.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Redirections for error.h functions for -mlong-double-64.
-   Copyright (C) 2019-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 _ERROR_H
-# error "Never include <bits/error-ldbl.h> directly; use <error.h> instead."
-#endif
-
-__LDBL_REDIR_DECL (error)
-__LDBL_REDIR_DECL (error_at_line)
diff --git a/misc/error.h b/misc/error.h
index 05d682719d..16fe9df955 100644
--- a/misc/error.h
+++ b/misc/error.h
@@ -20,6 +20,7 @@
 #define _ERROR_H 1
 
 #include <features.h>
+#include <bits/floatn.h>
 
 
 __BEGIN_DECLS
@@ -28,11 +29,15 @@ __BEGIN_DECLS
    if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
    If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
 
-extern void error (int __status, int __errnum, const char *__format, ...)
+extern void __REDIRECT_LDBL (error, (int __status, int __errnum,
+				     const char *__format, ...),
+			     __errorieee128, __nldbl_error)
      __attribute__ ((__format__ (__printf__, 3, 4)));
-
-extern void error_at_line (int __status, int __errnum, const char *__fname,
-			   unsigned int __lineno, const char *__format, ...)
+extern void __REDIRECT_LDBL (error_at_line, (int __status, int __errnum,
+					     const char *__fname,
+					     unsigned int __lineno,
+					     const char *__format, ...),
+			     __error_at_lineieee128, __nldbl_error_at_line)
      __attribute__ ((__format__ (__printf__, 5, 6)));
 
 /* If NULL, error will flush stdout, then print on stderr the program
@@ -47,14 +52,11 @@ extern unsigned int error_message_count;
    variable controls whether this mode is selected or not.  */
 extern int error_one_per_line;
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/error-ldbl.h>
-#else
 /* Do not inline error and error_at_line when long double has the same
    size of double, nor when long double reuses the float128
    implementation, because that would invalidate the redirections to the
    compatibility functions.  */
+#if !defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
 # if defined __extern_always_inline && defined __va_arg_pack
 #  include <bits/error.h>
 # endif


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-03 19:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 19:23 [glibc/azanella/redir-refactor] Remove error-ldbl.h 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).