X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/267e11c550afd6c2c08fd118396da20a0c55674a..f8c10795d589c024dc7fc3640087a48a1ec612ce:/src/msw/utils.cpp?ds=sidebyside diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index c8a199dc45..d8cedf876e 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -40,6 +40,12 @@ #include "wx/msw/private.h" // includes #include "wx/msw/missing.h" // CHARSET_HANGUL +#if defined(__CYGWIN__) + //CYGWIN gives annoying warning about runtime stuff if we don't do this +# define USE_SYS_TYPES_FD_SET +# include +#endif + // Doesn't work with Cygwin at present #if wxUSE_SOCKETS && (defined(__GNUWIN32_OLD__) || defined(__WXWINCE__) || defined(__CYGWIN32__)) // apparently we need to include winsock.h to get WSADATA and other stuff @@ -390,7 +396,7 @@ const wxChar* wxGetHomeDir(wxString *pstr) strDir = windowsPath; #endif #elif defined(__WXWINCE__) - // Nothing + strDir = wxT("\\"); #else strDir.clear(); @@ -1039,9 +1045,9 @@ wxMemorySize wxGetFreeMemory() { #if defined(__WIN64__) MEMORYSTATUSEX memStatex; - statex.dwLength = sizeof (statex); - ::GlobalMemoryStatusEx (&statex); - return (wxMemorySize)memStatus.ullAvailPhys; + memStatex.dwLength = sizeof (memStatex); + ::GlobalMemoryStatusEx (&memStatex); + return (wxMemorySize)memStatex.ullAvailPhys; #else /* if defined(__WIN32__) */ MEMORYSTATUS memStatus; memStatus.dwLength = sizeof(MEMORYSTATUS); @@ -1280,8 +1286,10 @@ extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding) case wxFONTENCODING_CP936: return GB2312_CHARSET; +#ifndef __WXWINCE__ case wxFONTENCODING_CP949: return HANGUL_CHARSET; +#endif case wxFONTENCODING_CP950: return CHINESEBIG5_CHARSET; @@ -1374,7 +1382,7 @@ extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding) case wxFONTENCODING_CP1255: ret = 1255; break; case wxFONTENCODING_CP1256: ret = 1256; break; case wxFONTENCODING_CP1257: ret = 1257; break; - case wxFONTENCODING_EUC_JP: ret = 51932; break; + case wxFONTENCODING_EUC_JP: ret = 20932; break; case wxFONTENCODING_MACROMAN: ret = 10000; break; case wxFONTENCODING_MACJAPANESE: ret = 10001; break; case wxFONTENCODING_MACCHINESETRAD: ret = 10002; break;