projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-202
[awesomized/libmemcached]
/
libmemcached
/
common.h
diff --git
a/libmemcached/common.h
b/libmemcached/common.h
index dad5bf21efb32ca145742cf09c20ef7bad3aaa7e..c7b84c94760d66ba97bb86cc833234abfc64e84e 100644
(file)
--- a/
libmemcached/common.h
+++ b/
libmemcached/common.h
@@
-42,44
+42,89
@@
#pragma once
#pragma once
-#include <config.h>
+#include <
mem_
config.h>
#ifdef __cplusplus
#ifdef __cplusplus
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <ctime>
-#include <cctype>
-#include <cerrno>
-#include <climits>
+# include <cstddef>
+# include <cstdio>
+# include <cstdlib>
+# include <cstring>
+# include <ctime>
+# include <cctype>
+# include <cerrno>
+# include <climits>
#else
#else
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-#include <limits.h>
+# ifdef HAVE_STDDEF_H
+# include <stddef.h>
+# endif
+# ifdef HAVE_STDLIB_H
+# include <stdio.h>
+# endif
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+# include <string.h>
+# ifdef HAVE_TIME_H
+# include <time.h>
+# endif
+# ifdef HAVE_ERRNO_H
+# include <errno.h>
+# endif
+# ifdef HAVE_LIMITS_H
+# include <limits.h>
+# endif
#endif
#endif
-#include <fcntl.h>
-#include <sys/types.h>
-#include <unistd.h>
+#ifdef HAVE_SYS_UN_H
+# include <sys/un.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
#ifdef HAVE_STRINGS_H
#ifdef HAVE_STRINGS_H
-#include <strings.h>
+# include <strings.h>
+#endif
+
+#ifdef HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
+
+#if defined(WIN32) || defined(__MINGW32__)
+# include "libmemcached/windows.hpp"
#endif
#include <libmemcached-1.0/memcached.h>
#include <libmemcached/watchpoint.h>
#include <libmemcached/is.h>
#endif
#include <libmemcached-1.0/memcached.h>
#include <libmemcached/watchpoint.h>
#include <libmemcached/is.h>
+typedef struct memcached_st Memcached;
-#include <libmemcached/instance.h>
+#ifdef __cplusplus
+# include "libmemcached/instance.hpp"
+#endif
#include <libmemcached/server_instance.h>
#ifdef HAVE_POLL_H
#include <libmemcached/server_instance.h>
#ifdef HAVE_POLL_H
-#include <poll.h>
+#
include <poll.h>
#else
#else
-#
include "poll
/poll.h"
+#
include "libmemcached
/poll.h"
#endif
#ifdef __cplusplus
#endif
#ifdef __cplusplus
@@
-117,6
+162,7
@@
memcached_return_t memcached_server_execute(memcached_st *ptr,
#include <libmemcached/quit.hpp>
#include <libmemcached/instance.hpp>
#include <libmemcached/server.hpp>
#include <libmemcached/quit.hpp>
#include <libmemcached/instance.hpp>
#include <libmemcached/server.hpp>
+#include <libmemcached/flag.hpp>
#include <libmemcached/behavior.hpp>
#include <libmemcached/sasl.hpp>
#include <libmemcached/server_list.hpp>
#include <libmemcached/behavior.hpp>
#include <libmemcached/sasl.hpp>
#include <libmemcached/server_list.hpp>
@@
-139,6
+185,7
@@
memcached_return_t memcached_server_execute(memcached_st *ptr,
#include <libmemcached/key.hpp>
#include <libmemcached/encoding_key.h>
#include <libmemcached/result.h>
#include <libmemcached/key.hpp>
#include <libmemcached/encoding_key.h>
#include <libmemcached/result.h>
+#include <libmemcached/version.hpp>
#endif
#include <libmemcached/continuum.hpp>
#endif
#include <libmemcached/continuum.hpp>
@@
-165,7
+212,14
@@
extern "C" {
memcached_return_t run_distribution(memcached_st *ptr);
memcached_return_t run_distribution(memcached_st *ptr);
-#define memcached_server_response_increment(A) (A)->cursor_active_++
+#ifdef __cplusplus
+static inline void memcached_server_response_increment(org::libmemcached::Instance* instance)
+{
+ instance->events(POLLIN);
+ instance->cursor_active_++;
+}
+#endif
+
#define memcached_server_response_decrement(A) (A)->cursor_active_--
#define memcached_server_response_reset(A) (A)->cursor_active_=0
#define memcached_server_response_decrement(A) (A)->cursor_active_--
#define memcached_server_response_reset(A) (A)->cursor_active_=0