2015-05-26 Eric Blake <eblake@redhat.com>
+ stdio: limit __gnu_printf__ witness to gcc 4.4+
+ * lib/error.h (_GL_ATTRIBUTE_SPEC_PRINTF): Move gcc version probe...
+ * m4/stdio_h.m4 (gl_STDIO_H): ...here.
+
error: use correct printf attributes on mingw
* lib/stdio.in.h (_GL_ATTRIBUTE_SPEC_PRINTF): New define.
/* 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 && \
- (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
# define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__
# else
# define _GL_ATTRIBUTE_SPEC_PRINTF __printf__
-# stdio_h.m4 serial 45
+# stdio_h.m4 serial 46
dnl Copyright (C) 2007-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
/* For non-mingw systems, compilation will trivially succeed.
For mingw, compilation will succeed for older mingw (system
printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
- #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
#endif
]])], [gl_cv_func_printf_attribute_flavor=system],