Merge Monty
authorBrian Aker <brian@gaz>
Thu, 14 Jan 2010 05:18:46 +0000 (21:18 -0800)
committerBrian Aker <brian@gaz>
Thu, 14 Jan 2010 05:18:46 +0000 (21:18 -0800)
12 files changed:
clients/memslap.c
clients/ms_conn.c
clients/ms_memslap.h
clients/ms_task.c
clients/ms_task.h
clients/ms_thread.c
configure.ac
libhashkit/ketama.c
libmemcached/protocol/common.h
libmemcached/protocol_handler.h
m4/pandora_canonical.m4
tests/test.h

index 804d8b7b8981031954be4aaaaba2be2158e64252..efda8affae122722bb2f5aae61db84ad7d31488d 100644 (file)
  *      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"
index c062dc2958df424eb1e165e0e6cf6ce33396033f..ea52c169de8b31dbd3cbfb576188857523f523de 100644 (file)
 #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"
index 0b9cc29e2cea1d65a8ebd32e4ab845429c62a305..8777c5bb2466a14419a37b5e6be47699c926adb4 100644 (file)
@@ -19,7 +19,9 @@
 #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"
index bcd2757c0b0453d6a944b0d59344751a7aa35a5c..5fbd7d1302c9ffb0d1e7b41c838596e89bcf3091 100644 (file)
 #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"
index 610f3bc55cb5301f9d3522a476bbc577d478d862..c4917d11d7566162cebf4a5474af3ce9951da732 100644 (file)
@@ -13,7 +13,9 @@
 
 #include <sys/types.h>
 #include <stdint.h>
-#include <stdbool.h>
+#if !defined(__cplusplus)
+# include <stdbool.h>
+#endif
 #include <time.h>
 
 #ifdef __cplusplus
index 92d68871fd70c7d327957946023dd902ad39bffd..048593d6d0ad26ab3d640e567c069b64d5387625 100644 (file)
 
 #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"
index 53a4234954c9f363ced853fa0c4f9344529c46b6..c8054fe357bfb99b11c2d00f023700cf58b9c235 100644 (file)
@@ -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
index 502b1c74ed405325cf4cd3013e9d549cb59a3adf..83b47552a1a8853f88f4863e20a49630ae49e808 100644 (file)
@@ -6,8 +6,8 @@
  * 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)
 {
index 48782a0c735cf85bc00b9b059b8f5e6c4e2a9b44..1d29798c98d5c5b87a7b1861f3e094d2ab6ce43d 100644 (file)
@@ -3,7 +3,9 @@
 #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>
 
index 3fb00c98d96b4e655232501e9366b5c162bfbfe4..3e4531bb5307a418e76806e756f8516e399db874 100644 (file)
@@ -15,7 +15,9 @@
 #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>
index 4740e1a4954e320eddf1ca6c9279c3ea928ab957..576a81ca31abf9d1b9b64d6325bc1cf85a81c99e 100644 (file)
@@ -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)])
 
index fc10c8d5492a94bfd28f164e9d28bac39df3fc8c..cf19057250f347c755cb44c4acdd0b4d15a937b8 100644 (file)
@@ -16,9 +16,12 @@ extern "C" {
 
 #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;