diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-06-10 23:09:08 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-06-10 23:09:08 +0200 |
commit | 2e0f24d00b85c617400413bb2d179fd1028420c4 (patch) | |
tree | 95488f07f3a5e6a8558cbde11d2372d1c53ca246 /sock.h | |
parent | b6cd9e9fe0aa86e83fc4a43b3db2240839e2103a (diff) | |
parent | 6a72a574df321683ee51f7cef14255cbb4cdbeba (diff) |
Merge support for cross-compiling for Windows using the mingw32 compiler.
Diffstat (limited to 'sock.h')
-rw-r--r-- | sock.h | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -15,17 +15,11 @@ #endif #else # include <winsock2.h> -# ifndef _MSC_VER -# include <ws2tcpip.h> -# endif +# include <ws2tcpip.h> # if !defined(BITLBEE_CORE) && defined(_MSC_VER) # pragma comment(lib,"bitlbee.lib") # endif # include <io.h> -# define read(a,b,c) recv(a,b,c,0) -# define write(a,b,c) send(a,b,c,0) -# define umask _umask -# define mode_t int # define sock_make_nonblocking(fd) { int non_block = 1; ioctlsocket(fd, FIONBIO, &non_block); } # define sock_make_blocking(fd) { int non_block = 0; ioctlsocket(fd, FIONBIO, &non_block); } # define sockerr_again() (WSAGetLastError() == WSAEINTR || WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK) |