3 #include "libmemcached-1.0/platform.h"
5 #if defined __cplusplus
11 #if defined HAVE_ARPA_INET_H
12 # include <arpa/inet.h>
15 #if defined HAVE_SYS_SOCKET_H
16 # include <sys/socket.h>
19 #if defined HAVE_SYS_UN_H
23 #if defined HAVE_UNISTD_H
27 #if defined __cplusplus
32 int get_socket_errno();
33 # define SHUT_WR SD_SEND
34 # define SHUT_RD SD_RECEIVE
35 # define SHUT_RDWR SD_BOTH
37 # define closesocket close
38 # define get_socket_errno() errno
39 # define INVALID_SOCKET (-1)
40 # define SOCKET_ERROR (-1)
43 #if defined __cplusplus
47 #if !defined SOCK_CLOEXEC
48 # define SOCK_CLOEXEC 0
51 #if !defined SOCK_NONBLOCK
52 # define SOCK_NONBLOCK 0
55 #if !defined FD_CLOEXEC
59 #if !defined SO_NOSIGPIPE
60 # define SO_NOSIGPIPE 0
63 #if !defined TCP_NODELAY
64 # define TCP_NODELAY 0
67 #if !defined TCP_KEEPIDLE
68 # define TCP_KEEPIDLE 0
71 #if !defined EAI_SYSTEM
72 # define EAI_SYSTEM (-1)
75 #if !defined HAVE_MSG_NOSIGNAL
76 # define MSG_NOSIGNAL 0
79 #if !defined HAVE_MSG_MORE