#include "poll/poll.h"
#endif
-#include <assert.h>
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <ctype.h>
-#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <pthread.h>
#include <signal.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/types.h>
#include <unistd.h>
*
*/
-#include "config.h"
+#include <config.h>
+#include <cstdio>
+#include <cstring>
+#include <getopt.h>
#include <iostream>
-#include <stdio.h>
-#include <inttypes.h>
-#include <string.h>
#include <unistd.h>
-#include <getopt.h>
#include <libmemcached/memcached.h>
#include "utilities.h"
#include "config.h"
-#include <iostream>
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <unistd.h>
+#include <cerrno>
+#include <climits>
+#include <cstdio>
+#include <cstdlib>
+#include <cstdlib>
+#include <cstring>
+#include <fcntl.h>
#include <getopt.h>
-#include <sys/types.h>
+#include <iostream>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
#include <sys/stat.h>
#include <sys/types.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <strings.h>
-#include <string.h>
#include <sys/types.h>
-#include <stdlib.h>
-#include <limits.h>
+#include <sys/types.h>
+#include <unistd.h>
#include <libmemcached/memcached.h>
#include <config.h>
#include <cstdio>
+#include <cstring>
#include <iostream>
#include <libmemcached/memcached.h>
#include <sys/types.h>
#include <unistd.h>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
#include <libmemcached/memcached.h>
#include <libmemcached/watchpoint.h>
#include <libmemcached/is.h>
#pragma once
+#ifndef WIN32
+#include <netdb.h>
+#endif
+
enum memcached_server_state_t {
MEMCACHED_SERVER_STATE_NEW, // fd == -1, no address lookup has been done
MEMCACHED_SERVER_STATE_ADDRINFO, // ADDRRESS information has been gathered