aboutsummaryrefslogtreecommitdiffstats
path: root/sock.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-06-10 23:09:08 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-06-10 23:09:08 +0200
commit2e0f24d00b85c617400413bb2d179fd1028420c4 (patch)
tree95488f07f3a5e6a8558cbde11d2372d1c53ca246 /sock.h
parentb6cd9e9fe0aa86e83fc4a43b3db2240839e2103a (diff)
parent6a72a574df321683ee51f7cef14255cbb4cdbeba (diff)
Merge support for cross-compiling for Windows using the mingw32 compiler.
Diffstat (limited to 'sock.h')
-rw-r--r--sock.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/sock.h b/sock.h
index c3c0428e..848dc466 100644
--- a/sock.h
+++ b/sock.h
@@ -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)