- Timestamp:
- 2014-09-27T14:54:35Z (10 years ago)
- Branches:
- master
- Children:
- ebe2c5e, f329dfc
- Parents:
- d348377
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sock.h
rd348377 re252d8c 2 2 #include <fcntl.h> 3 3 4 #ifndef _WIN325 4 #include <unistd.h> 6 5 #include <sys/socket.h> … … 12 11 #define sockerr_again() (errno == EINPROGRESS || errno == EINTR) 13 12 void closesocket( int fd ); 14 #else15 # include <winsock2.h>16 # include <ws2tcpip.h>17 # if !defined(BITLBEE_CORE) && defined(_MSC_VER)18 # pragma comment(lib,"bitlbee.lib")19 # endif20 # include <io.h>21 # define sock_make_nonblocking(fd) { int non_block = 1; ioctlsocket(fd, FIONBIO, &non_block); }22 # define sock_make_blocking(fd) { int non_block = 0; ioctlsocket(fd, FIONBIO, &non_block); }23 # define sockerr_again() (WSAGetLastError() == WSAEINTR || WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK)24 # define ETIMEDOUT WSAETIMEDOUT25 # define sleep(a) Sleep(a*1000)26 #endif
Note: See TracChangeset
for help on using the changeset viewer.