From 8dfb8e613edf56732e9bd4a7e72cd65aa0e07bc5 Mon Sep 17 00:00:00 2001 From: Cary Phillips Date: Wed, 16 Mar 2022 17:16:35 -0700 Subject: [PATCH] Use _WIN32 instead of _MSC_VER to fix mingw build (#245) * Use _WIN32 instead of _MSC_VER to fix mingw build Signed-off-by: Cary Phillips * fix formatting Signed-off-by: Cary Phillips --- src/ImathTest/half_perf_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ImathTest/half_perf_test.cpp b/src/ImathTest/half_perf_test.cpp index 81fe82e1..f1ee599e 100644 --- a/src/ImathTest/half_perf_test.cpp +++ b/src/ImathTest/half_perf_test.cpp @@ -3,7 +3,7 @@ // Copyright Contributors to the OpenEXR Project. // -#ifdef _MSC_VER +#ifdef _WIN32 # define _CRT_RAND_S #endif @@ -14,7 +14,7 @@ #include #include #include -#ifdef _MSC_VER +#ifdef _WIN32 # include #else # include @@ -267,7 +267,7 @@ static inline half exptable_half_constructor(float f) int64_t get_ticks (void) { -#ifdef _MSC_VER +#ifdef _WIN32 static uint64_t scale = 0; if (scale == 0) { @@ -381,7 +381,7 @@ main (int argc, char* argv[]) perf_test_half_to_float (floats, halfs, numentries); // test float -> half with real-world values -#ifdef _MSC_VER +#ifdef _WIN32 unsigned int rv; for (int i = 0; i < numentries; ++i) {