]> git.saurik.com Git - wxWidgets.git/commitdiff
use int instead of SOCKET to avoid including winsock.h from wx/gsocket.h
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 23 Nov 2008 12:18:08 +0000 (12:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 23 Nov 2008 12:18:08 +0000 (12:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gsocket.h
src/msw/gsockmsw.cpp

index 4a36546b2c336778a953e8246434fe5f1c503ff7..5786aa65f0c8c390dc3b1c06435456e2f77e8e87 100644 (file)
@@ -173,11 +173,10 @@ public:
     virtual void Close() = 0;
     virtual void Shutdown();
 
-#ifdef __WINDOWS__
-    SOCKET m_fd;
-#else
+    // this is officially SOCKET (unsigned int) under Windows but we don't want
+    // to include winsock.h which defines SOCKET from here so just use int
+    // under all platforms
     int m_fd;
-#endif
 
     int m_initialRecvBufferSize;
     int m_initialSendBufferSize;
index 61ba71bdfe4cedae43b791691f923d6016603c49..3ca8b48349e4ae395c8d6f798741eca4b3bbdc03 100644 (file)
@@ -367,7 +367,7 @@ LRESULT CALLBACK _GSocket_Internal_WinProc(HWND hWnd,
      * destroyed) and for safety, check that the m_fd field
      * is what we expect it to be.
      */
-    if ((socket != NULL) && (socket->m_fd == wParam))
+    if ((socket != NULL) && ((WPARAM)socket->m_fd == wParam))
     {
       switch WSAGETSELECTEVENT(lParam)
       {