aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2002-03-23 01:55:34 +0000
committerBenjamin Kosnik <bkoz@redhat.com>2002-03-23 01:55:34 +0000
commit7bcf5fe4860d1f9bf3a16e7f9af6499f6782d147 (patch)
tree524335d4b246f07d0bf71d70dbae8d955501f5da /libstdc++-v3
parenta75ab4c768e15bf1ba62db0c5bf1012e96624635 (diff)
2002-03-22 Benjamin Kosnik <bkoz@redhat.com>
* config/locale/gnu/messages_members.h: Add __uselocale bits. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/time_members.cc: Same. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@51217 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/config/locale/gnu/messages_members.cc7
-rw-r--r--libstdc++-v3/config/locale/gnu/messages_members.h7
-rw-r--r--libstdc++-v3/config/locale/gnu/time_members.cc6
4 files changed, 14 insertions, 12 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index b910f5bb2e6..69c2e5337a7 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,4 +1,10 @@
2002-03-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * config/locale/gnu/messages_members.h: Add __uselocale bits.
+ * config/locale/gnu/messages_members.cc: Same.
+ * config/locale/gnu/time_members.cc: Same.
+
+2002-03-22 Benjamin Kosnik <bkoz@redhat.com>
* src/vterminate.cc: Format, -fno-exceptions cleanup.
diff --git a/libstdc++-v3/config/locale/gnu/messages_members.cc b/libstdc++-v3/config/locale/gnu/messages_members.cc
index bd2252d0537..326bee738f1 100644
--- a/libstdc++-v3/config/locale/gnu/messages_members.cc
+++ b/libstdc++-v3/config/locale/gnu/messages_members.cc
@@ -42,11 +42,10 @@ namespace std
string
messages<char>::do_get(catalog, int, int, const string& __dfault) const
{
-#if 0
- // Requires glibc 2.3
- __c_locale __old = uselocale(_M_c_locale_messages);
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ > 2
+ __c_locale __old = __uselocale(_M_c_locale_messages);
const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
- uselocale(__old);
+ __uselocale(__old);
return string(__msg);
#else
const char* __old = setlocale(LC_ALL, _M_name_messages);
diff --git a/libstdc++-v3/config/locale/gnu/messages_members.h b/libstdc++-v3/config/locale/gnu/messages_members.h
index 2dbc6eb4c5a..ef59fd5772b 100644
--- a/libstdc++-v3/config/locale/gnu/messages_members.h
+++ b/libstdc++-v3/config/locale/gnu/messages_members.h
@@ -59,11 +59,10 @@
messages<_CharT>::do_get(catalog, int, int,
const string_type& __dfault) const
{
-#if 0
- // Requires glibc 2.3
- __c_locale __old = uselocale(_M_c_locale_messages);
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ > 2
+ __c_locale __old = __uselocale(_M_c_locale_messages);
char* __msg = gettext(_M_convert_to_char(__dfault));
- uselocale(__old);
+ __uselocale(__old);
return _M_convert_from_char(__msg);
#else
const char* __old = setlocale(LC_ALL, _M_name_messages);
diff --git a/libstdc++-v3/config/locale/gnu/time_members.cc b/libstdc++-v3/config/locale/gnu/time_members.cc
index f00ec4a89c8..8f7665e14c7 100644
--- a/libstdc++-v3/config/locale/gnu/time_members.cc
+++ b/libstdc++-v3/config/locale/gnu/time_members.cc
@@ -44,8 +44,7 @@ namespace std
_M_put_helper(char* __s, size_t __maxlen, const char* __format,
const tm* __tm) const
{
-#if 0
- // Requires glibc 2.3
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ > 2
if (_M_c_locale_timepunct)
__strftime_l(__s, __maxlen, _M_c_locale_timepunct, __format, __tm);
else
@@ -189,8 +188,7 @@ namespace std
_M_put_helper(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
const tm* __tm) const
{
-#if 0
- // Requires glibc 2.3
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ > 2
if (_M_c_locale_timepunct)
__wcsftime_l(__s, __maxlen, _M_c_locale_timepunct, __format, __tm);
else