summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-07-22 13:43:39 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-07-22 13:43:39 +0000
commitc837cf0bbdd09079d64188bf0028bb21df2faec7 (patch)
treed3ead9b4b8d60f25f78b12417b2ba02f14971704 /libc/stdlib
parenta63bdad03a9963d53373008e78fc29ee48f161af (diff)
Merge changes between 14282 and r14661 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@14662 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/strtod_l.c4
-rw-r--r--libc/stdlib/tst-strtod.c3
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 }
};