]> vaikene.ee Git - evaf/blobdiff - src/libs/Common/logger.cpp
Changes to build the software with mingw on Windows.
[evaf] / src / libs / Common / logger.cpp
index 809670a6f86f67faf5f08c946b9ddcb82166a54c..358b3146b3bb6e789670adc1203d0524956de764 100644 (file)
@@ -421,11 +421,15 @@ QString Logger::printf(char const * const fmt, ...) const
     va_list ap;
 #ifdef Q_OS_WIN32
     va_start(ap, fmt);
+#  ifdef Q_CC_GNU
+    vsnprintf(str, sizeof(str), fmt, ap);
+#  else
     _vsnprintf_s(str, sizeof(str), _TRUNCATE, fmt, ap);
+#  endif
     va_end(ap);
 #else
     ::va_start(ap, fmt);
-    if (::vasprintf(&str, fmt, ap)); // IF is needed to avoid the compiler warning
+    if (::vasprintf(&str, fmt, ap)) {}; // IF is needed to avoid the compiler warning
     ::va_end(ap);
 #endif