The mingw trick of using __USE_MINGW_ANSI_STDIO only changes the
definitions in <inttypes.h> if <stdio.h> is also included. But
since we want to always use the __gnu_printf__ flavor when
available, we want to make sure that including <inttypes.h> in
isolation will give the desired "lld" answer.
Reported by Assaf Gordon.
* modules/inttypes (Depends-on): Require extensions, so that mingw
always uses GNU style inttypes.
* lib/inttypes.in.h: On mingw, include <stdio.h>.
Signed-off-by: Eric Blake <eblake@redhat.com>
2015-05-26 Eric Blake <eblake@redhat.com>
+ inttypes: force correct mingw PRIdMAX even without <stdio.h>
+ * modules/inttypes (Depends-on): Require extensions, so that mingw
+ always uses GNU style inttypes.
+ * lib/inttypes.in.h: On mingw, include <stdio.h>.
+
stdio: fix probe on mingw under gcc 5.1
* m4/stdio_h.m4 (gl_STDIO_H): Change to compile test, to work
around new gcc preprocessor rules.
#endif
/* Get CHAR_BIT. */
#include <limits.h>
+/* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <stdio.h>
+#endif
#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
Depends-on:
inttypes-incomplete
+extensions
configure.ac:
gl_INTTYPES_H