]> Savannah Git Hosting - gnulib.git/commitdiff
support GNU format printf and scanf on mingw
authorPádraig Brady <P@draigBrady.com>
Tue, 2 Dec 2014 13:34:06 +0000 (13:34 +0000)
committerEric Blake <eblake@redhat.com>
Mon, 8 Dec 2014 20:31:58 +0000 (13:31 -0700)
Allow %lld and %Lf to work on mingw as per:
http://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/

m4/extensions.m4
m4/stdio_h.m4
modules/dtoastr
modules/ftoastr
modules/ldtoastr
modules/stdio

index 37f55ca3d155220a09276b97984a456b99dccc45..cf285ba273a7b0a5203d3be3f1b486d5b5c60927 100644 (file)
@@ -68,6 +68,10 @@ dnl configure.ac when using autoheader 2.62.
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
+/* Use GNU style printf and scanf.  */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
 /* Enable threading extensions on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
@@ -100,6 +104,7 @@ dnl configure.ac when using autoheader 2.62.
   AC_DEFINE([_ALL_SOURCE])
   AC_DEFINE([_DARWIN_C_SOURCE])
   AC_DEFINE([_GNU_SOURCE])
+  AC_DEFINE([__USE_MINGW_ANSI_STDIO])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
   AC_DEFINE([_TANDEM_SOURCE])
   AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
index d15913a3ca02e81bbe79791cbb783f2e7e275172..ef0dcc12d26e62667f02369f0f41a4a2059c0855 100644 (file)
@@ -6,6 +6,9 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_STDIO_H],
 [
+  dnl For __USE_MINGW_ANSI_STDIO
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   gl_NEXT_HEADERS([stdio.h])
 
index 60b09b462064d0a7435f759875ab7ebfaa7d19aa..72f0da8fcd5a8f80d7789e5f65eb058faab57a1d 100644 (file)
@@ -8,6 +8,7 @@ lib/dtoastr.c
 m4/c-strtod.m4
 
 Depends-on:
+extensions
 intprops
 
 configure.ac:
index b52ce26339101d317efdc7bafb14e4d84809f88e..2d583d491230cd5bb4d4696a9201f258358bbec2 100644 (file)
@@ -7,6 +7,7 @@ lib/ftoastr.c
 m4/c-strtod.m4
 
 Depends-on:
+extensions
 intprops
 
 configure.ac:
index 50731a5ab37dd226613587955a85c9fee8d9c19b..5695e77ee040b01eac0a8426ac4a0ebfae02c02c 100644 (file)
@@ -8,6 +8,7 @@ lib/ldtoastr.c
 m4/c-strtod.m4
 
 Depends-on:
+extensions
 intprops
 
 configure.ac:
index 1eec2bf26391fb0877f47e706e71c58d24d65265..e953316a07f03f89e7660192f511d62457f7f98b 100644 (file)
@@ -6,6 +6,7 @@ lib/stdio.in.h
 m4/stdio_h.m4
 
 Depends-on:
+extensions
 include_next
 snippet/arg-nonnull
 snippet/c++defs