summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Makefile.am15
-rw-r--r--docs/libmemcached.rst4
-rw-r--r--example/interface_v0.c2
-rw-r--r--example/interface_v1.c2
-rw-r--r--example/memcached_light.c2
-rw-r--r--libhashkit-1.0/hashkit.hpp2
-rw-r--r--libhashkit-1.0/include.am3
-rw-r--r--libhashkit/common.h2
-rw-r--r--libhashkit/include.am9
-rw-r--r--libmemcached-1.0/include.am2
-rw-r--r--libmemcached-1.0/storage.h2
-rw-r--r--libmemcached/common.h1
-rw-r--r--libmemcached/include.am10
-rw-r--r--libmemcached/memcached.hpp (renamed from libmemcached/memcached_util.h)3
-rw-r--r--libmemcached/virtual_bucket.c5
-rw-r--r--libmemcachedprotocol-0.0/binary.h (renamed from libmemcachedprotocol-0.0/protocol_binary.h)0
-rw-r--r--libmemcachedprotocol-0.0/handler.h (renamed from libmemcachedprotocol-0.0/protocol_handler.h)2
-rw-r--r--libmemcachedprotocol-0.0/include.am4
-rw-r--r--libmemcachedprotocol-0.0/vbucket.h41
-rw-r--r--libmemcachedprotocol/ascii_handler.c (renamed from libmemcached/protocol/ascii_handler.c)3
-rw-r--r--libmemcachedprotocol/ascii_handler.h (renamed from libmemcached/protocol/ascii_handler.h)0
-rw-r--r--libmemcachedprotocol/binary_handler.c (renamed from libmemcached/protocol/binary_handler.c)3
-rw-r--r--libmemcachedprotocol/binary_handler.h (renamed from libmemcached/protocol/binary_handler.h)0
-rw-r--r--libmemcachedprotocol/cache.c (renamed from libmemcached/protocol/cache.c)2
-rw-r--r--libmemcachedprotocol/cache.h (renamed from libmemcached/protocol/cache.h)0
-rw-r--r--libmemcachedprotocol/common.h (renamed from libmemcached/protocol/common.h)5
-rw-r--r--libmemcachedprotocol/handler.c (renamed from libmemcached/protocol/protocol_handler.c)2
-rw-r--r--libmemcachedprotocol/include.am (renamed from libmemcached/protocol/include.am)17
-rw-r--r--libmemcachedprotocol/pedantic.c (renamed from libmemcached/protocol/pedantic.c)3
-rw-r--r--libmemcachedutil-1.0/include.am1
-rw-r--r--libmemcachedutil-1.0/pid.h6
-rw-r--r--libmemcachedutil-1.0/pool.h2
-rw-r--r--libmemcachedutil-1.0/util.h2
-rw-r--r--libmemcachedutil/common.h45
-rw-r--r--libmemcachedutil/flush.cc (renamed from libmemcached/util/flush.cc)3
-rw-r--r--libmemcachedutil/include.am (renamed from libmemcached/util/include.am)13
-rw-r--r--libmemcachedutil/pid.cc (renamed from libmemcached/util/pid.cc)3
-rw-r--r--libmemcachedutil/ping.cc (renamed from libmemcached/util/ping.cc)3
-rw-r--r--libmemcachedutil/pool.cc (renamed from libmemcached/util/pool.cc)5
-rw-r--r--libmemcachedutil/version.cc (renamed from libmemcached/util/version.cc)6
-rw-r--r--support/libmemcached.spec.in124
-rw-r--r--tests/hashkit_functions.cc2
-rw-r--r--tests/mem_functions.cc6
-rw-r--r--win32/include.am2
45 files changed, 237 insertions, 135 deletions
diff --git a/ChangeLog b/ChangeLog
index e8bf8630..a073b4fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+
+* Dropped libmemcached/memcached_util.h (undocumented header file)
+
0.53 Mon Sep 26 20:50:33 PDT 2011
* Fix for FreeBSD/OpenBSD and -lm
* Added memcached_exist()
diff --git a/Makefile.am b/Makefile.am
index 8a95b8c2..d19991ec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,19 +28,22 @@ EXTRA_DIST= \
libmemcached_libmemcached_la_LDFLAGS=
+include libtest/include.am
+
+include libhashkit-1.0/include.am
+include libmemcached-1.0/include.am
+include libmemcachedprotocol-0.0/include.am
+include libmemcachedutil-1.0/include.am
+
include clients/include.am
include docs/include.am
include example/include.am
include libhashkit/include.am
-include libmemcached-1.0/include.am
-include libhashkit-1.0/include.am
-include libmemcachedprotocol-0.0/include.am
include libmemcached/include.am
-include libmemcached/util/include.am
-include libmemcached/protocol/include.am
+include libmemcachedutil/include.am
+include libmemcachedprotocol/include.am
include libmemcachedinternal/include.am
include libmemcachedinternal/util/include.am
-include libtest/include.am
include poll/include.am
include support/include.am
include tests/include.am
diff --git a/docs/libmemcached.rst b/docs/libmemcached.rst
index 80da8fe8..a97db699 100644
--- a/docs/libmemcached.rst
+++ b/docs/libmemcached.rst
@@ -12,7 +12,7 @@ Compile and link with -lmemcached
=======
-libMemcached is an open source C/C++ client library and tools for the memcached server (http://danga.com/memcached). It has been designed to be light on memory usage, thread safe, and provide full access to server side methods.
+libMemcached is an open source C/C++ client library and tools for the memcached server (http://memcached.org/). It has been designed to be light on memory usage, thread safe, and provide full access to server side methods.
libMemcached was designed to provide the greatest number of options to use Memcached. Some of the features provided:
@@ -31,7 +31,7 @@ DESCRIPTION
"Memcached is a high-performance, distributed memory object caching
system, generic in nature, but intended for use in speeding up dynamic web
-applications by alleviating database load." `http://danga.com/memcached/ <http://danga.com/memcached/>`_
+applications by alleviating database load." `http://memcached.org/ <http://memcached.org/>`_
:program:`libmemcached` is a small, thread-safe client library for the
memcached protocol. The code has all been written to allow
diff --git a/example/interface_v0.c b/example/interface_v0.c
index 37c8a79a..ef5ba47b 100644
--- a/example/interface_v0.c
+++ b/example/interface_v0.c
@@ -16,7 +16,7 @@
#include <stdlib.h>
#include <string.h>
-#include <libmemcachedprotocol-0.0//protocol_handler.h>
+#include <libmemcachedprotocol-0.0/handler.h>
#include <example/byteorder.h>
#include "example/storage.h"
#include "example/memcached_light.h"
diff --git a/example/interface_v1.c b/example/interface_v1.c
index 88cb59f6..d2b20712 100644
--- a/example/interface_v1.c
+++ b/example/interface_v1.c
@@ -18,7 +18,7 @@
#include <stdlib.h>
#include <string.h>
-#include <libmemcachedprotocol-0.0/protocol_handler.h>
+#include <libmemcachedprotocol-0.0/handler.h>
#include <example/byteorder.h>
#include "storage.h"
diff --git a/example/memcached_light.c b/example/memcached_light.c
index 6a650bba..ed892861 100644
--- a/example/memcached_light.c
+++ b/example/memcached_light.c
@@ -34,7 +34,7 @@
#include <string.h>
#include <event.h>
-#include <libmemcachedprotocol-0.0/protocol_handler.h>
+#include <libmemcachedprotocol-0.0/handler.h>
#include <example/byteorder.h>
#include "storage.h"
#include "memcached_light.h"
diff --git a/libhashkit-1.0/hashkit.hpp b/libhashkit-1.0/hashkit.hpp
index 7ead63d0..a865bf96 100644
--- a/libhashkit-1.0/hashkit.hpp
+++ b/libhashkit-1.0/hashkit.hpp
@@ -37,7 +37,7 @@
#pragma once
-#include <libhashkit/hashkit.h>
+#include <libhashkit-1.0/hashkit.h>
#include <string>
class Hashkit {
diff --git a/libhashkit-1.0/include.am b/libhashkit-1.0/include.am
index b9f7da0d..905e38fa 100644
--- a/libhashkit-1.0/include.am
+++ b/libhashkit-1.0/include.am
@@ -3,6 +3,9 @@
# All paths should be given relative to the root
#
+EXTRA_DIST+= \
+ libhashkit-1.0/configure.h.in
+
nobase_include_HEADERS+= \
libhashkit-1.0/algorithm.h \
libhashkit-1.0/behavior.h \
diff --git a/libhashkit/common.h b/libhashkit/common.h
index 4a239768..4dece00f 100644
--- a/libhashkit/common.h
+++ b/libhashkit/common.h
@@ -16,7 +16,7 @@
#include <stdlib.h>
#include <math.h>
-#include <libhashkit/hashkit.h>
+#include <libhashkit-1.0/hashkit.h>
#include <libhashkit/is.h>
#ifdef __cplusplus
diff --git a/libhashkit/include.am b/libhashkit/include.am
index 7798f79a..d9b769f6 100644
--- a/libhashkit/include.am
+++ b/libhashkit/include.am
@@ -11,12 +11,13 @@
lib_LTLIBRARIES+= libhashkit/libhashkit.la
-EXTRA_DIST+= \
- libhashkit/configure.h.in
+noinst_HEADERS+= \
+ libhashkit/common.h \
+ libhashkit/is.h
-noinst_HEADERS+= \
- libhashkit/common.h
+nobase_include_HEADERS+= \
+ libhashkit/hashkit.h
libhashkit_libhashkit_la_SOURCES= \
libhashkit/algorithm.cc \
diff --git a/libmemcached-1.0/include.am b/libmemcached-1.0/include.am
index edac5e71..e9658ad1 100644
--- a/libmemcached-1.0/include.am
+++ b/libmemcached-1.0/include.am
@@ -2,6 +2,8 @@
# included from Top Level Makefile.am
# All paths should be given relative to the root
+EXTRA_DIST+= \
+ libmemcached-1.0/configure.h.in
nobase_include_HEADERS+= \
libmemcached-1.0/allocators.h \
diff --git a/libmemcached-1.0/storage.h b/libmemcached-1.0/storage.h
index 0854f164..e634235a 100644
--- a/libmemcached-1.0/storage.h
+++ b/libmemcached-1.0/storage.h
@@ -37,8 +37,6 @@
#pragma once
-#include "libmemcached/memcached.h"
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/libmemcached/common.h b/libmemcached/common.h
index 6867490c..47735195 100644
--- a/libmemcached/common.h
+++ b/libmemcached/common.h
@@ -115,6 +115,7 @@ memcached_return_t memcached_server_execute(memcached_st *ptr,
#include <libmemcached/initialize_query.h>
#include <libmemcached/response.h>
#include <libmemcached/namespace.h>
+#include <libmemcached/virtual_bucket.h>
#ifdef __cplusplus
#include <libmemcached/backtrace.hpp>
diff --git a/libmemcached/include.am b/libmemcached/include.am
index 3097fdd0..03a327da 100644
--- a/libmemcached/include.am
+++ b/libmemcached/include.am
@@ -7,10 +7,14 @@ libmemcached_libmemcached_la_SOURCES =
include libmemcached/csl/include.am
EXTRA_DIST+= \
- libmemcached/configure.h.in \
libmemcached/libmemcached_probes.d \
libmemcached/memcached/README.txt
+nobase_include_HEADERS+= \
+ libmemcached/memcached.h \
+ libmemcached/memcached.hpp \
+ libmemcached/util.h
+
noinst_HEADERS+= \
libmemcached/array.h \
libmemcached/assert.hpp \
@@ -32,10 +36,6 @@ noinst_HEADERS+= \
libmemcached/memory.h \
libmemcached/namespace.h \
libmemcached/options.hpp \
- libmemcached/protocol/ascii_handler.h \
- libmemcached/protocol/binary_handler.h \
- libmemcached/protocol/cache.h \
- libmemcached/protocol/common.h \
libmemcached/response.h \
libmemcached/server.hpp \
libmemcached/server_instance.h \
diff --git a/libmemcached/memcached_util.h b/libmemcached/memcached.hpp
index 8e952beb..d38e6d24 100644
--- a/libmemcached/memcached_util.h
+++ b/libmemcached/memcached.hpp
@@ -3,7 +3,6 @@
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
- * Copyright (C) 2006-2009 Brian Aker All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -37,5 +36,5 @@
#pragma once
-#include <libmemcachedutil-1.0/util.h>
+#include <libmemcached-1.0/memcached.hpp>
diff --git a/libmemcached/virtual_bucket.c b/libmemcached/virtual_bucket.c
index 74ec10ef..f91bf454 100644
--- a/libmemcached/virtual_bucket.c
+++ b/libmemcached/virtual_bucket.c
@@ -36,8 +36,7 @@
*/
#include <config.h>
-#include <libmemcached/memcached.h>
-#include <libmemcached/virtual_bucket.h>
+#include <libmemcached/common.h>
struct bucket_t {
uint32_t master;
@@ -58,7 +57,9 @@ memcached_return_t memcached_virtual_bucket_create(memcached_st *self,
const uint32_t replicas)
{
if (! self || ! host_map || ! buckets)
+ {
return MEMCACHED_INVALID_ARGUMENTS;
+ }
memcached_virtual_bucket_free(self);
diff --git a/libmemcachedprotocol-0.0/protocol_binary.h b/libmemcachedprotocol-0.0/binary.h
index 73cd35b1..73cd35b1 100644
--- a/libmemcachedprotocol-0.0/protocol_binary.h
+++ b/libmemcachedprotocol-0.0/binary.h
diff --git a/libmemcachedprotocol-0.0/protocol_handler.h b/libmemcachedprotocol-0.0/handler.h
index 1930b026..f1cfdc03 100644
--- a/libmemcachedprotocol-0.0/protocol_handler.h
+++ b/libmemcachedprotocol-0.0/handler.h
@@ -20,7 +20,7 @@
#include <libmemcached-1.0/visibility.h>
#include <libmemcached-1.0/platform.h>
-#include <libmemcachedprotocol-0.0/protocol_binary.h>
+#include <libmemcachedprotocol-0.0/binary.h>
#include <libmemcachedprotocol-0.0/callback.h>
/* Forward declarations */
diff --git a/libmemcachedprotocol-0.0/include.am b/libmemcachedprotocol-0.0/include.am
index 0588b0a5..3683c0f1 100644
--- a/libmemcachedprotocol-0.0/include.am
+++ b/libmemcachedprotocol-0.0/include.am
@@ -3,5 +3,7 @@
# All paths should be given relative to the root
nobase_include_HEADERS+= \
+ libmemcachedprotocol-0.0/binary.h \
libmemcachedprotocol-0.0/callback.h \
- libmemcachedprotocol-0.0/protocol_handler.h
+ libmemcachedprotocol-0.0/handler.h \
+ libmemcachedprotocol-0.0/vbucket.h
diff --git a/libmemcachedprotocol-0.0/vbucket.h b/libmemcachedprotocol-0.0/vbucket.h
index c6c4d8ca..e2cc563e 100644
--- a/libmemcachedprotocol-0.0/vbucket.h
+++ b/libmemcachedprotocol-0.0/vbucket.h
@@ -1,6 +1,40 @@
-/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#ifndef MEMCACHED_VBUCKET_H
-#define MEMCACHED_VBUCKET_H 1
+/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ *
+ * Libmemcached library
+ *
+ * Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * The names of its contributors may not be used to endorse or
+ * promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#pragma once
#ifdef __cplusplus
extern "C"
@@ -23,4 +57,3 @@ typedef enum {
#ifdef __cplusplus
}
#endif
-#endif
diff --git a/libmemcached/protocol/ascii_handler.c b/libmemcachedprotocol/ascii_handler.c
index 2cceff22..f6134b3c 100644
--- a/libmemcached/protocol/ascii_handler.c
+++ b/libmemcachedprotocol/ascii_handler.c
@@ -34,8 +34,7 @@
*
*/
-#include <libmemcached/protocol/common.h>
-#include <libmemcached/byteorder.h>
+#include <libmemcachedprotocol/common.h>
#include <ctype.h>
#include <stdio.h>
diff --git a/libmemcached/protocol/ascii_handler.h b/libmemcachedprotocol/ascii_handler.h
index 02f8831e..02f8831e 100644
--- a/libmemcached/protocol/ascii_handler.h
+++ b/libmemcachedprotocol/ascii_handler.h
diff --git a/libmemcached/protocol/binary_handler.c b/libmemcachedprotocol/binary_handler.c
index 0997ebb0..c2fd4414 100644
--- a/libmemcached/protocol/binary_handler.c
+++ b/libmemcachedprotocol/binary_handler.c
@@ -34,8 +34,7 @@
*
*/
-#include <libmemcached/protocol/common.h>
-#include <libmemcached/byteorder.h>
+#include <libmemcachedprotocol/common.h>
#include <stdlib.h>
#include <sys/types.h>
diff --git a/libmemcached/protocol/binary_handler.h b/libmemcachedprotocol/binary_handler.h
index d5a74e78..d5a74e78 100644
--- a/libmemcached/protocol/binary_handler.h
+++ b/libmemcachedprotocol/binary_handler.h
diff --git a/libmemcached/protocol/cache.c b/libmemcachedprotocol/cache.c
index f7e3bc06..ed669f4f 100644
--- a/libmemcached/protocol/cache.c
+++ b/libmemcachedprotocol/cache.c
@@ -43,7 +43,7 @@
#include <signal.h>
#endif
-#include <libmemcached/protocol/cache.h>
+#include <libmemcachedprotocol/common.h>
#ifndef NDEBUG
const uint64_t redzone_pattern = 0xdeadbeefcafebabe;
diff --git a/libmemcached/protocol/cache.h b/libmemcachedprotocol/cache.h
index 6f84feaa..6f84feaa 100644
--- a/libmemcached/protocol/cache.h
+++ b/libmemcachedprotocol/cache.h
diff --git a/libmemcached/protocol/common.h b/libmemcachedprotocol/common.h
index e8df93e9..398e7ee2 100644
--- a/libmemcached/protocol/common.h
+++ b/libmemcachedprotocol/common.h
@@ -42,8 +42,9 @@
#endif
#include <assert.h>
-#include <libmemcachedprotocol-0.0/protocol_handler.h>
-#include <libmemcached/protocol/cache.h>
+#include <libmemcachedprotocol-0.0/handler.h>
+#include <libmemcachedprotocol/cache.h>
+#include <libmemcached/byteorder.h>
/*
* I don't really need the following two functions as function pointers
diff --git a/libmemcached/protocol/protocol_handler.c b/libmemcachedprotocol/handler.c
index 99b4ff2f..9ce927a6 100644
--- a/libmemcached/protocol/protocol_handler.c
+++ b/libmemcachedprotocol/handler.c
@@ -35,7 +35,7 @@
*/
/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include <libmemcached/protocol/common.h>
+#include <libmemcachedprotocol/common.h>
#include <stdlib.h>
#include <sys/types.h>
diff --git a/libmemcached/protocol/include.am b/libmemcachedprotocol/include.am
index d5bd9c46..58aed623 100644
--- a/libmemcached/protocol/include.am
+++ b/libmemcachedprotocol/include.am
@@ -4,13 +4,20 @@
lib_LTLIBRARIES+= libmemcached/libmemcachedprotocol.la
+
+noinst_HEADERS+= \
+ libmemcachedprotocol/ascii_handler.h \
+ libmemcachedprotocol/binary_handler.h \
+ libmemcachedprotocol/cache.h \
+ libmemcachedprotocol/common.h
+
libmemcached_libmemcachedprotocol_la_SOURCES= \
libmemcached/byteorder.cc \
- libmemcached/protocol/ascii_handler.c \
- libmemcached/protocol/binary_handler.c \
- libmemcached/protocol/cache.c \
- libmemcached/protocol/pedantic.c \
- libmemcached/protocol/protocol_handler.c
+ libmemcachedprotocol/ascii_handler.c \
+ libmemcachedprotocol/binary_handler.c \
+ libmemcachedprotocol/cache.c \
+ libmemcachedprotocol/handler.c \
+ libmemcachedprotocol/pedantic.c
libmemcached_libmemcachedprotocol_la_CFLAGS= \
${AM_CFLAGS} \
diff --git a/libmemcached/protocol/pedantic.c b/libmemcachedprotocol/pedantic.c
index f275b39a..54a2add0 100644
--- a/libmemcached/protocol/pedantic.c
+++ b/libmemcachedprotocol/pedantic.c
@@ -35,10 +35,9 @@
*/
/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include <libmemcached/protocol/common.h>
+#include <libmemcachedprotocol/common.h>
#include <sys/types.h>
-#include <inttypes.h>
#define ensure(a) if (!(a)) { return false; }
diff --git a/libmemcachedutil-1.0/include.am b/libmemcachedutil-1.0/include.am
index c60028c7..c5576058 100644
--- a/libmemcachedutil-1.0/include.am
+++ b/libmemcachedutil-1.0/include.am
@@ -5,7 +5,6 @@
nobase_include_HEADERS+= \
libmemcachedutil-1.0/flush.h \
- libmemcachedutil-1.0/memcached_util.h \
libmemcachedutil-1.0/pid.h \
libmemcachedutil-1.0/ping.h \
libmemcachedutil-1.0/pool.h \
diff --git a/libmemcachedutil-1.0/pid.h b/libmemcachedutil-1.0/pid.h
index 4101c11f..01738acc 100644
--- a/libmemcachedutil-1.0/pid.h
+++ b/libmemcachedutil-1.0/pid.h
@@ -36,6 +36,12 @@
#pragma once
+#ifndef WIN32
+#include <netdb.h>
+#endif
+
+#include <sys/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/libmemcachedutil-1.0/pool.h b/libmemcachedutil-1.0/pool.h
index eba97ec2..682aed5f 100644
--- a/libmemcachedutil-1.0/pool.h
+++ b/libmemcachedutil-1.0/pool.h
@@ -38,7 +38,7 @@
#pragma once
-#include <libmemcached/memcached.h>
+#include <libmemcached-1.0/memcached.h>
#ifdef __cplusplus
extern "C" {
diff --git a/libmemcachedutil-1.0/util.h b/libmemcachedutil-1.0/util.h
index 09053a99..d3620988 100644
--- a/libmemcachedutil-1.0/util.h
+++ b/libmemcachedutil-1.0/util.h
@@ -37,6 +37,8 @@
#pragma once
+#include <libmemcached-1.0/memcached.h>
+
#include <libmemcachedutil-1.0/pid.h>
#include <libmemcachedutil-1.0/flush.h>
#include <libmemcachedutil-1.0/ping.h>
diff --git a/libmemcachedutil/common.h b/libmemcachedutil/common.h
new file mode 100644
index 00000000..5c7b59f4
--- /dev/null
+++ b/libmemcachedutil/common.h
@@ -0,0 +1,45 @@
+/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ *
+ * Libmemcached Utility library
+ *
+ * Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * The names of its contributors may not be used to endorse or
+ * promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Summary: connects to a host, and then flushes it (memcached_flush(3)).
+ *
+ */
+
+#pragma once
+
+#include <config.h>
+
+#include <libmemcachedutil-1.0/util.h>
+#include <libmemcached/assert.hpp>
+#include <libmemcached/backtrace.hpp>
diff --git a/libmemcached/util/flush.cc b/libmemcachedutil/flush.cc
index 17131f7f..6a99603f 100644
--- a/libmemcached/util/flush.cc
+++ b/libmemcachedutil/flush.cc
@@ -36,8 +36,7 @@
*
*/
-#include <libmemcached/common.h>
-#include <libmemcached/memcached_util.h>
+#include <libmemcachedutil/common.h>
bool libmemcached_util_flush(const char *hostname, in_port_t port, memcached_return_t *ret)
diff --git a/libmemcached/util/include.am b/libmemcachedutil/include.am
index 3aa95a5a..8c9b7a50 100644
--- a/libmemcached/util/include.am
+++ b/libmemcachedutil/include.am
@@ -4,13 +4,16 @@
lib_LTLIBRARIES+= libmemcached/libmemcachedutil.la
+noinst_HEADERS+= \
+ libmemcachedutil/common.h
+
libmemcached_libmemcachedutil_la_SOURCES= \
libmemcached/backtrace.cc \
- libmemcached/util/flush.cc \
- libmemcached/util/pid.cc \
- libmemcached/util/ping.cc \
- libmemcached/util/pool.cc \
- libmemcached/util/version.cc
+ libmemcachedutil/flush.cc \
+ libmemcachedutil/pid.cc \
+ libmemcachedutil/ping.cc \
+ libmemcachedutil/pool.cc \
+ libmemcachedutil/version.cc
libmemcached_libmemcachedutil_la_CXXFLAGS= \
${AM_CXXFLAGS} \
${NO_CONVERSION} \
diff --git a/libmemcached/util/pid.cc b/libmemcachedutil/pid.cc
index 0ac3d4f3..7ff665b6 100644
--- a/libmemcached/util/pid.cc
+++ b/libmemcachedutil/pid.cc
@@ -37,8 +37,7 @@
*
*/
-#include <libmemcached/common.h>
-#include <libmemcached/memcached_util.h>
+#include <libmemcachedutil/common.h>
// Never look at the stat object directly.
diff --git a/libmemcached/util/ping.cc b/libmemcachedutil/ping.cc
index 66b1df77..82d891a9 100644
--- a/libmemcached/util/ping.cc
+++ b/libmemcachedutil/ping.cc
@@ -37,8 +37,7 @@
*
*/
-#include <libmemcached/common.h>
-#include <libmemcached/memcached_util.h>
+#include <libmemcachedutil/common.h>
bool libmemcached_util_ping(const char *hostname, in_port_t port, memcached_return_t *ret)
{
diff --git a/libmemcached/util/pool.cc b/libmemcachedutil/pool.cc
index 47f46eec..a0f30c51 100644
--- a/libmemcached/util/pool.cc
+++ b/libmemcachedutil/pool.cc
@@ -36,10 +36,7 @@
*/
-#include <libmemcached/common.h>
-#include <libmemcached/memcached_util.h>
-
-#include <libmemcached/error.hpp>
+#include <libmemcachedutil/common.h>
#include <cassert>
#include <cerrno>
diff --git a/libmemcached/util/version.cc b/libmemcachedutil/version.cc
index a8208298..abfd47f7 100644
--- a/libmemcached/util/version.cc
+++ b/libmemcachedutil/version.cc
@@ -36,8 +36,7 @@
*/
-#include <libmemcached/common.h>
-#include <libmemcached/memcached_util.h>
+#include <libmemcachedutil/common.h>
struct local_context
{
@@ -48,13 +47,12 @@ struct local_context
bool truth;
};
-static memcached_return_t check_server_version(const memcached_st *ptr,
+static memcached_return_t check_server_version(const memcached_st *,
const memcached_server_st *instance,
void *context)
{
/* Do Nothing */
struct local_context *check= (struct local_context *)context;
- (void)ptr;
if (instance->major_version != UINT8_MAX &&
instance->major_version >= check->major_version &&
diff --git a/support/libmemcached.spec.in b/support/libmemcached.spec.in
index 077ffd22..c6a6e727 100644
--- a/support/libmemcached.spec.in
+++ b/support/libmemcached.spec.in
@@ -109,70 +109,74 @@ you will need to install %{name}-devel.
%files devel
%defattr (-,root,root,-)
%doc examples
-%{_includedir}/libhashkit/algorithm.h
-%{_includedir}/libhashkit/behavior.h
-%{_includedir}/libhashkit/configure.h
-%{_includedir}/libhashkit/digest.h
-%{_includedir}/libhashkit/function.h
-%{_includedir}/libhashkit/has.h
%{_includedir}/libhashkit/hashkit.h
-%{_includedir}/libhashkit/hashkit.hpp
-%{_includedir}/libhashkit/str_algorithm.h
-%{_includedir}/libhashkit/strerror.h
-%{_includedir}/libhashkit/types.h
-%{_includedir}/libhashkit/visibility.h
-
-%{_includedir}/libmemcached/allocators.h
-%{_includedir}/libmemcached/analyze.h
-%{_includedir}/libmemcached/array.h
-%{_includedir}/libmemcached/auto.h
-%{_includedir}/libmemcached/basic_string.h
-%{_includedir}/libmemcached/behavior.h
-%{_includedir}/libmemcached/callback.h
-%{_includedir}/libmemcached/configure.h
-%{_includedir}/libmemcached/constants.h
-%{_includedir}/libmemcached/delete.h
-%{_includedir}/libmemcached/dump.h
-%{_includedir}/libmemcached/error.h
-%{_includedir}/libmemcached/exist.h
-%{_includedir}/libmemcached/exception.hpp
-%{_includedir}/libmemcached/fetch.h
-%{_includedir}/libmemcached/flush.h
-%{_includedir}/libmemcached/flush_buffers.h
-%{_includedir}/libmemcached/get.h
-%{_includedir}/libmemcached/hash.h
+%{_includedir}/libhashkit-1.0/algorithm.h
+%{_includedir}/libhashkit-1.0/behavior.h
+%{_includedir}/libhashkit-1.0/configure.h
+%{_includedir}/libhashkit-1.0/digest.h
+%{_includedir}/libhashkit-1.0/function.h
+%{_includedir}/libhashkit-1.0/has.h
+%{_includedir}/libhashkit-1.0/hashkit.h
+%{_includedir}/libhashkit-1.0/hashkit.hpp
+%{_includedir}/libhashkit-1.0/str_algorithm.h
+%{_includedir}/libhashkit-1.0/strerror.h
+%{_includedir}/libhashkit-1.0/types.h
+%{_includedir}/libhashkit-1.0/visibility.h
+
+%{_includedir}/libmemcachedprotocol-0.0/binary.h
+%{_includedir}/libmemcachedprotocol-0.0/callback.h
+%{_includedir}/libmemcachedprotocol-0.0/handler.h
+%{_includedir}/libmemcachedprotocol-0.0/vbucket.h
+
+%{_includedir}/libmemcachedutil-1.0/util.h
+%{_includedir}/libmemcachedutil-1.0/flush.h
+%{_includedir}/libmemcachedutil-1.0/pid.h
+%{_includedir}/libmemcachedutil-1.0/ping.h
+%{_includedir}/libmemcachedutil-1.0/pool.h
+%{_includedir}/libmemcachedutil-1.0/version.h
+
%{_includedir}/libmemcached/memcached.h
%{_includedir}/libmemcached/memcached.hpp
-%{_includedir}/libmemcached/memcached/protocol_binary.h
-%{_includedir}/libmemcached/memcached/vbucket.h
-%{_includedir}/libmemcached/memcached_util.h
-%{_includedir}/libmemcached/namespace.h
-%{_includedir}/libmemcached/options.h
-%{_includedir}/libmemcached/parse.h
-%{_includedir}/libmemcached/platform.h
-%{_includedir}/libmemcached/protocol/cache.h
-%{_includedir}/libmemcached/protocol/callback.h
-%{_includedir}/libmemcached/protocol_handler.h
-%{_includedir}/libmemcached/quit.h
-%{_includedir}/libmemcached/result.h
-%{_includedir}/libmemcached/return.h
-%{_includedir}/libmemcached/sasl.h
-%{_includedir}/libmemcached/server.h
-%{_includedir}/libmemcached/server_list.h
-%{_includedir}/libmemcached/stats.h
-%{_includedir}/libmemcached/storage.h
-%{_includedir}/libmemcached/strerror.h
-%{_includedir}/libmemcached/string.h
-%{_includedir}/libmemcached/types.h
%{_includedir}/libmemcached/util.h
-%{_includedir}/libmemcached/util/flush.h
-%{_includedir}/libmemcached/util/pid.h
-%{_includedir}/libmemcached/util/ping.h
-%{_includedir}/libmemcached/util/pool.h
-%{_includedir}/libmemcached/util/version.h
-%{_includedir}/libmemcached/verbosity.h
-%{_includedir}/libmemcached/version.h
-%{_includedir}/libmemcached/visibility.h
+
+%{_includedir}/libmemcached-1.0/allocators.h
+%{_includedir}/libmemcached-1.0/analyze.h
+%{_includedir}/libmemcached-1.0/auto.h
+%{_includedir}/libmemcached-1.0/basic_string.h
+%{_includedir}/libmemcached-1.0/behavior.h
+%{_includedir}/libmemcached-1.0/callback.h
+%{_includedir}/libmemcached-1.0/configure.h
+%{_includedir}/libmemcached-1.0/constants.h
+%{_includedir}/libmemcached-1.0/delete.h
+%{_includedir}/libmemcached-1.0/dump.h
+%{_includedir}/libmemcached-1.0/error.h
+%{_includedir}/libmemcached-1.0/exist.h
+%{_includedir}/libmemcached-1.0/exception.hpp
+%{_includedir}/libmemcached-1.0/fetch.h
+%{_includedir}/libmemcached-1.0/flush.h
+%{_includedir}/libmemcached-1.0/flush_buffers.h
+%{_includedir}/libmemcached-1.0/get.h
+%{_includedir}/libmemcached-1.0/hash.h
+%{_includedir}/libmemcached-1.0/memcached.h
+%{_includedir}/libmemcached-1.0/memcached.hpp
+%{_includedir}/libmemcached-1.0/options.h
+%{_includedir}/libmemcached-1.0/parse.h
+%{_includedir}/libmemcached-1.0/platform.h
+%{_includedir}/libmemcached-1.0/quit.h
+%{_includedir}/libmemcached-1.0/result.h
+%{_includedir}/libmemcached-1.0/return.h
+%{_includedir}/libmemcached-1.0/sasl.h
+%{_includedir}/libmemcached-1.0/server.h
+%{_includedir}/libmemcached-1.0/server_list.h
+%{_includedir}/libmemcached-1.0/stats.h
+%{_includedir}/libmemcached-1.0/storage.h
+%{_includedir}/libmemcached-1.0/strerror.h
+%{_includedir}/libmemcached-1.0/string.h
+%{_includedir}/libmemcached-1.0/types.h
+%{_includedir}/libmemcached-1.0/verbosity.h
+%{_includedir}/libmemcached-1.0/version.h
+%{_includedir}/libmemcached-1.0/visibility.h
+
%{_libdir}/libhashkit.so
%{_libdir}/libmemcached.so
%{_libdir}/libmemcachedprotocol.so
diff --git a/tests/hashkit_functions.cc b/tests/hashkit_functions.cc
index 6a823cdd..908ad960 100644
--- a/tests/hashkit_functions.cc
+++ b/tests/hashkit_functions.cc
@@ -45,7 +45,7 @@ using namespace libtest;
#include <cstdlib>
#include <cstring>
-#include <libhashkit/hashkit.h>
+#include <libhashkit-1.0/hashkit.h>
#include <libhashkit/is.h>
#include "tests/hash_results.h"
diff --git a/tests/mem_functions.cc b/tests/mem_functions.cc
index 18e092e4..3d2869ce 100644
--- a/tests/mem_functions.cc
+++ b/tests/mem_functions.cc
@@ -42,11 +42,11 @@
Test cases
*/
-#include <libmemcached/memcached.h>
+#include <libmemcached-1.0/memcached.h>
#include <libmemcached/is.h>
#include <libmemcached/server_instance.h>
-#include <libhashkit/hashkit.h>
+#include <libhashkit-1.0/hashkit.h>
#include <cassert>
#include <cerrno>
@@ -87,7 +87,7 @@
using namespace libtest;
-#include <libmemcached/memcached_util.h>
+#include <libmemcached/util.h>
#include "hash_results.h"
diff --git a/win32/include.am b/win32/include.am
index f81ae3e3..43e8d9b1 100644
--- a/win32/include.am
+++ b/win32/include.am
@@ -4,8 +4,8 @@
noinst_HEADERS+= win32/wrappers.h
if BUILD_WIN32_WRAPPERS
+libhashkit_libhashkit_la_LDFLAGS+=-no-undefined
libmemcached_libmemcached_la_LDFLAGS+=-no-undefined
libmemcached_libmemcachedprotocol_la_LDFLAGS+=-no-undefined
libmemcached_libmemcachedutil_la_LDFLAGS+=-no-undefined
-libhashkit_libhashkit_la_LDFLAGS+=-no-undefined
endif