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:[EMAIL PROTECTED]

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to