From 522df29937a6c3a84592ea69e02c2ddcded6b3cc Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Thu, 11 Apr 2019 11:20:47 -0400 Subject: [PATCH] Apply some MSC_VER special cases to WIN32 as well (thanks Vincent!) --- mojoshader_common.c | 2 +- mojoshader_opengl.c | 3 +-- mojoshader_preprocessor.c | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mojoshader_common.c b/mojoshader_common.c index 601cb331..807f28d8 100644 --- a/mojoshader_common.c +++ b/mojoshader_common.c @@ -576,7 +576,7 @@ int errorlist_add_va(ErrorList *list, const char *_fname, // 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); diff --git a/mojoshader_opengl.c b/mojoshader_opengl.c index cb835eaf..95a81ec7 100644 --- a/mojoshader_opengl.c +++ b/mojoshader_opengl.c @@ -13,8 +13,7 @@ #include #include -// !!! FIXME: most of these _MSC_VER should probably be _WINDOWS? -#ifdef _MSC_VER +#ifdef _WIN32 #define WIN32_LEAN_AND_MEAN 1 #include // GL headers need this for WINGDIAPI definition. #endif diff --git a/mojoshader_preprocessor.c b/mojoshader_preprocessor.c index 5b5090ba..7a36b465 100644 --- a/mojoshader_preprocessor.c +++ b/mojoshader_preprocessor.c @@ -201,8 +201,7 @@ void MOJOSHADER_print_debug_token(const char *subsystem, const char *token, #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 // GL headers need this for WINGDIAPI definition. #else @@ -218,7 +217,7 @@ int MOJOSHADER_internal_include_open(MOJOSHADER_includeType inctype, 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;