mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
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.
This commit is contained in:
12
misc/error.h
12
misc/error.h
@ -47,9 +47,15 @@ extern unsigned int error_message_count;
|
||||
variable controls whether this mode is selected or not. */
|
||||
extern int error_one_per_line;
|
||||
|
||||
|
||||
#if defined __extern_always_inline && defined __va_arg_pack
|
||||
# include <bits/error.h>
|
||||
#ifdef __LDBL_COMPAT
|
||||
# include <bits/error-ldbl.h>
|
||||
#else
|
||||
/* Do not inline error and error_at_line when long double has the same
|
||||
size of double, because that would invalidate the redirections to the
|
||||
compatibility functions. */
|
||||
# if defined __extern_always_inline && defined __va_arg_pack
|
||||
# include <bits/error.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
Reference in New Issue
Block a user