remove all remaining WIN32 code
[rofl0r-ixchat.git] / src / common / inet.h
blob650fea3b09b32c4e1a3b0dc1512d29944069a410
1 /* include stuff for internet */
3 #ifdef WANTSOCKET
4 #include <sys/types.h>
5 #include <sys/socket.h>
6 #endif
7 #ifdef WANTARPA
8 #include <netinet/in.h>
9 #include <arpa/inet.h>
10 #endif
11 #ifdef WANTDNS
12 #include <netdb.h>
13 #endif
14 #define closesocket close
15 #define set_blocking(sok) fcntl(sok, F_SETFL, 0)
16 #define set_nonblocking(sok) fcntl(sok, F_SETFL, O_NONBLOCK)
17 #define would_block() (errno == EAGAIN || errno == EWOULDBLOCK)
18 #define sock_error() (errno)