changeset 1602:08a389e96582 bqaudiostream

Merge
author Chris Cannam
date Wed, 30 Jan 2019 11:00:54 +0000
parents a090221caeda (diff) 40d8b01efbc6 (current diff)
children 6d9881e59cc2
files
diffstat 4 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/base/test/svcore-base-test.cpp	Thu Jan 24 15:09:00 2019 +0000
+++ b/base/test/svcore-base-test.cpp	Wed Jan 30 11:00:54 2019 +0000
@@ -21,6 +21,8 @@
 #include "TestColumnOp.h"
 #include "TestMovingMedian.h"
 
+#include "system/Init.h"
+
 #include <QtTest>
 
 #include <iostream>
@@ -29,6 +31,10 @@
 {
     int good = 0, bad = 0;
 
+    // This is necessary to ensure correct behaviour of snprintf with
+    // older MinGW implementations
+    svSystemSpecificInitialisation();
+
     QCoreApplication app(argc, argv);
     app.setOrganizationName("sonic-visualiser");
     app.setApplicationName("test-svcore-base");
--- a/data/fileio/test/svcore-data-fileio-test.cpp	Thu Jan 24 15:09:00 2019 +0000
+++ b/data/fileio/test/svcore-data-fileio-test.cpp	Wed Jan 30 11:00:54 2019 +0000
@@ -19,6 +19,8 @@
 #include "CSVFormatTest.h"
 #include "CSVStreamWriterTest.h"
 
+#include "system/Init.h"
+
 #include <QtTest>
 
 #include <iostream>
@@ -27,6 +29,8 @@
 {
     int good = 0, bad = 0;
 
+    svSystemSpecificInitialisation();
+
     QString testDir;
 
 #ifdef Q_OS_WIN
--- a/data/model/test/svcore-data-model-test.cpp	Thu Jan 24 15:09:00 2019 +0000
+++ b/data/model/test/svcore-data-model-test.cpp	Wed Jan 30 11:00:54 2019 +0000
@@ -15,6 +15,8 @@
 #include "TestZoomConstraints.h"
 #include "TestWaveformOversampler.h"
 
+#include "system/Init.h"
+
 #include <QtTest>
 
 #include <iostream>
@@ -25,6 +27,8 @@
 {
     int good = 0, bad = 0;
 
+    svSystemSpecificInitialisation();
+
     QCoreApplication app(argc, argv);
     app.setOrganizationName("sonic-visualiser");
     app.setApplicationName("test-model");
--- a/system/Init.cpp	Thu Jan 24 15:09:00 2019 +0000
+++ b/system/Init.cpp	Wed Jan 30 11:00:54 2019 +0000
@@ -63,9 +63,11 @@
     // Remove the CWD from the DLL search path, just in case
     SetDllDirectory(L"");
     putenv("PATH=");
+
+    // Some older versions of MinGW require this in order to get
+    // C99/POSIX-standard behaviour for (s)printf formatting
+    putenv("PRINTF_EXPONENT_DIGITS=2");
 #else
 #endif
 }
 
-
-