X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3fe737557344dcf31299aea827e4b87c998ec940..73fe67bd60b57f95dc63809f7843ed2a15928436:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index e3f2208e59..6e9a036564 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -28,6 +28,12 @@ #pragma option -O1 #endif +#ifdef __EMX__ +// The following define is needed by Innotek's libc to +// make the definition of struct localeconv available. +#define __INTERNAL_DEFS +#endif + // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -1370,7 +1376,7 @@ wxLanguageInfoArray *wxLocale::ms_languagesDB = NULL; } -wxLocale::wxLocale() +void wxLocale::DoCommonInit() { m_pszOldLocale = NULL; m_pMsgCat = NULL; @@ -1418,9 +1424,11 @@ bool wxLocale::Init(const wxChar *szName, // TODO: how to find languageId // SetLocaleInfo(languageId, SORT_DEFAULT, localeName); #else - m_pszOldLocale = wxSetlocale(LC_ALL, szLocale); - if ( m_pszOldLocale ) - m_pszOldLocale = wxStrdup(m_pszOldLocale); + wxMB2WXbuf oldLocale = wxSetlocale(LC_ALL, szLocale); + if ( oldLocale ) + m_pszOldLocale = wxStrdup(oldLocale); + else + m_pszOldLocale = NULL; #endif if ( m_pszOldLocale == NULL )