3 #include "libmemcached-1.0/platform.h"
5 #if defined __cplusplus
13 #if defined HAVE_ARPA_INET_H
14 # include <arpa/inet.h>
17 #if defined HAVE_SYS_SOCKET_H
18 # include <sys/socket.h>
21 #if defined HAVE_NETINET_IN_H
22 # include <netinet/in.h>
25 #if defined HAVE_NETINET_TCP_H
26 # include <netinet/tcp.h>
29 #if defined HAVE_SYS_UN_H
33 #if defined HAVE_UNISTD_H
37 #if defined __cplusplus
42 int get_socket_errno();
43 # define SHUT_WR SD_SEND
44 # define SHUT_RD SD_RECEIVE
45 # define SHUT_RDWR SD_BOTH
47 # define closesocket close
48 # define get_socket_errno() errno
49 # define INVALID_SOCKET (-1)
50 # define SOCKET_ERROR (-1)
53 #if defined __cplusplus
57 #if !defined SOCK_CLOEXEC
58 # define SOCK_CLOEXEC 0
61 #if !defined SOCK_NONBLOCK
62 # define SOCK_NONBLOCK 0
65 #if !defined FD_CLOEXEC
69 #if !defined SO_NOSIGPIPE
70 # define SO_NOSIGPIPE 0
73 #if !defined TCP_NODELAY
74 # define TCP_NODELAY 0
77 #if !defined TCP_KEEPIDLE
78 # define TCP_KEEPIDLE 0
81 #if !defined EAI_SYSTEM
82 # define EAI_SYSTEM (-1)
85 #if !defined HAVE_MSG_NOSIGNAL
86 # define MSG_NOSIGNAL 0
89 #if !defined HAVE_MSG_MORE