File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -485,13 +485,16 @@ typedef char* NCSTRING;
485485
486486#define paramCount () cmdCount
487487
488- // NAN definition copied from math.h included in the Windows SDK version 10.0.14393.0
489488#ifndef NAN
490- # ifndef _HUGE_ENUF
491- # define _HUGE_ENUF 1e+300 // _HUGE_ENUF*_HUGE_ENUF must overflow
489+ # if defined(__GNUC__) || (defined(__clang__) && __has_builtin(__builtin_nanf))
490+ # define NAN (__builtin_nanf(" " ))
491+ # else // modified from math.h included in the Windows SDK version 10.0.26100.0
492+ # ifndef _HUGE_ENUF
493+ # define _HUGE_ENUF 1e+300 // _HUGE_ENUF*_HUGE_ENUF must overflow
494+ # endif
495+ # define NAN_INFINITY ((float )(_HUGE_ENUF * _HUGE_ENUF))
496+ # define NAN (-(float )(NAN_INFINITY * 0 .0F ))
492497# endif
493- # define NAN_INFINITY ((float )(_HUGE_ENUF * _HUGE_ENUF))
494- # define NAN ((float )(NAN_INFINITY * 0 .0F ))
495498#endif
496499
497500#ifndef INF
You can’t perform that action at this time.
0 commit comments