From d0184b0f05600b834470415963cffc977aa81385 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 4 Apr 2022 01:54:47 +0100 Subject: [PATCH] Use _isnan() for even more MSVS versions isnan() is only available since MSVS 2013, so use non-standard _isnan() for MSVS 2010 and 2011 too, and not just for 2005 and 2008, as already done by the parent commit. --- expat/lib/xmlparse.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 62baa50c..b076f5b6 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -87,15 +87,19 @@ #include /* getenv, rand_s */ #include /* isnan */ -#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1600) +#if defined(_WIN32) && defined(_MSC_VER) +# if _MSC_VER < 1600 /* vs2008/9.0 and earlier lack stdint.h; _MSC_VER 1600 is vs2010/10.0 */ # if defined(_WIN64) typedef unsigned __int64 uintptr_t; # else typedef unsigned __int32 uintptr_t; # endif -/* and also use _isnan() rather than the standard isnan() */ +# endif +# if _MSC_VER < 1800 +/* and until vs2013 we have to use _isnan() rather than the standard isnan() */ # define isnan(x) _isnan(x) +# endif #else # include /* uintptr_t */ #endif