X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b412f9be504e07559a98ae234f30bb1bd0b2aa1f..a8a4906b88393ceedc51bb22320db70b1031ecfb:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 186a49a22c..6b1d1992a2 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -185,6 +185,10 @@ int PASCAL FAR __WSAFDIsSet(SOCKET fd, fd_set FAR *set) // Some patch ///// END ///////////////////////////////////////////////////////////////////////////// +#ifdef GetClassInfo +#undef GetClassInfo +#endif + // -------------------------------------------------------------- // Module // -------------------------------------------------------------- @@ -510,10 +514,18 @@ void wxSocketBase::Discard() // 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 +// +// Under glibc 2.0.7, socketbits.h declares socklen_t to be unsigned int +// and it uses *socklen_t as the 3rd parameter. Robert. + +// JACS - How can we detect this? +// Meanwhile, if your compiler complains about socklen_t, +// switch lines below. + +#if wxHAVE_GLIBC2 +# define wxSOCKET_INT socklen_t #else -#define wxSOCKET_INT int +# define wxSOCKET_INT int #endif // --------------------------------------------------------------