Merge pull request #2305 from Alexander-Barth/isnan-mingw32

use isnan instead of _fpclass on non-MSVC compilers
This commit is contained in:
Ward Fisher 2022-05-17 16:44:41 -06:00 committed by GitHub
commit 326bdc4934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,7 +302,7 @@ NCZ_stringconvert1(nc_type srctype, size_t len, char* src, NCjson* jvalue)
snprintf(s,sizeof(s),"%llu",zcvt.uint64v);
} break;
case NC_DOUBLE: {
#ifdef _WIN32
#ifdef _MSC_VER
switch (_fpclass(zcvt.float64v)) {
case _FPCLASS_SNAN: case _FPCLASS_QNAN:
strcpy(s,"NaN"); break;