diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.eti.br> | 2018-07-04 11:54:11 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.eti.br> | 2019-03-01 15:21:32 -0300 |
commit | 6e1f6440b99d74db314a9f1a1b27c050ef62a45c (patch) | |
tree | 4e4426ee1e4130fa089e0a1295f5078a35d38472 /include | |
parent | c259196b5005812aa3294dbf4eeca29b266a4522 (diff) | |
download | glibc-6e1f6440b99d74db314a9f1a1b27c050ef62a45c.tar.gz |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/argp.h | 11 | ||||
-rw-r--r-- | include/bits/argp-ldbl.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/argp.h b/include/argp.h index 6cf8782060..7077471d99 100644 --- a/include/argp.h +++ b/include/argp.h @@ -1,6 +1,17 @@ #ifndef _ARGP_H #include <argp/argp.h> +/* Prototypes for internal argp.h functions. */ +#include <stdarg.h> +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 0000000000..7c1a343d1b --- /dev/null +++ b/include/bits/argp-ldbl.h @@ -0,0 +1 @@ +#include <argp/bits/argp-ldbl.h> |