diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-17 02:25:58 +0100 | 
|---|---|---|
| committer | Jelmer Vernooij <jelmer@samba.org> | 2005-12-17 02:25:58 +0100 | 
| commit | 643dfc4be2e84dc4acb1a446867705e150480210 (patch) | |
| tree | 90fe517fcac9490972f64b8cd99ec2f658c71359 /sock.h | |
| parent | 4146a07de5f44f3ea00a3ef0026098b28e7451de (diff) | |
| parent | 32c632fb46e58043a2d437c44cad783a59b7aea9 (diff) | |
Merge integration
Diffstat (limited to 'sock.h')
| -rw-r--r-- | sock.h | 2 | 
1 files changed, 2 insertions, 0 deletions
| @@ -5,6 +5,7 @@  #include <arpa/inet.h>  #include <netdb.h>  #define sock_make_nonblocking(fd) fcntl(fd, F_SETFL, O_NONBLOCK) +#define sock_make_blocking(fd) fcntl(fd, F_SETFL, 0)  #define sockerr_again() (errno == EINPROGRESS || errno == EINTR)  #define closesocket(a) close(a)  #else @@ -16,6 +17,7 @@  # define read(a,b,c) recv(a,b,c,0)  # define write(a,b,c) send(a,b,c,0)  # 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)  # define ETIMEDOUT WSAETIMEDOUT  # define sleep(a) Sleep(a*1000) | 
