]> git.saurik.com Git - wxWidgets.git/commitdiff
Replaced SOCKLEN_T by WX_SOCKLEN_T to resolve conflict with AIX system headers.
authorStefan Neis <Stefan.Neis@t-online.de>
Wed, 31 Aug 2005 15:48:41 +0000 (15:48 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Wed, 31 Aug 2005 15:48:41 +0000 (15:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
setup.h.in
setup.h_vms
src/mac/carbon/gsocket.cpp
src/mac/classic/gsocket.c
src/msw/gsocket.cpp
src/unix/gsocket.cpp

index 78c15c53c542e4eb2f44525db4c97aae126bff98..f806d12f371f3dafe5d0ac3f1c0705103ad3d685 100755 (executable)
--- 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
 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
 _ACEOF
 
         fi
index cdf7d950c385acd1768d1ae90b01d91d87e66158..770fd5584dd73432addb9d05a3092e1a8714b274 100644 (file)
@@ -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
             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],
         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],
index 521f6c1df36ecfa0d9393719a702258b8774a2b0..667a2d06bb1f470a72d1dc63c31211be940ec0ba 100644 (file)
 #undef WX_TIMEZONE
 
 /* The type of 3rd argument to getsockname() - usually size_t or int */
 #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
 
 /* The type of 5th argument to getsockopt() - usually size_t or int */
 #undef SOCKOPTLEN_T
 /* Define if you have pthread_cancel */
 #undef HAVE_PTHREAD_CANCEL
 
 /* 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
 
 /* Define if you have sigaction() */
 #undef HAVE_SIGACTION
 
index cbcc769f299b384f3bc82d267f25ca3a598412d7..837102b97e0d5d4049d43938e4289231755b66a7 100644 (file)
 #undef WX_TIMEZONE
  
 /* The type of 3rd argument to getsockname() - usually size_t or int */
 #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
 
 /* The type of 5th argument to getsockopt() - usually size_t or int */
 #define SOCKOPTLEN_T size_t
