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 # define P9Y_NEED_GET_SOCKET_ERRNO
43 int get_socket_errno();
44 # define SHUT_WR SD_SEND
45 # define SHUT_RD SD_RECEIVE
46 # define SHUT_RDWR SD_BOTH
48 # define closesocket close
49 # define get_socket_errno() errno
50 # define INVALID_SOCKET (-1)
51 # define SOCKET_ERROR (-1)
54 #if defined __cplusplus
58 #if !defined SOCK_CLOEXEC
59 # define SOCK_CLOEXEC 0
62 #if !defined SOCK_NONBLOCK
63 # define SOCK_NONBLOCK 0
66 #if !defined FD_CLOEXEC
70 #if !defined SO_NOSIGPIPE
71 # define SO_NOSIGPIPE 0
74 #if !defined TCP_NODELAY
75 # define TCP_NODELAY 0
78 #if !defined TCP_KEEPIDLE
79 # define TCP_KEEPIDLE 0
82 #if !defined EAI_SYSTEM
83 # define EAI_SYSTEM (-1)
86 #if !defined HAVE_MSG_NOSIGNAL
87 # define MSG_NOSIGNAL 0
90 #if !defined HAVE_MSG_MORE