From c837cf0bbdd09079d64188bf0028bb21df2faec7 Mon Sep 17 00:00:00 2001 From: joseph Date: Fri, 22 Jul 2011 13:43:39 +0000 Subject: Merge changes between 14282 and r14661 from /fsf/trunk. git-svn-id: svn://svn.eglibc.org/trunk@14662 7b3dc134-2b1b-0410-93df-9e9f96275f8d --- libc/stdlib/strtod_l.c | 4 ++-- libc/stdlib/tst-strtod.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'libc/stdlib') 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 , 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 } }; -- cgit v1.2.3