index bf85902ca2d44ecdc07539c9f854e50ea7442a77..b4c3c5235ea41bdc6f7faa0393d0aa3ee36f98d0 100644 (file)
@@ -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,
   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);
       (listen(m_endpoint, 5) != 0))
   {
     close(m_endpoint);
@@ -572,7 +572,7 @@ GSocket *GSocket::WaitConnection()
 
 // TODO
 #if 0
 
 // 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 )
 #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,
   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;
   {
     close(m_endpoint);
     m_endpoint    = -1;
@@ -795,7 +795,7 @@ GSocketError GSocket::Connect(GSocketStream stream)
       {
 /*
         int error;
       {
 /*
         int error;
-        SOCKLEN_T len = sizeof(error);
+        WX_SOCKLEN_T len = sizeof(error);
 
         getsockopt(m_endpoint, SOL_SOCKET, SO_ERROR, (void*) &error, &len);
 
 
         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;
   int ret = -1;
 #if 0
   struct sockaddr from;
-  SOCKLEN_T fromlen = sizeof(from);
+  WX_SOCKLEN_T fromlen = sizeof(from);
   GSocketError err;
 
   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;
 
   if (ret == -1)
     return -1;
index fb4db40b06e984635878daffa5f40fa918e3b494..6b81b9a9a26decef1b92042425652486dc4d5383 100644 (file)
@@ -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,
   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);
       (listen(sck->m_endpoint, 5) != 0))
   {
     close(sck->m_endpoint);
@@ -583,7 +583,7 @@ GSocket *GSocket_WaitConnection(GSocket *socket)
 
 // TODO
 #if 0
 
 // 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 )
 #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,
   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;
   {
     close(sck->m_endpoint);
     sck->m_endpoint    = -1;
@@ -806,7 +806,7 @@ GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream)
       {
 /*
         int error;
       {
 /*
         int error;
-        SOCKLEN_T len = sizeof(error);
+        WX_SOCKLEN_T len = sizeof(error);
 
         getsockopt(sck->m_endpoint, SOL_SOCKET, SO_ERROR, (void*) &error, &len);
 
 
         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;
   int ret = -1;
 #if 0
   struct sockaddr from;
-  SOCKLEN_T fromlen = sizeof(from);
+  WX_SOCKLEN_T fromlen = sizeof(from);
   GSocketError err;
 
   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;
 
   if (ret == -1)
     return -1;
index 5992a1db63e0877daf0b78f6eba75d89b51d3eb7..1fcf0afa6d0a2f349c1830f9bf374e2cf0728682 100644 (file)
@@ -84,9 +84,9 @@
 #include <stddef.h>
 #include <ctype.h>
 
 #include <stddef.h>
 #include <ctype.h>
 
-/* 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
 #endif
 
 /* Table of GUI-related functions. We must call them indirectly because
@@ -299,7 +299,7 @@ GAddress *GSocket::GetLocal()
 {
   GAddress *address;
   struct sockaddr addr;
 {
   GAddress *address;
   struct sockaddr addr;
-  SOCKLEN_T size = sizeof(addr);
+  WX_SOCKLEN_T size = sizeof(addr);
   GSocketError err;
 
   assert(this);
   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,
   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();
       (listen(m_fd, 5) != 0))
   {
     Close();
@@ -438,7 +438,7 @@ GSocket *GSocket::WaitConnection()
 {
   GSocket *connection;
   struct sockaddr from;
 {
   GSocket *connection;
   struct sockaddr from;
-  SOCKLEN_T fromlen = sizeof(from);
+  WX_SOCKLEN_T fromlen = sizeof(from);
   GSocketError err;
   u_long arg = 1;
 
   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,
   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;
   {
     Close();
     m_error = GSOCK_IOERR;
@@ -867,7 +867,7 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags)
       if (m_establishing && !m_server)
       {
         int error;
       if (m_establishing && !m_server)
       {
         int error;
-        SOCKLEN_T len = sizeof(error);
+        WX_SOCKLEN_T len = sizeof(error);
 
         m_establishing = false;
 
 
         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;
 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;
 
   int ret;
   GSocketError err;
 
index 3ab997e9b79f6f0a2b605f1fa26edb5451260731..ab459eb018c6f7bc111dca21d7df46a4318a2954 100644 (file)
@@ -114,26 +114,26 @@ int _System soclose(int);
 #endif
 #include <signal.h>
 
 #endif
 #include <signal.h>
 
-#ifndef SOCKLEN_T
+#ifndef WX_SOCKLEN_T
 
 #ifdef VMS
 
 #ifdef VMS
-#  define SOCKLEN_T unsigned int
+#  define WX_SOCKLEN_T unsigned int
 #else
 #  ifdef __GLIBC__
 #    if __GLIBC__ == 2
 #else
 #  ifdef __GLIBC__
 #    if __GLIBC__ == 2
-#      define SOCKLEN_T socklen_t
+#      define WX_SOCKLEN_T socklen_t
 #    endif
 #  elif defined(__WXMAC__)
 #    endif
 #  elif defined(__WXMAC__)
-#    define SOCKLEN_T socklen_t
+#    define WX_SOCKLEN_T socklen_t
 #  else
 #  else
-#    define SOCKLEN_T int
+#    define WX_SOCKLEN_T int
 #  endif
 #endif
 
 #endif /* SOCKLEN_T */
 
 #ifndef SOCKOPTLEN_T
 #  endif
 #endif
 
 #endif /* SOCKLEN_T */
 
 #ifndef SOCKOPTLEN_T
-#define SOCKOPTLEN_T SOCKLEN_T
+#define SOCKOPTLEN_T WX_SOCKLEN_T
 #endif
 
 /*
 #endif
 
 /*
@@ -414,7 +414,7 @@ GAddress *GSocket::GetLocal()
 {
   GAddress *address;
   struct sockaddr addr;
 {
   GAddress *address;
   struct sockaddr addr;
-  SOCKLEN_T size = sizeof(addr);
+  WX_SOCKLEN_T size = sizeof(addr);
   GSocketError err;
 
   assert(this);
   GSocketError err;
 
   assert(this);
@@ -430,7 +430,7 @@ GAddress *GSocket::GetLocal()
     return NULL;
   }
 
     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;
   {
     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,
   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();
       (listen(m_fd, 5) != 0))
   {
     Close();
@@ -558,7 +558,7 @@ GSocketError GSocket::SetServer()
 GSocket *GSocket::WaitConnection()
 {
   struct sockaddr from;
 GSocket *GSocket::WaitConnection()
 {
   struct sockaddr from;
-  SOCKLEN_T fromlen = sizeof(from);
+  WX_SOCKLEN_T fromlen = sizeof(from);
   GSocket *connection;
   GSocketError err;
   int arg = 1;
   GSocket *connection;
   GSocketError err;
   int arg = 1;
@@ -589,7 +589,7 @@ GSocket *GSocket::WaitConnection()
     return NULL;
   }
 
     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);
 
   /* 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,
   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;
   {
     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;
 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;
 
   int ret;
   GSocketError err;
 
@@ -1339,7 +1339,7 @@ int GSocket::Recv_Dgram(char *buffer, int size)
 
   do
   {
 
   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)
   } while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
 
   if (ret == -1)