Skip to content

Commit 24c180d

Browse files
committed
mingw: fix nvmath
1 parent a2cba9f commit 24c180d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Externals/NVTT/src/nvmath/nvmath.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ inline bool isZero(const float f, const float epsilon = NV_EPSILON)
115115

116116
inline bool isFinite(const float f)
117117
{
118-
#if NV_OS_WIN32
118+
#if NV_OS_WIN32 && !NV_CC_GNUC
119119
return _finite(f) != 0;
120-
#elif NV_OS_DARWIN
120+
#elif NV_OS_DARWIN || NV_CC_GNUC
121121
return isfinite(f);
122122
#elif NV_OS_LINUX
123123
return finitef(f);
@@ -130,9 +130,9 @@ inline bool isFinite(const float f)
130130

131131
inline bool isNan(const float f)
132132
{
133-
#if NV_OS_WIN32
133+
#if NV_OS_WIN32 && !NV_CC_GNUC
134134
return _isnan(f) != 0;
135-
#elif NV_OS_DARWIN
135+
#elif NV_OS_DARWIN || NV_CC_GNUC
136136
return isnan(f);
137137
#elif NV_OS_LINUX
138138
return isnanf(f);

src/Common/PlatformWindows.inl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
#define NOHELP
2424
#define NOPROFILER
2525
#define NOMCX
26+
27+
#ifndef NOMINMAX
2628
#define NOMINMAX
29+
#endif
30+
2731
#define DOSWIN32
2832
#define _WIN32_DCOM
2933

0 commit comments

Comments
 (0)