X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstrtod.c;h=bf6955a7783fb28017e7eaae50aa697dc32c9230;hb=4a9738ec59c7849cb35ccab20bf6c3737f4e10b1;hp=cd61add1608e4abc50a33597f8b63c5318ae1bbb;hpb=04da1cb11cf8285b944492aaa636dbd596ed5e74;p=gnulib.git diff --git a/lib/strtod.c b/lib/strtod.c index cd61add16..bf6955a77 100644 --- a/lib/strtod.c +++ b/lib/strtod.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2010 Free Software +/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -303,6 +303,7 @@ strtod (const char *nptr, char **endptr) && c_tolower (s[4]) == 'y') s += 5; num = HUGE_VAL; + errno = saved_errno; } else if (c_tolower (*s) == 'n' && c_tolower (s[1]) == 'a' @@ -325,6 +326,7 @@ strtod (const char *nptr, char **endptr) to interpreting n-char-sequence as a hexadecimal number. */ if (s != end) num = NAN; + errno = saved_errno; } else {