aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2004-01-25 23:31:43 +0000
committerAndreas Schwab <schwab@gcc.gnu.org>2004-01-25 23:31:43 +0000
commitf942e78de9710a8541e9e3b707e9e485004cf025 (patch)
treed0557484b41bc4bfc6203516f2025f0716bda9da
parentbbcd2439ba230342965bf28f7458673c07d69efe (diff)
downloadgcc-f942e78de9710a8541e9e3b707e9e485004cf025.zip
gcc-f942e78de9710a8541e9e3b707e9e485004cf025.tar.gz
gcc-f942e78de9710a8541e9e3b707e9e485004cf025.tar.bz2
monetary_members.cc: Restore locale before rethrowing exception.
* config/locale/gnu/monetary_members.cc: Restore locale before rethrowing exception. From-SVN: r76595
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/config/locale/gnu/monetary_members.cc14
2 files changed, 18 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 5a3ca42..31453b0 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-26 Andreas Schwab <schwab@suse.de>
+
+ * config/locale/gnu/monetary_members.cc: Restore locale before
+ rethrowing exception.
+
2004-01-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (_M_replace_aux, _M_replace_safe):
diff --git a/libstdc++-v3/config/locale/gnu/monetary_members.cc b/libstdc++-v3/config/locale/gnu/monetary_members.cc
index 580297b..a2aa0c5 100644
--- a/libstdc++-v3/config/locale/gnu/monetary_members.cc
+++ b/libstdc++-v3/config/locale/gnu/monetary_members.cc
@@ -1,6 +1,6 @@
// std::moneypunct implementation details, GNU version -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -419,6 +419,12 @@ namespace std
_M_data = 0;
delete __wcs_ps;
delete __wcs_ns;
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __uselocale(__old);
+#else
+ setlocale(LC_ALL, __old);
+ free(__old);
+#endif
__throw_exception_again;
}
@@ -543,6 +549,12 @@ namespace std
_M_data = 0;
delete __wcs_ps;
delete __wcs_ns;
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+ __uselocale(__old);
+#else
+ setlocale(LC_ALL, __old);
+ free(__old);
+#endif
__throw_exception_again;
}