summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2002-01-31 01:21:08 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2002-01-31 01:21:08 +0000
commit2a4e6407556e09db8a5043e56f8c9d91f863a687 (patch)
tree296aea5259a4649dfa94d06fb86c430c001e1e4e /libstdc++-v3
parent46ab74b1fd2e5334626d2d455a145f9c5096f0a0 (diff)
downloadgcc-2a4e6407556e09db8a5043e56f8c9d91f863a687.tar.gz
c_locale_gnu.cc: Same errno fixes as generic.
2002-01-30 Benjamin Kosnik <bkoz@redhat.com> * config/locale/c_locale_gnu.cc: Same errno fixes as generic. From-SVN: r49354
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/config/locale/c_locale_gnu.cc14
2 files changed, 11 insertions, 7 deletions
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 <bkoz@redhat.com>
+
+ * config/locale/c_locale_gnu.cc: Same errno fixes as generic.
+
2002-01-30 Loren Rittle <ljrittle@acm.org>
* 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;