[PATCH 1/4] configure: Define __USE_MINGW_ANSI_STDIO for MinGW builds

Jon Turney jon.turney at dronecode.org.uk
Thu Jul 28 19:20:23 UTC 2016


Define __USE_MINGW_ANSI_STDIO to enable C99-compatible printf formating,
used in a few places in X server.

dix/inpututils.c: In function ‘verify_internal_event’:
dix/inpututils.c:714:13: warning: unknown conversion type character ‘h’ in format [-Wformat=]

dix/touch.c: In function ‘TouchEventHistoryPush’:
dix/touch.c:438:16: warning: unknown conversion type character ‘z’ in format [-Wformat=]

mi/mieq.c: In function ‘mieqEnqueue’:
mi/mieq.c:257:31: warning: unknown conversion type character ‘z’ in format [-Wformat=]

Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
---
 configure.ac | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 2b93a4a..1f9637a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -416,9 +416,12 @@ case $host_os in
   darwin*)
 	AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
 	;;
-  cygwin*|mingw*)
+  cygwin*)
 	CFLAGS="$CFLAGS -DFD_SETSIZE=512"
 	;;
+  mingw*)
+	CFLAGS="$CFLAGS -DFD_SETSIZE=512 -D__USE_MINGW_ANSI_STDIO"
+	;;
 esac
 
 dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the
-- 
2.8.3



More information about the xorg-devel mailing list