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_NETINET_IN_H
20 # include <netinet/in.h>
23 #if defined HAVE_SYS_UN_H
27 #if defined HAVE_UNISTD_H
31 #if defined __cplusplus
36 int get_socket_errno();
37 # define SHUT_WR SD_SEND
38 # define SHUT_RD SD_RECEIVE
39 # define SHUT_RDWR SD_BOTH
41 # define closesocket close
42 # define get_socket_errno() errno
43 # define INVALID_SOCKET (-1)
44 # define SOCKET_ERROR (-1)
47 #if defined __cplusplus
51 #if !defined SOCK_CLOEXEC
52 # define SOCK_CLOEXEC 0
55 #if !defined SOCK_NONBLOCK
56 # define SOCK_NONBLOCK 0
59 #if !defined FD_CLOEXEC
63 #if !defined SO_NOSIGPIPE
64 # define SO_NOSIGPIPE 0
67 #if !defined TCP_NODELAY
68 # define TCP_NODELAY 0
71 #if !defined TCP_KEEPIDLE
72 # define TCP_KEEPIDLE 0
75 #if !defined EAI_SYSTEM
76 # define EAI_SYSTEM (-1)
79 #if !defined HAVE_MSG_NOSIGNAL
80 # define MSG_NOSIGNAL 0
83 #if !defined HAVE_MSG_MORE