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 argp-ldbl.h
Date: Wed, 16 Mar 2022 17:58:07 +0000 (GMT)	[thread overview]
Message-ID: <20220316175807.5BEC23947436@sourceware.org> (raw)

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

commit bc2d5715f687098b8cd66cf5c90e3f472ad0788f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Feb 28 11:01:38 2022 -0300

    Remove argp-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:
---
 argp/Makefile            |  2 +-
 argp/argp.h              | 24 +++++++++++-------------
 argp/bits/argp-ldbl.h    | 24 ------------------------
 include/bits/argp-ldbl.h |  1 -
 4 files changed, 12 insertions(+), 39 deletions(-)

diff --git a/argp/Makefile b/argp/Makefile
index 586136f2fe..8d98faba88 100644
--- a/argp/Makefile
+++ b/argp/Makefile
@@ -22,7 +22,7 @@ subdir	:= argp
 
 include ../Makeconfig
 
-headers		= argp.h bits/argp-ldbl.h
+headers		= argp.h
 routines	= $(addprefix argp-, ba fmtstream fs-xinl help parse pv \
 				     pvh xinl eexst)
 
diff --git a/argp/argp.h b/argp/argp.h
index d6a04069d5..9af80d7719 100644
--- a/argp/argp.h
+++ b/argp/argp.h
@@ -25,6 +25,7 @@
 #include <getopt.h>
 #include <limits.h>
 #include <errno.h>
+#include <bits/floatn.h>
 \f
 __BEGIN_DECLS
 
@@ -464,11 +465,10 @@ extern void __argp_state_help (const struct argp_state *__restrict __state,
 extern void argp_usage (const struct argp_state *__state);
 extern void __argp_usage (const struct argp_state *__state);
 
-/* If appropriate, print the printf string FMT and following args, preceded
-   by the program name and `:', to stderr, and followed by a `Try ... --help'
-   message, then exit (1).  */
-extern void argp_error (const struct argp_state *__restrict __state,
-			const char *__restrict __fmt, ...)
+extern void __REDIRECT_LDBL (argp_error,
+			     (const struct argp_state *__restrict __state,
+			      const char *__restrict __fmt, ...),
+			     __argp_errorieee128, __nldbl_argp_error)
      __attribute__ ((__format__ (__printf__, 2, 3)));
 extern void __argp_error (const struct argp_state *__restrict __state,
 			  const char *__restrict __fmt, ...)
@@ -482,10 +482,13 @@ extern void __argp_error (const struct argp_state *__restrict __state,
    difference between this function and argp_error is that the latter is for
    *parsing errors*, and the former is for other problems that occur during
    parsing but don't reflect a (syntactic) problem with the input.  */
-extern void argp_failure (const struct argp_state *__restrict __state,
-			  int __status, int __errnum,
-			  const char *__restrict __fmt, ...)
+extern void __REDIRECT_LDBL (argp_failure,
+			     (const struct argp_state *__restrict __state,
+			      int __status, int __errnum,
+			      const char *__restrict __fmt, ...),
+			     __argp_failureieee128,__nldbl_argp_failure)
      __attribute__ ((__format__ (__printf__, 4, 5)));
+
 extern void __argp_failure (const struct argp_state *__restrict __state,
 			    int __status, int __errnum,
 			    const char *__restrict __fmt, ...)
@@ -554,11 +557,6 @@ __NTH (__option_is_end (const struct argp_option *__opt))
 # endif
 #endif /* Use extern inlines.  */
 
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/argp-ldbl.h>
-#endif
-
 __END_DECLS
 
 #endif /* argp.h */
diff --git a/argp/bits/argp-ldbl.h b/argp/bits/argp-ldbl.h
deleted file mode 100644
index 9dbe66bb89..0000000000
--- a/argp/bits/argp-ldbl.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Redirections for argp 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 _ARGP_H
-# error "Never include <bits/argp-ldbl.h> directly; use <argp.h> instead."
-#endif
-
-__LDBL_REDIR_DECL (argp_error)
-__LDBL_REDIR_DECL (argp_failure)
diff --git a/include/bits/argp-ldbl.h b/include/bits/argp-ldbl.h
deleted file mode 100644
index 7c1a343d1b..0000000000
--- a/include/bits/argp-ldbl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <argp/bits/argp-ldbl.h>


             reply	other threads:[~2022-03-16 17:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 17:58 Adhemerval Zanella [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-09 21:16 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:20 Adhemerval Zanella
2022-04-29 14:00 Adhemerval Zanella
2022-04-04 12:50 Adhemerval Zanella
2022-03-31 19:03 Adhemerval Zanella
2022-03-29 20:26 Adhemerval Zanella
2022-03-15 18:35 Adhemerval Zanella
2022-03-11 17:19 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=20220316175807.5BEC23947436@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).