Fixed build on CentOS.
authorMonty Taylor <mordred@inaugust.com>
Thu, 14 Jan 2010 02:52:56 +0000 (18:52 -0800)
committerMonty Taylor <mordred@inaugust.com>
Thu, 14 Jan 2010 02:52:56 +0000 (18:52 -0800)
clients/memslap.c
clients/ms_conn.c
clients/ms_task.c
clients/ms_thread.c
configure.ac

index 47be3c37e63e4dfac8052c002c6e4b3e4d793d22..11b4df8735ffe0f50a49522552fbaf1f9c04efd1 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 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 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 f12894ea2322873df713327d45f998dcaa6132df..c8054fe357bfb99b11c2d00f023700cf58b9c235 100644 (file)
@@ -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