]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utils.cpp
include wx/thread.h in debug build which is needed after last change
[wxWidgets.git] / src / msw / utils.cpp
index 9ff3e343b772a2617a5ba116d8dc695820851e21..7ded6a5d18e0e93e42f00ebe5008b9ee5ab16c17 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #ifndef WX_PRECOMP
 #endif
 
 #ifndef WX_PRECOMP
+    #include "wx/msw/missing.h"     // CHARSET_HANGUL
     #include "wx/utils.h"
     #include "wx/app.h"
     #include "wx/intl.h"
     #include "wx/utils.h"
     #include "wx/app.h"
     #include "wx/intl.h"
@@ -41,7 +42,6 @@
 #include "wx/confbase.h"        // for wxExpandEnvVars()
 
 #include "wx/msw/private.h"     // includes <windows.h>
 #include "wx/confbase.h"        // for wxExpandEnvVars()
 
 #include "wx/msw/private.h"     // includes <windows.h>
-#include "wx/msw/missing.h"     // CHARSET_HANGUL
 
 #if defined(__CYGWIN__)
     //CYGWIN gives annoying warning about runtime stuff if we don't do this
 
 #if defined(__CYGWIN__)
     //CYGWIN gives annoying warning about runtime stuff if we don't do this
@@ -387,7 +387,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
     wxString& strDir = *pstr;
 
     // first branch is for Cygwin
     wxString& strDir = *pstr;
 
     // first branch is for Cygwin
-#if defined(__UNIX__)
+#if defined(__UNIX__) && !defined(__WINE__)
     const wxChar *szHome = wxGetenv("HOME");
     if ( szHome == NULL ) {
       // we're homeless...
     const wxChar *szHome = wxGetenv("HOME");
     if ( szHome == NULL ) {
       // we're homeless...
@@ -1171,13 +1171,13 @@ bool wxIsPlatform64Bit()
     typedef BOOL (WINAPI *IsWow64Process_t)(HANDLE, BOOL *);
 
     wxDynamicLibrary dllKernel32(_T("kernel32.dll"));
     typedef BOOL (WINAPI *IsWow64Process_t)(HANDLE, BOOL *);
 
     wxDynamicLibrary dllKernel32(_T("kernel32.dll"));
-    IsWow64Process_t *pfnIsWow64Process =
-        (IsWow64Process_t *)dllKernel32.RawGetSymbol(_T("IsWow64Process"));
+    IsWow64Process_t pfnIsWow64Process =
+        (IsWow64Process_t)dllKernel32.RawGetSymbol(_T("IsWow64Process"));
 
     BOOL wow64 = FALSE;
     if ( pfnIsWow64Process )
     {
 
     BOOL wow64 = FALSE;
     if ( pfnIsWow64Process )
     {
-        (*pfnIsWow64Process)(::GetCurrentProcess(), &wow64);
+        pfnIsWow64Process(::GetCurrentProcess(), &wow64);
     }
     //else: running under a system without Win64 support
 
     }
     //else: running under a system without Win64 support
 
@@ -1197,8 +1197,8 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin)
         if (verMin) *verMin = info.dwMinorVersion;
     }
 
         if (verMin) *verMin = info.dwMinorVersion;
     }
 
-#if defined(__WXHANDHELD__) || defined( __WXWINCE__ )
-    return wxOS_WINDOWS_WINCE;
+#if defined( __WXWINCE__ )
+    return wxOS_WINDOWS_CE;
 #elif defined( __WXMICROWIN__ )
     return wxOS_WINDOWS_MICRO;
 #else
 #elif defined( __WXMICROWIN__ )
     return wxOS_WINDOWS_MICRO;
 #else
@@ -1266,6 +1266,9 @@ wxWinVersion wxGetWinVersion()
             }
             break;
 
             }
             break;
 
+        default:
+            // Do nothing just to silence GCC warning
+            break;
     }
 
     return wxWinVersion_Unknown;
     }
 
     return wxWinVersion_Unknown;
@@ -1387,10 +1390,10 @@ extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding)
         case wxFONTENCODING_ISO8859_8:      ret = 28598; break;
         case wxFONTENCODING_ISO8859_9:      ret = 28599; break;
         case wxFONTENCODING_ISO8859_10:     ret = 28600; break;
         case wxFONTENCODING_ISO8859_8:      ret = 28598; break;
         case wxFONTENCODING_ISO8859_9:      ret = 28599; break;
         case wxFONTENCODING_ISO8859_10:     ret = 28600; break;
-        case wxFONTENCODING_ISO8859_11:     ret = 28601; break;
+        case wxFONTENCODING_ISO8859_11:     ret = 874; break;
         // case wxFONTENCODING_ISO8859_12,      // doesn't exist currently, but put it
         case wxFONTENCODING_ISO8859_13:     ret = 28603; break;
         // case wxFONTENCODING_ISO8859_12,      // doesn't exist currently, but put it
         case wxFONTENCODING_ISO8859_13:     ret = 28603; break;
-        case wxFONTENCODING_ISO8859_14:     ret = 28604; break;
+        // case wxFONTENCODING_ISO8859_14:     ret = 28604; break; // no correspondence on Windows
         case wxFONTENCODING_ISO8859_15:     ret = 28605; break;
         case wxFONTENCODING_KOI8:           ret = 20866; break;
         case wxFONTENCODING_KOI8_U:         ret = 21866; break;
         case wxFONTENCODING_ISO8859_15:     ret = 28605; break;
         case wxFONTENCODING_KOI8:           ret = 20866; break;
         case wxFONTENCODING_KOI8_U:         ret = 21866; break;