]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utils.cpp
(hopefully) workaround for a carbon bug not always setting the modifiers event record...
[wxWidgets.git] / src / msw / utils.cpp
index 24199aca274a573d5ceebc68b6b2b31c0b93fa0e..d9fcbb003362932d1630571c460d22d9a7329d53 100644 (file)
 
 #include "wx/msw/private.h"     // includes <windows.h>
 
+#ifdef __GNUWIN32_OLD__
+    // apparently we need to include winsock.h to get WSADATA and other stuff
+    // used in wxGetFullHostName() with the old mingw32 versions
+    #include <winsock.h>
+#endif
+
 #include "wx/timer.h"
 
 #if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
@@ -188,7 +194,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
                 if ( pHostEnt )
                 {
                     // Windows will use DNS internally now
-                    pHostEnt = gethostbyaddr(pHostEnt->h_addr, 4, PF_INET);
+                    pHostEnt = gethostbyaddr(pHostEnt->h_addr, 4, AF_INET);
                 }
 
                 if ( pHostEnt )
@@ -941,6 +947,15 @@ long wxGetFreeMemory()
 #endif
 }
 
+unsigned long wxGetProcessId()
+{
+#ifdef __WIN32__
+    return ::GetCurrentProcessId();
+#else
+    return 0;
+#endif
+}
+
 // Emit a beeeeeep
 void wxBell()
 {