summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-05-10 16:04:01 +0200
committerChristoph Reiter <creiter@src.gnome.org>2018-05-18 18:54:57 +0200
commiteceac66e861de54620c7f110150d171fb9d2cfe6 (patch)
tree1e49977dac0af4d1e1edce343a9a7bebedc88131
parenta9164f55f7db1e620d336511ea5461207b7a06b6 (diff)
downloadglib-eceac66e861de54620c7f110150d171fb9d2cfe6.tar.gz
meson: Don't skip snprintf/vsnprintf checks under MinGW
The comment stated that the test isn't good enough, but it correctly detects a C99 printf when I build with -D__USE_MINGW_ANSI_STDIO=1 and an incompatible printf without it. Using mingw-w64 from current MSYS2. https://bugzilla.gnome.org/show_bug.cgi?id=795569
-rw-r--r--meson.build8
1 files changed, 4 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 568ec6083..055957fcf 100644
--- a/meson.build
+++ b/meson.build
@@ -722,10 +722,10 @@ endif
have_good_vsnprintf = false
have_good_snprintf = false
-if host_system == 'windows'
- # Unfortunately the mingw and Visual Studio 2015+ implementations of C99-style
- # snprintf and vsnprintf don't seem to be quite good enough, at least not in
- # mingw-runtime-3.14. (Sorry, I don't know exactly what is the problem,
+if host_system == 'windows' and cc.get_id() == 'msvc'
+ # Unfortunately the Visual Studio 2015+ implementations of C99-style
+ # snprintf and vsnprintf don't seem to be quite good enough.
+ # (Sorry, I don't know exactly what is the problem,
# but it is related to floating point formatting and decimal point vs. comma.)
# The simple tests in AC_FUNC_VSNPRINTF_C99 and AC_FUNC_SNPRINTF_C99 aren't
# rigorous enough to notice, though.