OSDN Git Service

2003-10-22 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / bits / codecvt.h
index 1d123a9..80f9cba 100644 (file)
       codecvt_byname(const char* __s, size_t __refs = 0) 
       : codecvt<_InternT, _ExternT, _StateT>(__refs)
       { 
-       _S_destroy_c_locale(this->_M_c_locale_codecvt);
-       _S_create_c_locale(this->_M_c_locale_codecvt, __s); 
+       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+         {
+           _S_destroy_c_locale(this->_M_c_locale_codecvt);
+           _S_create_c_locale(this->_M_c_locale_codecvt, __s); 
+         }
       }
 
     protected: