[glibc/azanella/clang] Remove argp-ldbl.h
Adhemerval Zanella
azanella@sourceware.org
Tue Mar 15 18:35:52 GMT 2022
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>
__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>
More information about the Glibc-cvs
mailing list