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. --- misc/bits/error-ldbl.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 misc/bits/error-ldbl.h (limited to 'misc/bits') diff --git a/misc/bits/error-ldbl.h b/misc/bits/error-ldbl.h new file mode 100644 index 0000000..c3883da --- /dev/null +++ b/misc/bits/error-ldbl.h @@ -0,0 +1,24 @@ +/* Redirections for error.h functions for -mlong-double-64. + Copyright (C) 2019 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 + . */ + +#ifndef _ERROR_H +# error "Never include directly; use instead." +#endif + +__LDBL_REDIR_DECL (error) +__LDBL_REDIR_DECL (error_at_line) -- cgit v1.1