From 6eb5949dd99d174393465069c2fd0bab32deddcc Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Mon, 28 Dec 2015 00:06:36 +0000 Subject: gettext-0.19.7 --- gettext-tools/gnulib-lib/error.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'gettext-tools/gnulib-lib/error.h') diff --git a/gettext-tools/gnulib-lib/error.h b/gettext-tools/gnulib-lib/error.h index 873d9aa..c5b3736 100644 --- a/gettext-tools/gnulib-lib/error.h +++ b/gettext-tools/gnulib-lib/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995-1997, 2003, 2006, 2008-2014 Free Software Foundation, + Copyright (C) 1995-1997, 2003, 2006, 2008-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -31,6 +31,16 @@ # 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 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 + #if GNULIB_REPLACE_ERROR # undef error_print_progname # undef error_message_count @@ -49,11 +59,11 @@ 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 ((__printf__, 3, 4)); + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4)); extern void error_at_line (int __status, int __errnum, const char *__fname, unsigned int __lineno, const char *__format, ...) - _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6)); + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6)); /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this -- cgit v1.2.1