From: Pierre Joye Date: Fri, 29 May 2009 07:29:20 +0000 (+0000) Subject: - #42143, the constant NAN is reported as 0 on Windows X-Git-Tag: php-5.2.10RC2~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1627157cdddfcb43fb3b608690bfc040fc1b0f6b;p=php - #42143, the constant NAN is reported as 0 on Windows --- diff --git a/NEWS b/NEWS index 727a1caa69..a92f825687 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP NEWS (Scott) - Fixed bug #48378 (exif_read_data() segfaults on certain corrupted .jpeg files). (Pierre) +- Fixed bug #42143 (The constant NAN is reported as 0 on Windows) + (Kanwaljeet Singla, Venkat Raman Don) 27 May 2009, PHP 5.2.10RC1 - Updated timezone database to version 2009.8 (2009h) (Derick) diff --git a/Zend/tests/bug42143.phpt b/Zend/tests/bug42143.phpt new file mode 100644 index 0000000000..8a73d41bf8 --- /dev/null +++ b/Zend/tests/bug42143.phpt @@ -0,0 +1,38 @@ +--TEST-- +bug #42143 (The constant NAN is reported as 0 on Windows build) +--CREDITS-- +Venkat Raman Don +--FILE-- + +--EXPECT-- +Testing NAN: +NAN= float(NAN) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +float(NAN) +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) +bool(false) + diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index 442850a3e5..a5480ebe62 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -145,7 +145,7 @@ #undef HAVE_ATOF_ACCEPTS_NAN #undef HAVE_ATOF_ACCEPTS_INF -#define HAVE_HUGE_VAL_NAN 1 +#define HAVE_HUGE_VAL_NAN 0 /* vs.net 2005 has a 64-bit time_t. This will likely break * 3rdParty libs that were built with older compilers; switch