+2019-03-01 Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
+
+ [BZ #23984]
+ * include/bits/error-ldbl.h: New file.
+ * include/error.h: Include stdarg.h. Declare internal functions
+ __error_internal and __error_at_line_internal.
+ * misc/Makefile (headers): Add bits/error-ldbl.h.
+ * misc/bits/error-ldbl.h: New file.
+ * misc/error.h [__LDBL_COMPAT]: Include bits/error-ldbl.h and
+ avoid the inclusion of bits/error.h.
+ * sysdeps/ieee754/ldbl-opt/Versions (libc): Add __nldbl_error,
+ and __nldbl_error_at_line.
+ * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Include error.h.
+ (__nldbl_error, __ndlbl_error_at_line): New functions.
+ * sysdeps/ieee754/ldbl-opt/nldbl-compat.h: Include error.h.
+ Redirect error and error_at_line.
+ * sysdeps/unix/sysv/linux/alpha/libc.abilist: Update.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist:
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist:
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist:
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist:
+ Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
+
2019-03-01 Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
[BZ #23984]
--- /dev/null
+#include <misc/bits/error-ldbl.h>
+#ifndef _ERROR_H
#include <misc/error.h>
+
+#include <stdarg.h>
+
+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
bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h \
bits/select2.h bits/hwcap.h sys/auxv.h \
sys/sysmacros.h bits/sysmacros.h bits/types/struct_iovec.h \
- bits/err-ldbl.h
+ bits/err-ldbl.h bits/error-ldbl.h
routines := brk sbrk sstk ioctl \
readv writev preadv preadv64 pwritev pwritev64 \
--- /dev/null
+/* 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
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _ERROR_H
+# error "Never include <bits/error-ldbl.h> directly; use <error.h> instead."
+#endif
+
+__LDBL_REDIR_DECL (error)
+__LDBL_REDIR_DECL (error_at_line)
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
__nldbl_argp_error; __nldbl_argp_failure;
__nldbl_warn; __nldbl_vwarn; __nldbl_warnx; __nldbl_vwarnx;
__nldbl_err; __nldbl_verr; __nldbl_errx; __nldbl_verrx;
+ __nldbl_error; __nldbl_error_at_line;
}
}
libm {
#include <argp.h>
#include <err.h>
+#include <error.h>
#include <stdarg.h>
#include <stdio.h>
#include <libio/strfile.h>
__vwarnx_internal (format, ap, PRINTF_LDBL_IS_DBL);
}
+void
+__nldbl_error (int status, int errnum, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ __error_internal (status, errnum, message, ap, PRINTF_LDBL_IS_DBL);
+ va_end (ap);
+}
+
+void
+__nldbl_error_at_line (int status, int errnum, const char *file_name,
+ unsigned int line_number, const char *message,
+ ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ __error_at_line_internal (status, errnum, file_name, line_number,
+ message, ap, PRINTF_LDBL_IS_DBL);
+ va_end (ap);
+}
+
#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0);
compat_symbol (libc, __nldbl__IO_sprintf, _IO_sprintf, GLIBC_2_0);
#define __NO_LONG_DOUBLE_MATH 1
#include <argp.h>
#include <err.h>
+#include <error.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdint.h>
NLDBL_DECL (verr);
NLDBL_DECL (errx);
NLDBL_DECL (verrx);
+NLDBL_DECL (error);
+NLDBL_DECL (error_at_line);
/* These do not exist in the normal interface, but must exist in the
__nldbl interface so that they can be called from libnldbl. */
GLIBC_2.30 __nldbl_argp_error F
GLIBC_2.30 __nldbl_argp_failure F
GLIBC_2.30 __nldbl_err F
+GLIBC_2.30 __nldbl_error F
+GLIBC_2.30 __nldbl_error_at_line F
GLIBC_2.30 __nldbl_errx F
GLIBC_2.30 __nldbl_verr F
GLIBC_2.30 __nldbl_verrx F
GLIBC_2.30 __nldbl_argp_error F
GLIBC_2.30 __nldbl_argp_failure F
GLIBC_2.30 __nldbl_err F
+GLIBC_2.30 __nldbl_error F
+GLIBC_2.30 __nldbl_error_at_line F
GLIBC_2.30 __nldbl_errx F
GLIBC_2.30 __nldbl_verr F
GLIBC_2.30 __nldbl_verrx F
GLIBC_2.30 __nldbl_argp_error F
GLIBC_2.30 __nldbl_argp_failure F
GLIBC_2.30 __nldbl_err F
+GLIBC_2.30 __nldbl_error F
+GLIBC_2.30 __nldbl_error_at_line F
GLIBC_2.30 __nldbl_errx F
GLIBC_2.30 __nldbl_verr F
GLIBC_2.30 __nldbl_verrx F
GLIBC_2.30 __nldbl_argp_error F
GLIBC_2.30 __nldbl_argp_failure F
GLIBC_2.30 __nldbl_err F
+GLIBC_2.30 __nldbl_error F
+GLIBC_2.30 __nldbl_error_at_line F
GLIBC_2.30 __nldbl_errx F
GLIBC_2.30 __nldbl_verr F
GLIBC_2.30 __nldbl_verrx F
GLIBC_2.30 __nldbl_argp_error F
GLIBC_2.30 __nldbl_argp_failure F
GLIBC_2.30 __nldbl_err F
+GLIBC_2.30 __nldbl_error F
+GLIBC_2.30 __nldbl_error_at_line F
GLIBC_2.30 __nldbl_errx F
GLIBC_2.30 __nldbl_verr F
GLIBC_2.30 __nldbl_verrx F
GLIBC_2.30 __nldbl_argp_error F
GLIBC_2.30 __nldbl_argp_failure F
GLIBC_2.30 __nldbl_err F
+GLIBC_2.30 __nldbl_error F
+GLIBC_2.30 __nldbl_error_at_line F
GLIBC_2.30 __nldbl_errx F
GLIBC_2.30 __nldbl_verr F
GLIBC_2.30 __nldbl_verrx F
GLIBC_2.30 __nldbl_argp_error F
GLIBC_2.30 __nldbl_argp_failure F
GLIBC_2.30 __nldbl_err F
+GLIBC_2.30 __nldbl_error F
+GLIBC_2.30 __nldbl_error_at_line F
GLIBC_2.30 __nldbl_errx F
GLIBC_2.30 __nldbl_verr F
GLIBC_2.30 __nldbl_verrx F
GLIBC_2.30 __nldbl_argp_error F
GLIBC_2.30 __nldbl_argp_failure F
GLIBC_2.30 __nldbl_err F
+GLIBC_2.30 __nldbl_error F
+GLIBC_2.30 __nldbl_error_at_line F
GLIBC_2.30 __nldbl_errx F
GLIBC_2.30 __nldbl_verr F
GLIBC_2.30 __nldbl_verrx F