aboutsummaryrefslogtreecommitdiffstats
path: root/sock.h
diff options
context:
space:
mode:
authorSven Moritz Hallberg <pesco@khjk.org>2009-03-12 20:10:06 +0100
committerSven Moritz Hallberg <pesco@khjk.org>2009-03-12 20:10:06 +0100
commit823de9d44f262ea2364ac8ec6a1e18e0f7dab658 (patch)
treebfe64e4fafbcd13aaef6a436cab6ad91619e2821 /sock.h
parent9b55485a6f9d72334b372e6fb6b60bbde943170d (diff)
commit updates by ashish shukla <wahjava@gmail.com>
Diffstat (limited to 'sock.h')
-rw-r--r--sock.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sock.h b/sock.h
index 848dc466..c3c0428e 100644
--- a/sock.h
+++ b/sock.h
@@ -15,11 +15,17 @@
#endif
#else
# include <winsock2.h>
-# include <ws2tcpip.h>
+# ifndef _MSC_VER
+# include <ws2tcpip.h>
+# endif
# 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)