OSDN Git Service

2002-01-22 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / config / locale / messages_members_gnu.cc
index ef1a5a3..bd2252d 100644 (file)
@@ -1,6 +1,6 @@
 // std::messages implementation details, GNU version -*- C++ -*-
 
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002 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
@@ -49,8 +49,9 @@ namespace std
       uselocale(__old);
       return string(__msg);
 #else
-      setlocale(LC_ALL, _M_name_messages);
+      const char* __old = setlocale(LC_ALL, _M_name_messages);
       const char* __msg = gettext(__dfault.c_str());
+      setlocale(LC_ALL, __old);
       return string(__msg);
 #endif
     }