[prev in list] [next in list] [prev in thread] [next in thread]
List: erlang-patches
Subject: [erlang-patches] unix/sys_float.c mishandles errno
From: bjorn () blanked ! org (Bjorn Gustavsson)
Date: 2008-01-24 9:35:40
Message-ID: o1ve5jzhub.fsf () erix ! ericsson ! se
[Download RAW message or body]
"Matthew Dempsky" <matthew> writes:
> The code in unix/sys_float.c assumes that if strtod(3) sets errno to
> ERANGE then there was a problem parsing the value. However, according
> to POSIX, the actual indication of an error is that it also returned
> 0.0, HUGE_VAL, or -HUGE_VAL. This causes a problem on OS X 10.5 when
> trying to read denormalized floating-point numbers because OS X's
> strtod(3) implementation sets errno to ERANGE for denormals.
>
> The patch below changes the errno check to be consistent with POSIX.
Thanks!
We will test the patch in our daily build and include it in R12B-1
if we'll encounter no problems.
/Bjorn
--
Bj?rn Gustavsson, Erlang/OTP, Ericsson AB
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic