Update all config.h usage.
[m6w6/libmemcached] / libmemcached / common.h
index 5c86eb16e01967360ccf3bef583e7a35cf66fb84..53e083a433cd45f6849d4479fb5301d1a3e12734 100644 (file)
 
 #pragma once
 
-#include <config.h>
+#include <mem_config.h>
 
 #ifdef __cplusplus
-#  include <cstdio>
-#  include <cstdlib>
-#  include <cstring>
-#  include <ctime>
-#  include <cctype>
-#  include <cerrno>
-#  include <climits>
+# include <cstddef>
+# include <cstdio>
+# include <cstdlib>
+# include <cstring>
+# include <ctime>
+# include <cctype>
+# include <cerrno>
+# include <climits>
 #else
-#  ifdef HAVE_STDLIB_H
-#   include <stdio.h>
-#  endif
-#  ifdef HAVE_STDLIB_H
-#    include <stdlib.h>
-#  endif
-#  include <string.h>
+# ifdef HAVE_STDDEF_H
+#  include <stddef.h>
+# endif
+# ifdef HAVE_STDLIB_H
+#  include <stdio.h>
+# endif
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+# include <string.h>
+# ifdef HAVE_TIME_H
 #  include <time.h>
-#  ifdef HAVE_ERRNO_H
-#    include <errno.h>
-#  endif
-#  ifdef HAVE_LIMITS_H
-#    include <limits.h>
-#  endif
+# endif
+# ifdef HAVE_ERRNO_H
+#  include <errno.h>
+# endif
+# ifdef HAVE_LIMITS_H
+#  include <limits.h>
+# endif
+#endif
+
+#ifdef HAVE_SYS_UN_H
+# include <sys/un.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
 #endif
 
 #ifdef HAVE_FCNTL_H
-#  include <fcntl.h>
+# include <fcntl.h>
 #endif
 
 #ifdef HAVE_SYS_TYPES_H
-#  include <sys/types.h>
+# include <sys/types.h>
 #endif
 
 #ifdef HAVE_UNISTD_H
-#  include <unistd.h>
+# include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
 #endif
 
 #ifdef HAVE_STRINGS_H
-#  include <strings.h>
+# include <strings.h>
 #endif
 
 #ifdef HAVE_DLFCN_H
-#  include <dlfcn.h>
+# include <dlfcn.h>
 #endif
 
 #include <libmemcached-1.0/memcached.h>
 # include "poll/poll.h"
 #endif
 
+#ifndef POLLHUP
+# define POLLHUP               0x0010
+#endif
+
+#ifndef POLLNVAL
+# define POLLNVAL      0x0020
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif