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
This commit is contained in:
Julian Smart
1998-12-30 17:55:38 +00:00
parent a4388683f1
commit 15ed45333d

View File

@@ -468,13 +468,22 @@ void wxSocketBase::Discard()
#undef MAX_BUFSIZE #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 ----------------- // --------- wxSocketBase socket info functions -----------------
// -------------------------------------------------------------- // --------------------------------------------------------------
bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const
{ {
struct sockaddr my_addr; struct sockaddr my_addr;
uint len_addr = sizeof(my_addr); wxSOCKET_INT len_addr = sizeof(my_addr);
if (m_fd < 0) if (m_fd < 0)
return FALSE; return FALSE;
@@ -489,7 +498,7 @@ bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const
bool wxSocketBase::GetLocal(wxSockAddress& addr_man) const bool wxSocketBase::GetLocal(wxSockAddress& addr_man) const
{ {
struct sockaddr my_addr; struct sockaddr my_addr;
uint len_addr = sizeof(my_addr); wxSOCKET_INT len_addr = sizeof(my_addr);
if (m_fd < 0) if (m_fd < 0)
return FALSE; return FALSE;