public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/azanella/clang] Remove error-ldbl.h
Date: Thu, 31 Mar 2022 19:03:33 +0000 (GMT)	[thread overview]
Message-ID: <20220331190333.58A4F3857034@sourceware.org> (raw)

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

commit e7a9248cb0d834c87c209c0b6b92a3373fcbbeb6
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


             reply	other threads:[~2022-03-31 19:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 19:03 Adhemerval Zanella [this message]
  -- 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:02 Adhemerval Zanella
2022-05-13 14:16 Adhemerval Zanella
2022-05-12 19:30 Adhemerval Zanella
2022-05-10 18:21 Adhemerval Zanella
2022-04-29 14:00 Adhemerval Zanella
2022-04-04 12:51 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:56 Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220331190333.58A4F3857034@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).