From 6e1f6440b99d74db314a9f1a1b27c050ef62a45c Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Wed, 4 Jul 2018 11:54:11 -0300 Subject: ldbl-opt: Add argp_error and argp_failure (bug 23983) The functions argp_error and argp_failure are missing support for printing long double values when long double has the same format as double. This patch adds the new functions __nldbl_argp_error and __nldbl_argp_failure, as well as header magic to redirect calls to them when -mlong-double-64 is in use. Tested for powerpc, powerpc64 and powerpc64le. --- include/argp.h | 11 +++++++++++ include/bits/argp-ldbl.h | 1 + 2 files changed, 12 insertions(+) create mode 100644 include/bits/argp-ldbl.h (limited to 'include') diff --git a/include/argp.h b/include/argp.h index 6cf8782..7077471 100644 --- a/include/argp.h +++ b/include/argp.h @@ -1,6 +1,17 @@ #ifndef _ARGP_H #include +/* Prototypes for internal argp.h functions. */ +#include +void +__argp_error_internal (const struct argp_state *state, const char *fmt, + va_list ap, unsigned int mode_flags); + +void +__argp_failure_internal (const struct argp_state *state, int status, + int errnum, const char *fmt, va_list ap, + unsigned int mode_flags); + #ifndef _ISOMAC extern __typeof (__argp_error) __argp_error attribute_hidden; extern __typeof (__argp_failure) __argp_failure attribute_hidden; diff --git a/include/bits/argp-ldbl.h b/include/bits/argp-ldbl.h new file mode 100644 index 0000000..7c1a343 --- /dev/null +++ b/include/bits/argp-ldbl.h @@ -0,0 +1 @@ +#include -- cgit v1.1