Skip to content

Commit

Permalink
Use _WIN32 instead of _MSC_VER to fix mingw build (#245)
Browse files Browse the repository at this point in the history
* Use _WIN32 instead of _MSC_VER to fix mingw build

Signed-off-by: Cary Phillips <[email protected]>

* fix formatting

Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm authored Mar 17, 2022
1 parent 28514c0 commit b9f9263
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ImathTest/half_perf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright Contributors to the OpenEXR Project.
//

#ifdef _MSC_VER
#ifdef _WIN32
# define _CRT_RAND_S
#endif

Expand All @@ -14,7 +14,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _MSC_VER
#ifdef _WIN32
# include <windows.h>
#else
# include <time.h>
Expand Down Expand Up @@ -271,7 +271,7 @@ exptable_half_constructor (float f)
int64_t
get_ticks (void)
{
#ifdef _MSC_VER
#ifdef _WIN32
static uint64_t scale = 0;
if (scale == 0)
{
Expand Down Expand Up @@ -387,7 +387,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)
{
Expand Down

0 comments on commit b9f9263

Please sign in to comment.