summaryrefslogtreecommitdiff
path: root/lib/error.h
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:27 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-03-05 10:08:27 +0900
commita2c7c975f0813d307b31d06da2c015916a6bb16d (patch)
tree985a31e8c860c690d9f20e6621ce5fcc05ccd244 /lib/error.h
parentdc6b8fd841f8acf37e6d3f7642e71cae175505bd (diff)
downloadwget-a2c7c975f0813d307b31d06da2c015916a6bb16d.tar.gz
wget-a2c7c975f0813d307b31d06da2c015916a6bb16d.tar.bz2
wget-a2c7c975f0813d307b31d06da2c015916a6bb16d.zip
Imported Upstream version 1.21upstream/1.21
Diffstat (limited to 'lib/error.h')
-rw-r--r--lib/error.h39
1 files changed, 15 insertions, 24 deletions
diff --git a/lib/error.h b/lib/error.h
index 3759f8a..6f6c90e 100644
--- a/lib/error.h
+++ b/lib/error.h
@@ -1,5 +1,5 @@
/* Declaration for error-reporting function
- Copyright (C) 1995-1997, 2003, 2006, 2008-2019 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2020 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
@@ -19,27 +19,8 @@
#ifndef _ERROR_H
#define _ERROR_H 1
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
- The __-protected variants of the attributes 'format' and 'printf' are
- accepted by gcc versions 2.6.4 (effectively 2.7) and later.
- We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
- gnulib and libintl do '#define printf __printf__' when they override
- the 'printf' function. */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
-/* On mingw, the flavor of printf depends on whether the extensions module
- * is in use; the check for <stdio.h> determines the witness macro. */
-#ifndef _GL_ATTRIBUTE_SPEC_PRINTF
-# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
-# define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__
-# else
-# define _GL_ATTRIBUTE_SPEC_PRINTF __printf__
-# endif
-#endif
+/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM. */
+#include <stdio.h>
#ifdef __cplusplus
extern "C" {
@@ -50,11 +31,21 @@ extern "C" {
If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */
extern void error (int __status, int __errnum, const char *__format, ...)
- _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4));
+#if GNULIB_VFPRINTF_POSIX
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 4))
+#else
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 3, 4))
+#endif
+ ;
extern void error_at_line (int __status, int __errnum, const char *__fname,
unsigned int __lineno, const char *__format, ...)
- _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6));
+#if GNULIB_VFPRINTF_POSIX
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 5, 6))
+#else
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 5, 6))
+#endif
+ ;
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this