From 274778ed13cb7c38995dc1491d437b27db6339fb Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Tue, 4 Oct 2011 10:38:16 -0700 Subject: [PATCH] Update all of the build/spec files. --- ChangeLog | 3 + Makefile.am | 15 ++- docs/libmemcached.rst | 4 +- example/interface_v0.c | 2 +- example/interface_v1.c | 2 +- example/memcached_light.c | 2 +- libhashkit-1.0/hashkit.hpp | 2 +- libhashkit-1.0/include.am | 3 + libhashkit/common.h | 2 +- libhashkit/include.am | 9 +- libmemcached-1.0/include.am | 2 + libmemcached-1.0/storage.h | 2 - libmemcached/common.h | 1 + libmemcached/include.am | 10 +- .../{memcached_util.h => memcached.hpp} | 3 +- libmemcached/virtual_bucket.c | 5 +- .../{protocol_binary.h => binary.h} | 0 .../{protocol_handler.h => handler.h} | 2 +- libmemcachedprotocol-0.0/include.am | 4 +- libmemcachedprotocol-0.0/vbucket.h | 41 +++++- .../ascii_handler.c | 3 +- .../ascii_handler.h | 0 .../binary_handler.c | 3 +- .../binary_handler.h | 0 .../protocol => libmemcachedprotocol}/cache.c | 2 +- .../protocol => libmemcachedprotocol}/cache.h | 0 .../common.h | 5 +- .../handler.c | 2 +- .../include.am | 17 ++- .../pedantic.c | 3 +- libmemcachedutil-1.0/include.am | 1 - libmemcachedutil-1.0/pid.h | 6 + libmemcachedutil-1.0/pool.h | 2 +- libmemcachedutil-1.0/util.h | 2 + libmemcachedutil/common.h | 45 +++++++ .../util => libmemcachedutil}/flush.cc | 3 +- .../util => libmemcachedutil}/include.am | 13 +- .../util => libmemcachedutil}/pid.cc | 3 +- .../util => libmemcachedutil}/ping.cc | 3 +- .../util => libmemcachedutil}/pool.cc | 5 +- .../util => libmemcachedutil}/version.cc | 6 +- support/libmemcached.spec.in | 124 +++++++++--------- tests/hashkit_functions.cc | 2 +- tests/mem_functions.cc | 6 +- win32/include.am | 2 +- 45 files changed, 237 insertions(+), 135 deletions(-) rename libmemcached/{memcached_util.h => memcached.hpp} (94%) rename libmemcachedprotocol-0.0/{protocol_binary.h => binary.h} (100%) rename libmemcachedprotocol-0.0/{protocol_handler.h => handler.h} (99%) rename {libmemcached/protocol => libmemcachedprotocol}/ascii_handler.c (99%) rename {libmemcached/protocol => libmemcachedprotocol}/ascii_handler.h (100%) rename {libmemcached/protocol => libmemcachedprotocol}/binary_handler.c (99%) rename {libmemcached/protocol => libmemcachedprotocol}/binary_handler.h (100%) rename {libmemcached/protocol => libmemcachedprotocol}/cache.c (99%) rename {libmemcached/protocol => libmemcachedprotocol}/cache.h (100%) rename {libmemcached/protocol => libmemcachedprotocol}/common.h (97%) rename libmemcached/protocol/protocol_handler.c => libmemcachedprotocol/handler.c (99%) rename {libmemcached/protocol => libmemcachedprotocol}/include.am (67%) rename {libmemcached/protocol => libmemcachedprotocol}/pedantic.c (99%) create mode 100644 libmemcachedutil/common.h rename {libmemcached/util => libmemcachedutil}/flush.cc (96%) rename {libmemcached/util => libmemcachedutil}/include.am (77%) rename {libmemcached/util => libmemcachedutil}/pid.cc (98%) rename {libmemcached/util => libmemcachedutil}/ping.cc (98%) rename {libmemcached/util => libmemcachedutil}/pool.cc (99%) rename {libmemcached/util => libmemcachedutil}/version.cc (96%) 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/ `_ +applications by alleviating database load." `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 #include -#include +#include #include #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 #include -#include +#include #include #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 #include -#include +#include #include #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 +#include #include 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 #include -#include +#include #include #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 #include #include +#include #ifdef __cplusplus #include 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 similarity index 94% rename from libmemcached/memcached_util.h rename to 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 +#include 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 -#include -#include +#include 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 similarity index 100% rename from libmemcachedprotocol-0.0/protocol_binary.h rename to libmemcachedprotocol-0.0/binary.h diff --git a/libmemcachedprotocol-0.0/protocol_handler.h b/libmemcachedprotocol-0.0/handler.h similarity index 99% rename from libmemcachedprotocol-0.0/protocol_handler.h rename to 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 #include -#include +#include #include /* 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 similarity index 99% rename from libmemcached/protocol/ascii_handler.c rename to libmemcachedprotocol/ascii_handler.c index 2cceff22..f6134b3c 100644 --- a/libmemcached/protocol/ascii_handler.c +++ b/libmemcachedprotocol/ascii_handler.c @@ -34,8 +34,7 @@ * */ -#include -#include +#include #include #include diff --git a/libmemcached/protocol/ascii_handler.h b/libmemcachedprotocol/ascii_handler.h similarity index 100% rename from libmemcached/protocol/ascii_handler.h rename to libmemcachedprotocol/ascii_handler.h diff --git a/libmemcached/protocol/binary_handler.c b/libmemcachedprotocol/binary_handler.c similarity index 99% rename from libmemcached/protocol/binary_handler.c rename to libmemcachedprotocol/binary_handler.c index 0997ebb0..c2fd4414 100644 --- a/libmemcached/protocol/binary_handler.c +++ b/libmemcachedprotocol/binary_handler.c @@ -34,8 +34,7 @@ * */ -#include -#include +#include #include #include diff --git a/libmemcached/protocol/binary_handler.h b/libmemcachedprotocol/binary_handler.h similarity index 100% rename from libmemcached/protocol/binary_handler.h rename to libmemcachedprotocol/binary_handler.h diff --git a/libmemcached/protocol/cache.c b/libmemcachedprotocol/cache.c similarity index 99% rename from libmemcached/protocol/cache.c rename to libmemcachedprotocol/cache.c index f7e3bc06..ed669f4f 100644 --- a/libmemcached/protocol/cache.c +++ b/libmemcachedprotocol/cache.c @@ -43,7 +43,7 @@ #include #endif -#include +#include #ifndef NDEBUG const uint64_t redzone_pattern = 0xdeadbeefcafebabe; diff --git a/libmemcached/protocol/cache.h b/libmemcachedprotocol/cache.h similarity index 100% rename from libmemcached/protocol/cache.h rename to libmemcachedprotocol/cache.h diff --git a/libmemcached/protocol/common.h b/libmemcachedprotocol/common.h similarity index 97% rename from libmemcached/protocol/common.h rename to libmemcachedprotocol/common.h index e8df93e9..398e7ee2 100644 --- a/libmemcached/protocol/common.h +++ b/libmemcachedprotocol/common.h @@ -42,8 +42,9 @@ #endif #include -#include -#include +#include +#include +#include /* * I don't really need the following two functions as function pointers diff --git a/libmemcached/protocol/protocol_handler.c b/libmemcachedprotocol/handler.c similarity index 99% rename from libmemcached/protocol/protocol_handler.c rename to 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 +#include #include #include diff --git a/libmemcached/protocol/include.am b/libmemcachedprotocol/include.am similarity index 67% rename from libmemcached/protocol/include.am rename to 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 similarity index 99% rename from libmemcached/protocol/pedantic.c rename to 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 +#include #include -#include #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 +#endif + +#include + #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 +#include #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 + #include #include #include 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 + +#include +#include +#include diff --git a/libmemcached/util/flush.cc b/libmemcachedutil/flush.cc similarity index 96% rename from libmemcached/util/flush.cc rename to libmemcachedutil/flush.cc index 17131f7f..6a99603f 100644 --- a/libmemcached/util/flush.cc +++ b/libmemcachedutil/flush.cc @@ -36,8 +36,7 @@ * */ -#include -#include +#include 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 similarity index 77% rename from libmemcached/util/include.am rename to 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 similarity index 98% rename from libmemcached/util/pid.cc rename to libmemcachedutil/pid.cc index 0ac3d4f3..7ff665b6 100644 --- a/libmemcached/util/pid.cc +++ b/libmemcachedutil/pid.cc @@ -37,8 +37,7 @@ * */ -#include -#include +#include // Never look at the stat object directly. diff --git a/libmemcached/util/ping.cc b/libmemcachedutil/ping.cc similarity index 98% rename from libmemcached/util/ping.cc rename to libmemcachedutil/ping.cc index 66b1df77..82d891a9 100644 --- a/libmemcached/util/ping.cc +++ b/libmemcachedutil/ping.cc @@ -37,8 +37,7 @@ * */ -#include -#include +#include 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 similarity index 99% rename from libmemcached/util/pool.cc rename to libmemcachedutil/pool.cc index 47f46eec..a0f30c51 100644 --- a/libmemcached/util/pool.cc +++ b/libmemcachedutil/pool.cc @@ -36,10 +36,7 @@ */ -#include -#include - -#include +#include #include #include diff --git a/libmemcached/util/version.cc b/libmemcachedutil/version.cc similarity index 96% rename from libmemcached/util/version.cc rename to libmemcachedutil/version.cc index a8208298..abfd47f7 100644 --- a/libmemcached/util/version.cc +++ b/libmemcachedutil/version.cc @@ -36,8 +36,7 @@ */ -#include -#include +#include 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 #include -#include +#include #include #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 +#include #include #include -#include +#include #include #include @@ -87,7 +87,7 @@ using namespace libtest; -#include +#include #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 -- 2.30.2