git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35387
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
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
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],
#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 */
/* 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
#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
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);
- 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 )
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;
- 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);
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;
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);
- 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 )
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;
- 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);
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;
#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
{
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);
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();
{
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;
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;
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);
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;
#endif
#include <signal.h>
#endif
#include <signal.h>
-# 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
+# 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
{
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);
- 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;
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();
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;
- 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);
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;
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;
- 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)