diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-07-06 20:57:55 -0400 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2011-07-21 12:15:33 +0200 |
commit | af6207d5391d434d6f2951da4c8f57d1f3a2a762 (patch) | |
tree | 8ce11a9240f7637441f642314c340d62b9da8f4b | |
parent | 1a1fbe1558c397336afd2ec3518b1d8fad6ed018 (diff) | |
download | glibc-af6207d5391d434d6f2951da4c8f57d1f3a2a762.tar.gz glibc-af6207d5391d434d6f2951da4c8f57d1f3a2a762.tar.xz glibc-af6207d5391d434d6f2951da4c8f57d1f3a2a762.zip |
Change error code for underflows in strtod
(cherry picked from commit 9895c8bc62759a2d7abf95654fb2aefe5677a930)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | stdlib/strtod_l.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 534ac2c094..b11f5ee012 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-06-22 Marek Polacek <mpolacek@redhat.com> + + [BZ #9696] + * stdlib/strtod_l.c (round_and_return): Set ERANGE instead of EDOM. + 2011-06-30 Andreas Schwab <schwab@redhat.com> * sysdeps/posix/getaddrinfo.c (gaih_inet): Make sure RES_USE_INET6 diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c index 537d1fbc61..b3380fdba3 100644 --- a/stdlib/strtod_l.c +++ b/stdlib/strtod_l.c @@ -1,5 +1,5 @@ /* Convert string representing a number to float value, using given locale. - Copyright (C) 1997,1998,2002,2004,2005,2006,2007,2008,2009,2010 + Copyright (C) 1997,1998,2002,2004,2005,2006,2007,2008,2009,2010,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -185,7 +185,7 @@ round_and_return (mp_limb_t *retval, int exponent, int negative, if (shift > MANT_DIG) { - __set_errno (EDOM); + __set_errno (ERANGE); return 0.0; } |