Apply some MSC_VER special cases to WIN32 as well (thanks Vincent!)
authorEthan Lee <flibitijibibo@flibitijibibo.com>
Thu, 11 Apr 2019 11:20:47 -0400
changeset 1195 f4ef8606c68d
parent 1194 3948d7f5b4ff
child 1196 906becfc1042
Apply some MSC_VER special cases to WIN32 as well (thanks Vincent!)
mojoshader_common.c
mojoshader_opengl.c
mojoshader_preprocessor.c
--- a/mojoshader_common.c	Sun Apr 07 00:19:10 2019 -0400
+++ b/mojoshader_common.c	Thu Apr 11 11:20:47 2019 -0400
@@ -576,7 +576,7 @@
     // In this case we make another copy of va and fetch the length only
     // with another call to _vscprintf
 
-#ifdef _MSC_VER
+#ifdef _WIN32
     if (len == -1)
     {
         va_copy(ap, va);
--- a/mojoshader_opengl.c	Sun Apr 07 00:19:10 2019 -0400
+++ b/mojoshader_opengl.c	Thu Apr 11 11:20:47 2019 -0400
@@ -13,8 +13,7 @@
 #include <stdarg.h>
 #include <assert.h>
 
-// !!! FIXME: most of these _MSC_VER should probably be _WINDOWS?
-#ifdef _MSC_VER
+#ifdef _WIN32
 #define WIN32_LEAN_AND_MEAN 1
 #include <windows.h>  // GL headers need this for WINGDIAPI definition.
 #endif
--- a/mojoshader_preprocessor.c	Sun Apr 07 00:19:10 2019 -0400
+++ b/mojoshader_preprocessor.c	Thu Apr 11 11:20:47 2019 -0400
@@ -201,8 +201,7 @@
 
 #if !MOJOSHADER_FORCE_INCLUDE_CALLBACKS
 
-// !!! FIXME: most of these _MSC_VER should probably be _WINDOWS?
-#ifdef _MSC_VER
+#ifdef _WIN32
 #define WIN32_LEAN_AND_MEAN 1
 #include <windows.h>  // GL headers need this for WINGDIAPI definition.
 #else
@@ -218,7 +217,7 @@
                                      MOJOSHADER_malloc m, MOJOSHADER_free f,
                                      void *d)
 {
-#ifdef _MSC_VER
+#ifdef _WIN32
     WCHAR wpath[MAX_PATH];
     if (!MultiByteToWideChar(CP_UTF8, 0, fname, -1, wpath, MAX_PATH))
         return 0;