From d11086a9391b6066458947b80c0d0059b6b461d8 Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Wed, 8 Aug 2018 17:26:22 -0300 Subject: ldbl-opt: Add error and error_at_line (bug 23984) On platforms where long double may have the same format as double (-mlong-double-64), error and error_at_line do not take that into account and might produce wrong output if a long double conversion is requested by the format string ('%Lf'). This patch adds compatibility functions for this situation and redirects calls via header magic. Tested for powerpc, powerpc64 and powerpc64le. --- include/bits/error-ldbl.h | 1 + include/error.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 include/bits/error-ldbl.h (limited to 'include') diff --git a/include/bits/error-ldbl.h b/include/bits/error-ldbl.h new file mode 100644 index 0000000..84b2646 --- /dev/null +++ b/include/bits/error-ldbl.h @@ -0,0 +1 @@ +#include diff --git a/include/error.h b/include/error.h index 70f3192..9e96262 100644 --- a/include/error.h +++ b/include/error.h @@ -1 +1,15 @@ +#ifndef _ERROR_H #include + +#include + +void +__error_internal (int status, int errnum, const char *message, + va_list args, unsigned int mode_flags); + +void +__error_at_line_internal (int status, int errnum, const char *file_name, + unsigned int line_number, const char *message, + va_list args, unsigned int mode_flags); + +#endif -- cgit v1.1