X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/032d55818246a3527281d1e6522564b691703d83..3216dbf5dccab8ed6dc0245b7e5c998738ef51d7:/src/unix/gsocket.c diff --git a/src/unix/gsocket.c b/src/unix/gsocket.c index 81d56e818f..0da32b61eb 100644 --- a/src/unix/gsocket.c +++ b/src/unix/gsocket.c @@ -25,7 +25,8 @@ #ifdef __VMS__ #include -struct sockaddr_un { +struct sockaddr_un +{ u_char sun_len; /* sockaddr len including null */ u_char sun_family; /* AF_UNIX */ char sun_path[108]; /* path name (gag) */ @@ -122,9 +123,9 @@ struct sockaddr_un { /* Global initialisers */ -bool GSocket_Init(void) +int GSocket_Init(void) { - return TRUE; + return 1; } void GSocket_Cleanup(void) @@ -350,7 +351,6 @@ GAddress *GSocket_GetPeer(GSocket *socket) */ GSocketError GSocket_SetServer(GSocket *sck) { - int type; int arg = 1; assert(sck != NULL); @@ -895,7 +895,7 @@ GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags) * Sets the socket to non-blocking mode. All IO calls will return * immediately. */ -void GSocket_SetNonBlocking(GSocket *socket, bool non_block) +void GSocket_SetNonBlocking(GSocket *socket, int non_block) { assert(socket != NULL); @@ -1499,7 +1499,9 @@ GSocketError GAddress_INET_SetPortName(GAddress *address, const char *port, se = getservbyname(port, protocol); if (!se) { - if (isdigit(port[0])) + /* the cast to int suppresses compiler warnings about subscript having the + type char */ + if (isdigit((int)port[0])) { int port_int;