Merge trunk.
[awesomized/libmemcached] / clients / memcapable.cc
index 9c9feb52d5d46ffa7356ed4a55b9490f17602bc9..1bb7a88a675abbc20cedacccc366331ff57d94d2 100644 (file)
 /* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
 #undef NDEBUG
 
-#include "config.h"
-#include <pthread.h>
-#include <sys/types.h>
+#include <config.h>
+
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include "poll/poll.h"
+#endif
+
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctype.h>
 #include <fcntl.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-#include <string.h>
 #include <inttypes.h>
-#include <stdbool.h>
+#include <pthread.h>
+#include <signal.h>
+#include <sys/types.h>
 #include <unistd.h>
-#include <ctype.h>
 
 #include <libmemcached/memcached.h>
 #include <libmemcached/memcached/protocol_binary.h>
 #include <libmemcached/byteorder.h>
-#include "utilities.h"
+#include <clients/utilities.h>
 
 #ifdef linux
 /* /usr/include/netinet/in.h defines macros from ntohs() to _bswap_nn to
@@ -655,7 +661,7 @@ static enum test_return test_binary_set_impl(const char* key, uint8_t cc)
   command cmd;
   response rsp;
 
-  uint64_t value= 0xdeadbeefdeadcafe;
+  uint64_t value= 0xdeadbeefdeadcafeULL;
   storage_command(&cmd, cc, key, strlen(key), &value, sizeof (value), 0, 0);
 
   /* set should always work */
@@ -725,7 +731,7 @@ static enum test_return test_binary_add_impl(const char* key, uint8_t cc)
 {
   command cmd;
   response rsp;
-  uint64_t value= 0xdeadbeefdeadcafe;
+  uint64_t value= 0xdeadbeefdeadcafeULL;
   storage_command(&cmd, cc, key, strlen(key), &value, sizeof (value), 0, 0);
 
   /* first add should work, rest of them should fail (even with cas
@@ -784,7 +790,7 @@ static enum test_return test_binary_replace_impl(const char* key, uint8_t cc)
 {
   command cmd;
   response rsp;
-  uint64_t value= 0xdeadbeefdeadcafe;
+  uint64_t value= 0xdeadbeefdeadcafeULL;
   storage_command(&cmd, cc, key, strlen(key), &value, sizeof (value), 0, 0);
 
   /* first replace should fail, successive should succeed (when the