From: Stefan Neis Date: Wed, 31 Aug 2005 15:48:41 +0000 (+0000) Subject: Replaced SOCKLEN_T by WX_SOCKLEN_T to resolve conflict with AIX system headers. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9e03e02d0ca493bc65f083600f1427d2ac8028ff?ds=sidebyside Replaced SOCKLEN_T by WX_SOCKLEN_T to resolve conflict with AIX system headers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure b/configure index 78c15c53c5..f806d12f37 100755 --- a/configure +++ b/configure @@ -39073,7 +39073,7 @@ echo "${ECHO_T}$wx_cv_type_getsockname3" >&6 echo "$as_me: WARNING: Couldn't find socklen_t synonym for this system" >&2;} else cat >>confdefs.h <<_ACEOF -#define SOCKLEN_T $wx_cv_type_getsockname3 +#define WX_SOCKLEN_T $wx_cv_type_getsockname3 _ACEOF fi diff --git a/configure.in b/configure.in index cdf7d950c3..770fd5584d 100644 --- a/configure.in +++ b/configure.in @@ -5541,7 +5541,7 @@ if test "$wxUSE_SOCKETS" = "yes" ; then wxUSE_SOCKETS=no AC_MSG_WARN([Couldn't find socklen_t synonym for this system]) else - AC_DEFINE_UNQUOTED(SOCKLEN_T, $wx_cv_type_getsockname3) + AC_DEFINE_UNQUOTED(WX_SOCKLEN_T, $wx_cv_type_getsockname3) fi dnl Do this again for getsockopt as it may be different AC_CACHE_CHECK([what is the type of the fifth argument of getsockopt], diff --git a/setup.h.in b/setup.h.in index 521f6c1df3..667a2d06bb 100644 --- a/setup.h.in +++ b/setup.h.in @@ -691,7 +691,7 @@ #undef WX_TIMEZONE /* The type of 3rd argument to getsockname() - usually size_t or int */ -#undef SOCKLEN_T +#undef WX_SOCKLEN_T /* The type of 5th argument to getsockopt() - usually size_t or int */ #undef SOCKOPTLEN_T @@ -751,6 +751,9 @@ /* Define if you have pthread_cancel */ #undef HAVE_PTHREAD_CANCEL +/* Define if you have pthread_attr_setstacksize */ +#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE + /* Define if you have sigaction() */ #undef HAVE_SIGACTION diff --git a/setup.h_vms b/setup.h_vms index cbcc769f29..837102b97e 100644 --- a/setup.h_vms +++ b/setup.h_vms @@ -729,7 +729,7 @@ #undef WX_TIMEZONE /* The type of 3rd argument to getsockname() - usually size_t or int */ -#define SOCKLEN_T size_t +#define WX_SOCKLEN_T size_t /* The type of 5th argument to getsockopt() - usually size_t or int */ #define SOCKOPTLEN_T size_t diff --git a/src/mac/carbon/gsocket.cpp b/src/mac/carbon/gsocket.cpp index bf85902ca2..b4c3c5235e 100644 --- a/src/mac/carbon/gsocket.cpp +++ b/src/mac/carbon/gsocket.cpp @@ -513,7 +513,7 @@ GSocketError GSocket::SetServer() if ((bind(m_endpoint, m_local->m_addr, m_local->m_len) != 0) || (getsockname(m_endpoint, m_local->m_addr, - (SOCKLEN_T *) &m_local->m_len) != 0) || + (WX_SOCKLEN_T *) &m_local->m_len) != 0) || (listen(m_endpoint, 5) != 0)) { close(m_endpoint); @@ -572,7 +572,7 @@ GSocket *GSocket::WaitConnection() // TODO #if 0 - connection->m_endpoint = accept(m_endpoint, &from, (SOCKLEN_T *) &fromlen); + connection->m_endpoint = accept(m_endpoint, &from, (WX_SOCKLEN_T *) &fromlen); #endif if (connection->m_endpoint == kOTInvalidEndpointRef ) @@ -678,7 +678,7 @@ GSocketError GSocket::SetNonOriented() if ((bind(m_endpoint, m_local->m_addr, m_local->m_len) != 0) || (getsockname(m_endpoint, m_local->m_addr, - (SOCKLEN_T *) &m_local->m_len) != 0)) + (WX_SOCKLEN_T *) &m_local->m_len) != 0)) { close(m_endpoint); m_endpoint = -1; @@ -795,7 +795,7 @@ GSocketError GSocket::Connect(GSocketStream stream) { /* int error; - SOCKLEN_T len = sizeof(error); + WX_SOCKLEN_T len = sizeof(error); getsockopt(m_endpoint, SOL_SOCKET, SO_ERROR, (void*) &error, &len); @@ -1093,12 +1093,12 @@ int GSocket::Recv_Dgram(char *buffer, int size) int ret = -1; #if 0 struct sockaddr from; - SOCKLEN_T fromlen = sizeof(from); + WX_SOCKLEN_T fromlen = sizeof(from); GSocketError err; fromlen = sizeof(from); - ret = recvfrom(m_endpoint, buffer, size, 0, &from, (SOCKLEN_T *) &fromlen); + ret = recvfrom(m_endpoint, buffer, size, 0, &from, (WX_SOCKLEN_T *) &fromlen); if (ret == -1) return -1; diff --git a/src/mac/classic/gsocket.c b/src/mac/classic/gsocket.c index fb4db40b06..6b81b9a9a2 100644 --- a/src/mac/classic/gsocket.c +++ b/src/mac/classic/gsocket.c @@ -524,7 +524,7 @@ GSocketError GSocket_SetServer(GSocket *sck) if ((bind(sck->m_endpoint, sck->m_local->m_addr, sck->m_local->m_len) != 0) || (getsockname(sck->m_endpoint, sck->m_local->m_addr, - (SOCKLEN_T *) &sck->m_local->m_len) != 0) || + (WX_SOCKLEN_T *) &sck->m_local->m_len) != 0) || (listen(sck->m_endpoint, 5) != 0)) { close(sck->m_endpoint); @@ -583,7 +583,7 @@ GSocket *GSocket_WaitConnection(GSocket *socket) // TODO #if 0 - connection->m_endpoint = accept(socket->m_endpoint, &from, (SOCKLEN_T *) &fromlen); + connection->m_endpoint = accept(socket->m_endpoint, &from, (WX_SOCKLEN_T *) &fromlen); #endif if (connection->m_endpoint == kOTInvalidEndpointRef ) @@ -689,7 +689,7 @@ GSocketError GSocket_SetNonOriented(GSocket *sck) if ((bind(sck->m_endpoint, sck->m_local->m_addr, sck->m_local->m_len) != 0) || (getsockname(sck->m_endpoint, sck->m_local->m_addr, - (SOCKLEN_T *) &sck->m_local->m_len) != 0)) + (WX_SOCKLEN_T *) &sck->m_local->m_len) != 0)) { close(sck->m_endpoint); sck->m_endpoint = -1; @@ -806,7 +806,7 @@ GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream) { /* int error; - SOCKLEN_T len = sizeof(error); + WX_SOCKLEN_T len = sizeof(error); getsockopt(sck->m_endpoint, SOL_SOCKET, SO_ERROR, (void*) &error, &len); @@ -1104,12 +1104,12 @@ int _GSocket_Recv_Dgram(GSocket *socket, char *buffer, int size) int ret = -1; #if 0 struct sockaddr from; - SOCKLEN_T fromlen = sizeof(from); + WX_SOCKLEN_T fromlen = sizeof(from); GSocketError err; fromlen = sizeof(from); - ret = recvfrom(socket->m_endpoint, buffer, size, 0, &from, (SOCKLEN_T *) &fromlen); + ret = recvfrom(socket->m_endpoint, buffer, size, 0, &from, (WX_SOCKLEN_T *) &fromlen); if (ret == -1) return -1; diff --git a/src/msw/gsocket.cpp b/src/msw/gsocket.cpp index 5992a1db63..1fcf0afa6d 100644 --- a/src/msw/gsocket.cpp +++ b/src/msw/gsocket.cpp @@ -84,9 +84,9 @@ #include #include -/* if we use configure for MSW SOCKLEN_T will be already defined */ -#ifndef SOCKLEN_T -# define SOCKLEN_T int +/* if we use configure for MSW WX_SOCKLEN_T will be already defined */ +#ifndef WX_SOCKLEN_T +# define WX_SOCKLEN_T int #endif /* Table of GUI-related functions. We must call them indirectly because @@ -299,7 +299,7 @@ GAddress *GSocket::GetLocal() { GAddress *address; struct sockaddr addr; - SOCKLEN_T size = sizeof(addr); + WX_SOCKLEN_T size = sizeof(addr); GSocketError err; assert(this); @@ -411,7 +411,7 @@ GSocketError GSocket::SetServer() if ((bind(m_fd, m_local->m_addr, m_local->m_len) != 0) || (getsockname(m_fd, m_local->m_addr, - (SOCKLEN_T *)&m_local->m_len) != 0) || + (WX_SOCKLEN_T *)&m_local->m_len) != 0) || (listen(m_fd, 5) != 0)) { Close(); @@ -438,7 +438,7 @@ GSocket *GSocket::WaitConnection() { GSocket *connection; struct sockaddr from; - SOCKLEN_T fromlen = sizeof(from); + WX_SOCKLEN_T fromlen = sizeof(from); GSocketError err; u_long arg = 1; @@ -696,7 +696,7 @@ GSocketError GSocket::SetNonOriented() if ((bind(m_fd, m_local->m_addr, m_local->m_len) != 0) || (getsockname(m_fd, m_local->m_addr, - (SOCKLEN_T *)&m_local->m_len) != 0)) + (WX_SOCKLEN_T *)&m_local->m_len) != 0)) { Close(); m_error = GSOCK_IOERR; @@ -867,7 +867,7 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags) if (m_establishing && !m_server) { int error; - SOCKLEN_T len = sizeof(error); + WX_SOCKLEN_T len = sizeof(error); m_establishing = false; @@ -1114,7 +1114,7 @@ int GSocket::Recv_Stream(char *buffer, int size) int GSocket::Recv_Dgram(char *buffer, int size) { struct sockaddr from; - SOCKLEN_T fromlen = sizeof(from); + WX_SOCKLEN_T fromlen = sizeof(from); int ret; GSocketError err; diff --git a/src/unix/gsocket.cpp b/src/unix/gsocket.cpp index 3ab997e9b7..ab459eb018 100644 --- a/src/unix/gsocket.cpp +++ b/src/unix/gsocket.cpp @@ -114,26 +114,26 @@ int _System soclose(int); #endif #include -#ifndef SOCKLEN_T +#ifndef WX_SOCKLEN_T #ifdef VMS -# define SOCKLEN_T unsigned int +# define WX_SOCKLEN_T unsigned int #else # ifdef __GLIBC__ # if __GLIBC__ == 2 -# define SOCKLEN_T socklen_t +# define WX_SOCKLEN_T socklen_t # endif # elif defined(__WXMAC__) -# define SOCKLEN_T socklen_t +# define WX_SOCKLEN_T socklen_t # else -# define SOCKLEN_T int +# define WX_SOCKLEN_T int # endif #endif #endif /* SOCKLEN_T */ #ifndef SOCKOPTLEN_T -#define SOCKOPTLEN_T SOCKLEN_T +#define SOCKOPTLEN_T WX_SOCKLEN_T #endif /* @@ -414,7 +414,7 @@ GAddress *GSocket::GetLocal() { GAddress *address; struct sockaddr addr; - SOCKLEN_T size = sizeof(addr); + WX_SOCKLEN_T size = sizeof(addr); GSocketError err; assert(this); @@ -430,7 +430,7 @@ GAddress *GSocket::GetLocal() return NULL; } - if (getsockname(m_fd, &addr, (SOCKLEN_T *) &size) < 0) + if (getsockname(m_fd, &addr, (WX_SOCKLEN_T *) &size) < 0) { m_error = GSOCK_IOERR; return NULL; @@ -532,7 +532,7 @@ GSocketError GSocket::SetServer() if ((bind(m_fd, m_local->m_addr, m_local->m_len) != 0) || (getsockname(m_fd, m_local->m_addr, - (SOCKLEN_T *) &m_local->m_len) != 0) || + (WX_SOCKLEN_T *) &m_local->m_len) != 0) || (listen(m_fd, 5) != 0)) { Close(); @@ -558,7 +558,7 @@ GSocketError GSocket::SetServer() GSocket *GSocket::WaitConnection() { struct sockaddr from; - SOCKLEN_T fromlen = sizeof(from); + WX_SOCKLEN_T fromlen = sizeof(from); GSocket *connection; GSocketError err; int arg = 1; @@ -589,7 +589,7 @@ GSocket *GSocket::WaitConnection() return NULL; } - connection->m_fd = accept(m_fd, &from, (SOCKLEN_T *) &fromlen); + connection->m_fd = accept(m_fd, &from, (WX_SOCKLEN_T *) &fromlen); /* Reenable CONNECTION events */ Enable(GSOCK_CONNECTION); @@ -838,7 +838,7 @@ GSocketError GSocket::SetNonOriented() if ((bind(m_fd, m_local->m_addr, m_local->m_len) != 0) || (getsockname(m_fd, m_local->m_addr, - (SOCKLEN_T *) &m_local->m_len) != 0)) + (WX_SOCKLEN_T *) &m_local->m_len) != 0)) { Close(); m_error = GSOCK_IOERR; @@ -1331,7 +1331,7 @@ int GSocket::Recv_Stream(char *buffer, int size) int GSocket::Recv_Dgram(char *buffer, int size) { struct sockaddr from; - SOCKLEN_T fromlen = sizeof(from); + WX_SOCKLEN_T fromlen = sizeof(from); int ret; GSocketError err; @@ -1339,7 +1339,7 @@ int GSocket::Recv_Dgram(char *buffer, int size) do { - ret = recvfrom(m_fd, buffer, size, 0, &from, (SOCKLEN_T *) &fromlen); + ret = recvfrom(m_fd, buffer, size, 0, &from, (WX_SOCKLEN_T *) &fromlen); } while (ret == -1 && errno == EINTR); /* Loop until not interrupted */ if (ret == -1)