diff options
Diffstat (limited to 'libc/stdlib')
-rw-r--r-- | libc/stdlib/strtod_l.c | 4 | ||||
-rw-r--r-- | libc/stdlib/tst-strtod.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libc/stdlib/strtod_l.c b/libc/stdlib/strtod_l.c index a38242ac0..f24758b70 100644 --- a/libc/stdlib/strtod_l.c +++ b/libc/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. @@ -186,7 +186,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; } diff --git a/libc/stdlib/tst-strtod.c b/libc/stdlib/tst-strtod.c index dab13d9e4..285f9c790 100644 --- a/libc/stdlib/tst-strtod.c +++ b/libc/stdlib/tst-strtod.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1996-2001,2003,2009 Free Software Foundation, Inc. +/* Copyright (C) 1991,1996-2001,2003,2009,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -73,6 +73,7 @@ static const struct ltest tests[] = { "+InFiNiTy", HUGE_VAL, '\0', 0 }, #endif { "0x80000Ap-23", 0x80000Ap-23, '\0', 0 }, + { "1e-324", 0, '\0', ERANGE }, { NULL, 0, '\0', 0 } }; |