Re: cvs: php-src /ext/standard basic_functions.c

From: Date: Sun, 28 Mar 2004 22:33:09 +0000
Subject: Re: cvs: php-src /ext/standard basic_functions.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-26836@lists.php.net to get a copy of this message
Hello Andi, it's just a fall back that for example works on intel and alpha machines. FreeBSD should use the direct setting (1st #if) on intel and the atof() way for other cpus. The problem here is i cannot check all systems but i could offer three solutions so far of which the first two work on most old *nix and all new *nix as well as all win systems. The third now tries to complete portability. marcus Sunday, March 28, 2004, 11:56:20 PM, you wrote: > Not sure on what platforms you expect the last #else to be reached but it > would raise a sigfloatingpoint on FreeBSD. Dividing by zero does not seem > like a good idea. > Andi > At 09:46 PM 3/28/2004 +0000, Marcus Boerger wrote: >> #include "php_streams.h" >>@@ -957,9 +957,10 @@ >> ((php_uint32*)&val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH; >> ((php_uint32*)&val)[0] = 0; >> return val; >>-#else >>- /* hope the target platform is ISO-C compliant */ >>+#elif defined(HAVE_ATOF_ACCEPTS_NAN) >> return atof("NAN"); >>+#else >>+ return 0.0/0.0; >> #endif -- Best regards, Marcus mailto:helly@php.net

« previous php.cvs (#26836) next »