From: Benjamin Kosnik Date: Thu, 31 Jan 2002 01:21:08 +0000 (+0000) Subject: c_locale_gnu.cc: Same errno fixes as generic. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a4e6407556e09db8a5043e56f8c9d91f863a687;p=gcc.git c_locale_gnu.cc: Same errno fixes as generic. 2002-01-30 Benjamin Kosnik * config/locale/c_locale_gnu.cc: Same errno fixes as generic. From-SVN: r49354 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 56bca718d7b..f161b6d129a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2002-01-30 Benjamin Kosnik + + * config/locale/c_locale_gnu.cc: Same errno fixes as generic. + 2002-01-30 Loren Rittle * config/locale/c_locale_generic.cc: Check errno for ERANGE diff --git a/libstdc++-v3/config/locale/c_locale_gnu.cc b/libstdc++-v3/config/locale/c_locale_gnu.cc index 1129f872ca9..62290901141 100644 --- a/libstdc++-v3/config/locale/c_locale_gnu.cc +++ b/libstdc++-v3/config/locale/c_locale_gnu.cc @@ -49,7 +49,7 @@ namespace std char* __sanity; errno = 0; long __l = __strtol_l(__s, &__sanity, __base, __cloc); - if (__sanity != __s && *__sanity == '\0' && errno == 0) + if (__sanity != __s && *__sanity == '\0' && errno != ERANGE) __v = __l; else __err |= ios_base::failbit; @@ -67,7 +67,7 @@ namespace std char* __sanity; errno = 0; unsigned long __ul = __strtoul_l(__s, &__sanity, __base, __cloc); - if (__sanity != __s && *__sanity == '\0' && errno == 0) + if (__sanity != __s && *__sanity == '\0' && errno != ERANGE) __v = __ul; else __err |= ios_base::failbit; @@ -85,7 +85,7 @@ namespace std char* __sanity; errno = 0; long long __ll = __strtoll_l(__s, &__sanity, __base, __cloc); - if (__sanity != __s && *__sanity == '\0' && errno == 0) + if (__sanity != __s && *__sanity == '\0' && errno != ERANGE) __v = __ll; else __err |= ios_base::failbit; @@ -104,7 +104,7 @@ namespace std errno = 0; unsigned long long __ull = __strtoull_l(__s, &__sanity, __base, __cloc); - if (__sanity != __s && *__sanity == '\0' && errno == 0) + if (__sanity != __s && *__sanity == '\0' && errno != ERANGE) __v = __ull; else __err |= ios_base::failbit; @@ -122,7 +122,7 @@ namespace std char* __sanity; errno = 0; float __f = __strtof_l(__s, &__sanity, __cloc); - if (__sanity != __s && *__sanity == '\0' && errno == 0) + if (__sanity != __s && *__sanity == '\0' && errno != ERANGE) __v = __f; else __err |= ios_base::failbit; @@ -139,7 +139,7 @@ namespace std char* __sanity; errno = 0; double __d = __strtod_l(__s, &__sanity, __cloc); - if (__sanity != __s && *__sanity == '\0' && errno == 0) + if (__sanity != __s && *__sanity == '\0' && errno != ERANGE) __v = __d; else __err |= ios_base::failbit; @@ -156,7 +156,7 @@ namespace std char* __sanity; errno = 0; long double __ld = __strtold_l(__s, &__sanity, __cloc); - if (__sanity != __s && *__sanity == '\0' && errno == 0) + if (__sanity != __s && *__sanity == '\0' && errno != ERANGE) __v = __ld; else __err |= ios_base::failbit;