git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4841
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#ifndef wxSetlocale
WXDLLEXPORT wxChar * wxSetlocale(int category, const wxChar *locale)
{
- setlocale(category, wxConvLibc.cWX2MB(locale));
- // FIXME
- return (wxChar *)NULL;
+#ifdef wxUSE_THREADS
+ wxASSERT_MSG( wxThread::IsMain(), _T("wxSetlocale() is not MT-safe") );
+#endif
+
+ static wxWCharBuffer s_wzLocale;
+
+ char *localeOld = setlocale(category, wxConvLibc.cWX2MB(locale));
+ s_wzLocale = wxConvLibc.cMB2WC(localeOld);
+
+ return s_wzLocale;
}
#endif