diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:17:09 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-07-04 17:17:09 +0300 |
commit | cc78bdc31749e9754120ae5a9d4849f4832b40a4 (patch) | |
tree | 4f9e3f2064e56651ed8d41ae9d8ce8b08fc5241b /lib/error.h | |
parent | 8425beb209e6fedf50bcdd934ced14dfa0d7b596 (diff) | |
parent | 71cd8e3a743046573744123777061b64881bf372 (diff) | |
download | coreutils-cc78bdc31749e9754120ae5a9d4849f4832b40a4.tar.gz |
Merge tag 'upstream/8.24'
Upstream version 8.24
Conflicts:
INSTALL
Makefile.in
aclocal.m4
build-aux/config.guess
build-aux/config.rpath
build-aux/config.sub
build-aux/depcomp
build-aux/missing
build-aux/test-driver
build-aux/texinfo.tex
doc/coreutils.info
doc/stamp-vti
doc/version.texi
gnulib-tests/Makefile.in
po/Makefile.in.in
Diffstat (limited to 'lib/error.h')
-rw-r--r-- | lib/error.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/error.h b/lib/error.h index 4aaafb36..eb4fb701 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-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 <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 + #ifdef __cplusplus extern "C" { #endif @@ -40,11 +50,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 |