X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8b7a986a6e8257dbcf2c04183ec2924e7906fd4..04633c190f5a6eafe607a5712647aaa131522b1f:/src/msw/gsocket.c diff --git a/src/msw/gsocket.c b/src/msw/gsocket.c index 9eb8d69513..86cfc7b913 100644 --- a/src/msw/gsocket.c +++ b/src/msw/gsocket.c @@ -25,6 +25,15 @@ * warning: unreferenced formal parameter. */ # pragma warning(disable:4100) + +#ifdef __WXWINCE__ + /* + "unreferenced inline function has been removed": this is not + suppressed by push above as it is given at the end of the + compilation unit + */ +# pragma warning(disable:4514) +#endif /* __WXWINCE__ */ #endif /* _MSC_VER */ #include @@ -771,7 +780,7 @@ GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags) FD_ZERO(&writefds); FD_ZERO(&exceptfds); FD_SET(socket->m_fd, &readfds); - if (flags & GSOCK_OUTPUT_FLAG) + if (flags & GSOCK_OUTPUT_FLAG || flags & GSOCK_CONNECTION_FLAG) FD_SET(socket->m_fd, &writefds); FD_SET(socket->m_fd, &exceptfds); @@ -1352,7 +1361,7 @@ GSocketError GAddress_INET_SetHostAddress(GAddress *address, CHECK_ADDRESS(address, INET); addr = &(((struct sockaddr_in *)address->m_addr)->sin_addr); - addr->s_addr = hostaddr; + addr->s_addr = htonl(hostaddr);; return GSOCK_NOERROR; } @@ -1441,7 +1450,7 @@ unsigned long GAddress_INET_GetHostAddress(GAddress *address) addr = (struct sockaddr_in *)address->m_addr; - return addr->sin_addr.s_addr; + return ntohl(addr->sin_addr.s_addr); } unsigned short GAddress_INET_GetPort(GAddress *address)