]> git.saurik.com Git - wxWidgets.git/commitdiff
Introduced wxSOCKET_INT to socket.cpp. The previous code wouldn't compile on Windows.
authorJulian Smart <julian@anthemion.co.uk>
Wed, 30 Dec 1998 17:55:38 +0000 (17:55 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 30 Dec 1998 17:55:38 +0000 (17:55 +0000)
Someone please determine what wxSOCKET_INT should be on your platform
(I'm pretty sure just 'int' was OK on Linux when I tested it)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/socket.cpp

index 4bb7518282b328e836b3db3d4dc87b10d0c2147b..bc6a0c70df6a393b6f9387402b07874b0cf762e6 100644 (file)
@@ -468,13 +468,22 @@ void wxSocketBase::Discard()
 #undef MAX_BUFSIZE
 }
 
+// If what? Who seems to need unsigned int?
+// BTW uint isn't even defined on wxMSW for VC++ for some reason. Even if it
+// were, getpeername/getsockname don't take unsigned int*, they take int*.
+#if 0
+#define wxSOCKET_INT unsigned int
+#else
+#define wxSOCKET_INT int
+#endif
+
 // --------------------------------------------------------------
 // --------- wxSocketBase socket info functions -----------------
 // --------------------------------------------------------------
 bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const
 {
   struct sockaddr my_addr;
-  uint len_addr = sizeof(my_addr);
+  wxSOCKET_INT len_addr = sizeof(my_addr);
 
   if (m_fd < 0)
     return FALSE;
@@ -489,7 +498,7 @@ bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const
 bool wxSocketBase::GetLocal(wxSockAddress& addr_man) const
 {
   struct sockaddr my_addr;
-  uint len_addr = sizeof(my_addr);
+  wxSOCKET_INT len_addr = sizeof(my_addr);
 
   if (m_fd < 0)
     return FALSE;