* Mingqiang Zhuang <mingqiangzhuang@hengtiansoft.com>
*
*/
+#include "config.h"
+
#include <stdlib.h>
#include <getopt.h>
#include <limits.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
#include "ms_sigsegv.h"
#include "ms_setting.h"
#include <fcntl.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
#include "ms_setting.h"
#include "ms_thread.h"
#include "ms_atomic.h"
#include <unistd.h>
#include <stdint.h>
#include <pthread.h>
-#include <stdbool.h>
+#if !defined(__cplusplus)
+# include <stdbool.h>
+#endif
#include <math.h>
#include "ms_stats.h"
#include "config.h"
#include <inttypes.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
#include "ms_thread.h"
#include "ms_setting.h"
#include <sys/types.h>
#include <stdint.h>
-#include <stdbool.h>
+#if !defined(__cplusplus)
+# include <stdbool.h>
+#endif
#include <time.h>
#ifdef __cplusplus
#include "config.h"
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
#include "ms_thread.h"
#include "ms_setting.h"
#include "ms_atomic.h"
AC_SEARCH_LIBS(getopt_long, gnugetopt)
AC_SEARCH_LIBS(gethostbyname, nsl)
-AC_CHECK_FUNCS_ONCE([getline])
+AC_CHECK_FUNCS([getline])
PANDORA_HAVE_LIBEVENT
PANDORA_REQUIRE_PTHREAD
PANDORA_PRINT_CALLSTACK
AC_CHECK_HEADERS([atomic.h])
-AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],
+AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[
AC_CHECK_FUNCS(atomic_add_64)
AC_CHECK_FUNCS(atomic_add_32)
- AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"],
+ AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"],[
AC_DEFINE([USE_ATOMIC_H],
[1],
- [Define to true if you want to use functions from atomic.h])))
+ [Define to true if you want to use functions from atomic.h])])])
AC_CONFIG_FILES([
Makefile
* the COPYING file in the parent directory for full text.
*/
-#include <math.h>
#include "common.h"
+#include <math.h>
static uint32_t ketama_server_hash(const char *key, unsigned int key_length, int alignment)
{
#define LIBMEMCACHED_PROTOCOL_COMMON_H
#include "config.h"
-#include <stdbool.h>
+#if !defined(__cplusplus)
+# include <stdbool.h>
+#endif
#include <assert.h>
#include <netinet/in.h>
#define MEMCACHED_PROTOCOL_H
#include <sys/types.h>
-#include <stdbool.h>
+#if !defined(__cplusplus)
+# include <stdbool.h>
+#endif
#include <libmemcached/memcached/protocol_binary.h>
#include <libmemcached/visibility.h>
dnl with or without modifications, as long as this notice is preserved.
dnl Which version of the canonical setup we're using
-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.95])
+AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.96])
AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
AC_ARG_ENABLE([fat-binaries],
dnl alloca - but we need to know it anyway for check_stack_overrun.
PANDORA_STACK_DIRECTION
- AC_CHECK_LIBM
-
+ AC_CHECK_FUNC(floorf, [], [AC_CHECK_LIB(m, floorf)])
AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
#include <stdio.h>
#include <stdlib.h>
-#include <stdbool.h>
#include <stdint.h>
+#if !defined(__cplusplus)
+# include <stdbool.h>
+#endif
+
typedef struct world_st world_st;
typedef struct collection_st collection_st;
typedef struct test_st test_st;