From: Brian Aker Date: Thu, 14 Jan 2010 05:18:46 +0000 (-0800) Subject: Merge Monty X-Git-Tag: 0.40~115 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c2aabfa4fef8c0069f693a5522c6c23a00ae9d83;hp=c218b967dc33cc25954bd376921268ed61b383f4;p=m6w6%2Flibmemcached Merge Monty --- diff --git a/clients/memslap.c b/clients/memslap.c index 804d8b7b..efda8aff 100644 --- a/clients/memslap.c +++ b/clients/memslap.c @@ -13,9 +13,22 @@ * Mingqiang Zhuang * */ +#include "config.h" + #include #include #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + #include "ms_sigsegv.h" #include "ms_setting.h" diff --git a/clients/ms_conn.c b/clients/ms_conn.c index c062dc29..ea52c169 100644 --- a/clients/ms_conn.c +++ b/clients/ms_conn.c @@ -19,6 +19,16 @@ #include #include #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include "ms_setting.h" #include "ms_thread.h" #include "ms_atomic.h" diff --git a/clients/ms_memslap.h b/clients/ms_memslap.h index 0b9cc29e..8777c5bb 100644 --- a/clients/ms_memslap.h +++ b/clients/ms_memslap.h @@ -19,7 +19,9 @@ #include #include #include -#include +#if !defined(__cplusplus) +# include +#endif #include #include "ms_stats.h" diff --git a/clients/ms_task.c b/clients/ms_task.c index bcd2757c..5fbd7d13 100644 --- a/clients/ms_task.c +++ b/clients/ms_task.c @@ -12,6 +12,16 @@ #include "config.h" #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include "ms_thread.h" #include "ms_setting.h" diff --git a/clients/ms_task.h b/clients/ms_task.h index 610f3bc5..c4917d11 100644 --- a/clients/ms_task.h +++ b/clients/ms_task.h @@ -13,7 +13,9 @@ #include #include -#include +#if !defined(__cplusplus) +# include +#endif #include #ifdef __cplusplus diff --git a/clients/ms_thread.c b/clients/ms_thread.c index 92d68871..048593d6 100644 --- a/clients/ms_thread.c +++ b/clients/ms_thread.c @@ -11,6 +11,16 @@ #include "config.h" +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include "ms_thread.h" #include "ms_setting.h" #include "ms_atomic.h" diff --git a/configure.ac b/configure.ac index 53a42349..c8054fe3 100644 --- a/configure.ac +++ b/configure.ac @@ -36,7 +36,7 @@ AC_SUBST(HASHKIT_LIBRARY_VERSION) 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 @@ -56,13 +56,13 @@ PANDORA_HAVE_LIBINNODB 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 diff --git a/libhashkit/ketama.c b/libhashkit/ketama.c index 502b1c74..83b47552 100644 --- a/libhashkit/ketama.c +++ b/libhashkit/ketama.c @@ -6,8 +6,8 @@ * the COPYING file in the parent directory for full text. */ -#include #include "common.h" +#include static uint32_t ketama_server_hash(const char *key, unsigned int key_length, int alignment) { diff --git a/libmemcached/protocol/common.h b/libmemcached/protocol/common.h index 48782a0c..1d29798c 100644 --- a/libmemcached/protocol/common.h +++ b/libmemcached/protocol/common.h @@ -3,7 +3,9 @@ #define LIBMEMCACHED_PROTOCOL_COMMON_H #include "config.h" -#include +#if !defined(__cplusplus) +# include +#endif #include #include diff --git a/libmemcached/protocol_handler.h b/libmemcached/protocol_handler.h index 3fb00c98..3e4531bb 100644 --- a/libmemcached/protocol_handler.h +++ b/libmemcached/protocol_handler.h @@ -15,7 +15,9 @@ #define MEMCACHED_PROTOCOL_H #include -#include +#if !defined(__cplusplus) +# include +#endif #include #include diff --git a/m4/pandora_canonical.m4 b/m4/pandora_canonical.m4 index 4740e1a4..576a81ca 100644 --- a/m4/pandora_canonical.m4 +++ b/m4/pandora_canonical.m4 @@ -4,7 +4,7 @@ dnl gives unlimited permission to copy and/or distribute it, 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], @@ -179,8 +179,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ 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)]) diff --git a/tests/test.h b/tests/test.h index fc10c8d5..cf190572 100644 --- a/tests/test.h +++ b/tests/test.h @@ -16,9 +16,12 @@ extern "C" { #include #include -#include #include +#if !defined(__cplusplus) +# include +#endif + typedef struct world_st world_st; typedef struct collection_st collection_st; typedef struct test_st test_st;