changeset 120:a38d318c85a9 tip

MSVC fixes
author Chris Cannam
date Wed, 18 Dec 2019 16:51:20 +0000
parents e1d65734d953
children
files PyPlugScanner.cpp vampy-main.cpp
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/PyPlugScanner.cpp	Wed Aug 14 14:59:19 2019 +0100
+++ b/PyPlugScanner.cpp	Wed Dec 18 16:51:20 2019 +0000
@@ -19,6 +19,10 @@
 //#include "vamp-hostsdk/PluginHostAdapter.h"
 
 #ifdef _WIN32
+// We should be using the unicode apis, but we're not (yet)
+#undef UNICODE
+#undef _UNICODE
+#define _MBCS 1
 #include <windows.h>
 #include <tchar.h>
 #define pathsep ("\\")
@@ -385,7 +389,7 @@
             }
         }
 #ifdef _WIN32
-        char *cpfiles = getenv("ProgramFiles");
+        const char *cpfiles = getenv("ProgramFiles");
         if (!cpfiles) cpfiles = "C:\\Program Files";
         std::string pfiles(cpfiles);
         std::string::size_type f;
--- a/vampy-main.cpp	Wed Aug 14 14:59:19 2019 +0100
+++ b/vampy-main.cpp	Wed Dec 18 16:51:20 2019 +0000
@@ -39,6 +39,13 @@
 
 #endif
 
+#ifdef _WIN32
+// We should be using the unicode apis, but we're not (yet)
+#undef UNICODE
+#undef _UNICODE
+#define _MBCS 1
+#endif
+
 #include "vamp/vamp.h"
 #include "vamp-sdk/PluginAdapter.h"
 #include "PyPlugScanner.h"