X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aa929e784d62245d10ede230ceabaaf22c91122..72c71d39724af116d419295b684dd2946efb3da3:/src/os2/gsocket.c diff --git a/src/os2/gsocket.c b/src/os2/gsocket.c index 44ff3ad5ff..98ef0f6a04 100644 --- a/src/os2/gsocket.c +++ b/src/os2/gsocket.c @@ -30,14 +30,17 @@ #else #include #include +#include #include #include #include #endif #if defined(__VISAGECPP__) && __IBMCPP__ < 400 +#include #include #include #include +#include #else #include #include @@ -57,7 +60,12 @@ int _System soclose(int); #include #include -#include +#if defined(__VISAGECPP__) && __IBMCPP__ < 400 +# ifdef min +# undef min +# endif +# include +#endif #include #include @@ -80,19 +88,10 @@ int _System soclose(int); /* Global initialisers */ -#if !defined(__VISAGECPP__) - int GSocket_Init() { return 1; } -#else -bool GSocket_Init() -{ - return 1; -} - -#endif void GSocket_Cleanup() { @@ -1164,7 +1163,7 @@ GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port, port_int = atoi(port); addr = (struct sockaddr_in *)address->m_addr; - addr->sin_port = htons(port_int); +// addr->sin_port = htons(port_int); return GSOCK_NOERROR; } @@ -1186,7 +1185,7 @@ GSocketError GAddress_INET_SetPort(GAddress *address, unsigned short port) CHECK_ADDRESS(address, INET, GSOCK_INVADDR); addr = (struct sockaddr_in *)address->m_addr; - addr->sin_port = htons(port); +// addr->sin_port = htons(port); return GSOCK_NOERROR; } @@ -1234,7 +1233,7 @@ unsigned short GAddress_INET_GetPort(GAddress *address) CHECK_ADDRESS(address, INET, 0); addr = (struct sockaddr_in *)address->m_addr; - return ntohs(addr->sin_port); + return /*ntohs*/(addr->sin_port); } /*