X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3fe737557344dcf31299aea827e4b87c998ec940..2d35020a8dd1a0908f4e76af323cc0d413d6b8c3:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index e3f2208e59..49a022525d 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" @@ -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 )