From: Julian Smart Date: Wed, 30 Dec 1998 17:55:38 +0000 (+0000) Subject: Introduced wxSOCKET_INT to socket.cpp. The previous code wouldn't compile on Windows. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/15ed45333df47c5acb17a32e7104a41a0fd1544d Introduced wxSOCKET_INT to socket.cpp. The previous code wouldn't compile on Windows. 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 --- diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 4bb7518282..bc6a0c70df 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -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;