X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1cd04aa2e1c4ec7ff9425cb8114211c7885dcd22..0bafad0cf468cdd3b035ec8eb33e30a4e93eee42:/src/os2/gsocket.c diff --git a/src/os2/gsocket.c b/src/os2/gsocket.c index 911bf30bad..db5644dad7 100644 --- a/src/os2/gsocket.c +++ b/src/os2/gsocket.c @@ -7,7 +7,12 @@ */ #include "wx/setup.h" +#ifndef __EMX__ +/* I don't see, why this include is needed, but it seems to be necessary + sometimes. For EMX, including C++ headers into plain C source breaks + compilation, so don't do it there. */ #include "wx/defs.h" +#endif #if wxUSE_SOCKETS @@ -37,7 +42,9 @@ #include #include #include -#ifndef __EMX__ +#ifdef __EMX__ +#define soclose(a) close(a) +#else #define select(a,b,c,d,e) bsdselect(a,b,c,d,e) int _System bsdselect(int, struct fd_set *, @@ -1119,6 +1126,11 @@ GSocketError GAddress_INET_SetHostName(GAddress *address, const char *hostname) return GSOCK_NOERROR; } +GSocketError GAddress_INET_SetAnyAddress(GAddress *address) +{ + return GAddress_INET_SetHostAddress(address, INADDR_ANY); +} + GSocketError GAddress_INET_SetHostAddress(GAddress *address, unsigned long hostaddr) { @@ -1228,5 +1240,32 @@ unsigned short GAddress_INET_GetPort(GAddress *address) return ntohs(addr->sin_port); } +/* + * ------------------------------------------------------------------------- + * Unix address family + * ------------------------------------------------------------------------- + */ + +GSocketError _GAddress_Init_UNIX(GAddress *address) +{ + assert (address != NULL); + address->m_error = GSOCK_INVADDR; + return GSOCK_INVADDR; +} + +GSocketError GAddress_UNIX_SetPath(GAddress *address, const char *path) +{ + assert (address != NULL); + address->m_error = GSOCK_INVADDR; + return GSOCK_INVADDR; +} + +GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf) +{ + assert (address != NULL); + address->m_error = GSOCK_INVADDR; + return GSOCK_INVADDR; +} + #endif /* wxUSE_SOCKETS */