]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/ieee754/ldbl-opt/nldbl-compat.c
ldbl-opt: Add error and error_at_line (bug 23984)
[thirdparty/glibc.git] / sysdeps / ieee754 / ldbl-opt / nldbl-compat.c
index 6883814d58c256ef9de0cc348b2f34efc393f5b0..86ac418007ee81c09b8ad6a9bf4776065aa4c25d 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <argp.h>
 #include <err.h>
+#include <error.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <libio/strfile.h>
@@ -1072,6 +1073,27 @@ __nldbl_vwarnx (const char *format, __gnuc_va_list ap)
   __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);