From: Michael Wallner Date: Tue, 18 Feb 2020 12:32:10 +0000 (+0100) Subject: fix includes X-Git-Tag: post_cmake~8 X-Git-Url: https://git.m6w6.name/?p=awesomized%2Flibmemcached;a=commitdiff_plain;h=5bb6f975322d3da0caf082b8d890132194d0a4ea fix includes --- diff --git a/CMake/InstallPublicHeaders.cmake b/CMake/InstallPublicHeaders.cmake new file mode 100644 index 00000000..56ebb0c4 --- /dev/null +++ b/CMake/InstallPublicHeaders.cmake @@ -0,0 +1,13 @@ +function(install_public_headers DIRECTORY) + foreach(HEADER IN LISTS ARGN) + file(READ ${HEADER} HEADER_IN) + string(REGEX REPLACE "include *\"([^\"]+)\"" "include <\\1>" HEADER_OUT "${HEADER_IN}") + file(GENERATE + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${HEADER} + CONTENT "${HEADER_OUT}" + ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${HEADER} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${DIRECTORY} + ) + endforeach() +endfunction() diff --git a/CMake/_Include.cmake b/CMake/_Include.cmake index 9e73358a..1c5b89ff 100644 --- a/CMake/_Include.cmake +++ b/CMake/_Include.cmake @@ -10,6 +10,7 @@ find_package(PkgConfig) find_package(Threads REQUIRED) # locals +include(InstallPublicHeaders) include(SafeString) include(CheckDebug) include(CheckDecl) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36ca4988..7cd6745f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ foreach(INCLUDE IN ITEMS ${CMAKE_BINARY_DIR} .) ${INCLUDE}/src ) endforeach() + set(AUTOHEADER_FILE mem_config.h) set(CLIENTS diff --git a/include/libhashkit-1.0/CMakeLists.txt b/include/libhashkit-1.0/CMakeLists.txt index ee967319..bb97fb30 100644 --- a/include/libhashkit-1.0/CMakeLists.txt +++ b/include/libhashkit-1.0/CMakeLists.txt @@ -1,7 +1,20 @@ configure_file(configure.h.in configure.h @ONLY) -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - FILES_MATCHING REGEX "\\.h(pp)?$" +install_public_headers( + libhashkit-1.0 + + algorithm.h + basic_string.h + behavior.h + digest.h + function.h + has.h + hashkit.h + hashkit.hpp + str_algorithm.h + strerror.h + string.h + types.h + visibility.h ) diff --git a/include/libmemcached-1.0/CMakeLists.txt b/include/libmemcached-1.0/CMakeLists.txt index 061c6f7f..f288c13e 100644 --- a/include/libmemcached-1.0/CMakeLists.txt +++ b/include/libmemcached-1.0/CMakeLists.txt @@ -1,8 +1,52 @@ configure_file(configure.h.in configure.h @ONLY) -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - FILES_MATCHING REGEX "\\.h(pp)?$" - PATTERN t EXCLUDE +add_subdirectory(struct) +add_subdirectory(types) + +install_public_headers( + libmemcached-1.0 + + alloc.h + allocators.h + analyze.h + auto.h + basic_string.h + behavior.h + callback.h + callbacks.h + defaults.h + delete.h + deprecated_types.h + dump.h + encoding_key.h + error.h + exception.hpp + exist.h + fetch.h + flush_buffers.h + flush.h + get.h + hash.h + limits.h + memcached.h + memcached.hpp + options.h + parse.h + platform.h + quit.h + result.h + return.h + sasl.h + server.h + server_list.h + stats.h + storage.h + strerror.h + touch.h + triggers.h + types.h + verbosity.h + version.h + visibility.h ) diff --git a/include/libmemcached-1.0/analyze.h b/include/libmemcached-1.0/analyze.h index 0da38143..33cd6ee9 100644 --- a/include/libmemcached-1.0/analyze.h +++ b/include/libmemcached-1.0/analyze.h @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached-1.0/struct/analysis.h" #pragma once diff --git a/include/libmemcached-1.0/memcached.h b/include/libmemcached-1.0/memcached.h index 1ee54bbe..5a7f870e 100644 --- a/include/libmemcached-1.0/memcached.h +++ b/include/libmemcached-1.0/memcached.h @@ -59,71 +59,71 @@ #include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include +#include "libmemcached-1.0/visibility.h" +#include "libmemcached-1.0/configure.h" +#include "libmemcached-1.0/platform.h" + +#include "libmemcached-1.0/limits.h" +#include "libmemcached-1.0/defaults.h" + +#include "libmemcached-1.0/types/behavior.h" +#include "libmemcached-1.0/types/callback.h" +#include "libmemcached-1.0/types/connection.h" +#include "libmemcached-1.0/types/hash.h" +#include "libmemcached-1.0/types/return.h" +#include "libmemcached-1.0/types/server_distribution.h" + +#include "libmemcached-1.0/return.h" + +#include "libmemcached-1.0/types.h" +#include "libmemcached-1.0/callbacks.h" +#include "libmemcached-1.0/alloc.h" +#include "libmemcached-1.0/triggers.h" + +#include "libhashkit-1.0/hashkit.h" + +#include "libmemcached-1.0/struct/callback.h" +#include "libmemcached-1.0/struct/string.h" +#include "libmemcached-1.0/struct/result.h" +#include "libmemcached-1.0/struct/allocator.h" +#include "libmemcached-1.0/struct/sasl.h" +#include "libmemcached-1.0/struct/memcached.h" +#include "libmemcached-1.0/struct/server.h" +#include "libmemcached-1.0/struct/stat.h" + +#include "libmemcached-1.0/basic_string.h" +#include "libmemcached-1.0/error.h" +#include "libmemcached-1.0/stats.h" // Everything above this line must be in the order specified. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include "libmemcached-1.0/allocators.h" +#include "libmemcached-1.0/analyze.h" +#include "libmemcached-1.0/auto.h" +#include "libmemcached-1.0/behavior.h" +#include "libmemcached-1.0/callback.h" +#include "libmemcached-1.0/delete.h" +#include "libmemcached-1.0/dump.h" +#include "libmemcached-1.0/encoding_key.h" +#include "libmemcached-1.0/exist.h" +#include "libmemcached-1.0/fetch.h" +#include "libmemcached-1.0/flush.h" +#include "libmemcached-1.0/flush_buffers.h" +#include "libmemcached-1.0/get.h" +#include "libmemcached-1.0/hash.h" +#include "libmemcached-1.0/options.h" +#include "libmemcached-1.0/parse.h" +#include "libmemcached-1.0/quit.h" +#include "libmemcached-1.0/result.h" +#include "libmemcached-1.0/server.h" +#include "libmemcached-1.0/server_list.h" +#include "libmemcached-1.0/storage.h" +#include "libmemcached-1.0/strerror.h" +#include "libmemcached-1.0/touch.h" +#include "libmemcached-1.0/verbosity.h" +#include "libmemcached-1.0/version.h" +#include "libmemcached-1.0/sasl.h" + +#include "libmemcached-1.0/deprecated_types.h" #ifdef __cplusplus extern "C" { diff --git a/include/libmemcached-1.0/memcached.hpp b/include/libmemcached-1.0/memcached.hpp index af12f300..aa25040c 100644 --- a/include/libmemcached-1.0/memcached.hpp +++ b/include/libmemcached-1.0/memcached.hpp @@ -50,9 +50,9 @@ #pragma once -#include +#include "libmemcached-1.0/memcached.h" #if 0 -#include +#include "libmemcached/exception.hpp" #endif #include diff --git a/include/libmemcached-1.0/result.h b/include/libmemcached-1.0/result.h index 615957f3..f07e1e75 100644 --- a/include/libmemcached-1.0/result.h +++ b/include/libmemcached-1.0/result.h @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached-1.0/struct/result.h" #pragma once diff --git a/include/libmemcached-1.0/sasl.h b/include/libmemcached-1.0/sasl.h index c3084217..7d88f7bc 100644 --- a/include/libmemcached-1.0/sasl.h +++ b/include/libmemcached-1.0/sasl.h @@ -67,4 +67,4 @@ sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr); } #endif -#include +#include "libmemcached-1.0/struct/sasl.h" diff --git a/include/libmemcached-1.0/server.h b/include/libmemcached-1.0/server.h index abd0bfb9..8554804a 100644 --- a/include/libmemcached-1.0/server.h +++ b/include/libmemcached-1.0/server.h @@ -38,7 +38,7 @@ #pragma once -#include +#include "libmemcached-1.0/struct/server.h" #ifdef __cplusplus extern "C" { diff --git a/include/libmemcached-1.0/stats.h b/include/libmemcached-1.0/stats.h index 708064f1..5c384233 100644 --- a/include/libmemcached-1.0/stats.h +++ b/include/libmemcached-1.0/stats.h @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached-1.0/struct/stat.h" #pragma once diff --git a/include/libmemcached-1.0/struct/CMakeLists.txt b/include/libmemcached-1.0/struct/CMakeLists.txt new file mode 100644 index 00000000..548f993d --- /dev/null +++ b/include/libmemcached-1.0/struct/CMakeLists.txt @@ -0,0 +1,14 @@ + +install_public_headers( + libmemcached-1.0/struct + + allocator.h + analysis.h + callback.h + memcached.h + result.h + sasl.h + server.h + stat.h + string.h +) diff --git a/include/libmemcached-1.0/t/c_sasl_test.c b/include/libmemcached-1.0/t/c_sasl_test.c index 93f729d1..0f52afff 100644 --- a/include/libmemcached-1.0/t/c_sasl_test.c +++ b/include/libmemcached-1.0/t/c_sasl_test.c @@ -44,7 +44,7 @@ #include #endif -#include +#include "libmemcached-1.0/memcached.h" int main(void) { diff --git a/include/libmemcached-1.0/t/c_test.c b/include/libmemcached-1.0/t/c_test.c index 40935fac..af25f1d0 100644 --- a/include/libmemcached-1.0/t/c_test.c +++ b/include/libmemcached-1.0/t/c_test.c @@ -40,7 +40,7 @@ #include -#include +#include "libmemcached-1.0/memcached.h" int main(void) { diff --git a/include/libmemcached-1.0/t/cc_test.cc b/include/libmemcached-1.0/t/cc_test.cc index 71ee8c30..c098e402 100644 --- a/include/libmemcached-1.0/t/cc_test.cc +++ b/include/libmemcached-1.0/t/cc_test.cc @@ -40,7 +40,7 @@ #include -#include +#include "libmemcached-1.0/memcached.h" int main(void) { diff --git a/include/libmemcached-1.0/types/CMakeLists.txt b/include/libmemcached-1.0/types/CMakeLists.txt new file mode 100644 index 00000000..14ec1077 --- /dev/null +++ b/include/libmemcached-1.0/types/CMakeLists.txt @@ -0,0 +1,11 @@ + +install_public_headers( + libmemcached-1.0/types + + behavior.h + callback.h + connection.h + hash.h + return.h + server_distribution.h + ) diff --git a/include/libmemcachedprotocol-0.0/binary.h b/include/libmemcachedprotocol-0.0/binary.h index 51e2c422..50e092e1 100644 --- a/include/libmemcachedprotocol-0.0/binary.h +++ b/include/libmemcachedprotocol-0.0/binary.h @@ -36,7 +36,7 @@ #ifndef PROTOCOL_BINARY_H #define PROTOCOL_BINARY_H -#include +#include "libmemcachedprotocol-0.0/vbucket.h" /** * \addtogroup Protocol diff --git a/include/libmemcachedprotocol-0.0/handler.h b/include/libmemcachedprotocol-0.0/handler.h index 113338df..7a0b79ea 100644 --- a/include/libmemcachedprotocol-0.0/handler.h +++ b/include/libmemcachedprotocol-0.0/handler.h @@ -18,10 +18,10 @@ # include #endif -#include -#include -#include -#include +#include "libmemcached-1.0/visibility.h" +#include "libmemcached-1.0/platform.h" +#include "libmemcachedprotocol-0.0/binary.h" +#include "libmemcachedprotocol-0.0/callback.h" /* Forward declarations */ /* diff --git a/include/libmemcachedutil-1.0/CMakeLists.txt b/include/libmemcachedutil-1.0/CMakeLists.txt index c6138875..a6e353d1 100644 --- a/include/libmemcachedutil-1.0/CMakeLists.txt +++ b/include/libmemcachedutil-1.0/CMakeLists.txt @@ -1,5 +1,12 @@ -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - FILES_MATCHING REGEX "\\.h(pp)?$" +install_public_headers( + libmemcachedutil-1.0 + + flush.h + ostream.hpp + pid.h + ping.h + pool.h + util.h + version.h ) diff --git a/include/libmemcachedutil-1.0/pool.h b/include/libmemcachedutil-1.0/pool.h index a11117ca..8f7afe02 100644 --- a/include/libmemcachedutil-1.0/pool.h +++ b/include/libmemcachedutil-1.0/pool.h @@ -38,7 +38,7 @@ #pragma once -#include +#include "libmemcached-1.0/memcached.h" #ifdef __cplusplus extern "C" { diff --git a/include/libmemcachedutil-1.0/util.h b/include/libmemcachedutil-1.0/util.h index d3620988..2e9e86e5 100644 --- a/include/libmemcachedutil-1.0/util.h +++ b/include/libmemcachedutil-1.0/util.h @@ -37,10 +37,10 @@ #pragma once -#include +#include "libmemcached-1.0/memcached.h" -#include -#include -#include -#include -#include +#include "libmemcachedutil-1.0/pid.h" +#include "libmemcachedutil-1.0/flush.h" +#include "libmemcachedutil-1.0/ping.h" +#include "libmemcachedutil-1.0/pool.h" +#include "libmemcachedutil-1.0/version.h" diff --git a/src/bin/execute.cc b/src/bin/execute.cc index 37148404..f0a5e47e 100644 --- a/src/bin/execute.cc +++ b/src/bin/execute.cc @@ -15,7 +15,7 @@ Return the number of rows set. */ -#include +#include "mem_config.h" #include "execute.h" unsigned int execute_set(memcached_st *memc, pairs_st *pairs, unsigned int number_of) diff --git a/src/bin/execute.h b/src/bin/execute.h index e66b0c5a..c044c669 100644 --- a/src/bin/execute.h +++ b/src/bin/execute.h @@ -13,7 +13,7 @@ #include -#include +#include "libmemcached-1.0/memcached.h" #include "generator.h" #ifdef __cplusplus diff --git a/src/bin/generator.cc b/src/bin/generator.cc index e418fd7e..3de895d0 100644 --- a/src/bin/generator.cc +++ b/src/bin/generator.cc @@ -10,7 +10,7 @@ * */ -#include +#include "mem_config.h" #include diff --git a/src/bin/memcapable.cc b/src/bin/memcapable.cc index 81e619f6..f735c2a5 100644 --- a/src/bin/memcapable.cc +++ b/src/bin/memcapable.cc @@ -13,7 +13,7 @@ /* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ #undef NDEBUG -#include +#include "mem_config.h" #ifdef HAVE_POLL_H #include @@ -34,7 +34,7 @@ #include #include -#include +#include "libmemcached-1.0/memcached.h" #include "libmemcached/socket.hpp" #include "libmemcachedprotocol-0.0/binary.h" diff --git a/src/bin/memcat.cc b/src/bin/memcat.cc index 86535123..269d1c1b 100644 --- a/src/bin/memcat.cc +++ b/src/bin/memcat.cc @@ -10,14 +10,14 @@ * */ -#include +#include "mem_config.h" #include #include #include #include #include -#include +#include "libmemcached-1.0/memcached.h" #include "utilities.h" diff --git a/src/bin/memcp.cc b/src/bin/memcp.cc index d87e0cad..cf8d273c 100644 --- a/src/bin/memcp.cc +++ b/src/bin/memcp.cc @@ -31,7 +31,7 @@ #include -#include +#include "libmemcached-1.0/memcached.h" #include "client_options.h" #include "utilities.h" diff --git a/src/bin/memdump.cc b/src/bin/memdump.cc index 48c35d3e..8e12066b 100644 --- a/src/bin/memdump.cc +++ b/src/bin/memdump.cc @@ -25,7 +25,7 @@ #include #include -#include +#include "libmemcached-1.0/memcached.h" #include "client_options.h" #include "utilities.h" diff --git a/src/bin/memerror.cc b/src/bin/memerror.cc index 3cee64cc..96c068f5 100644 --- a/src/bin/memerror.cc +++ b/src/bin/memerror.cc @@ -21,7 +21,7 @@ #include #include -#include +#include "libmemcached-1.0/memcached.h" #include "utilities.h" diff --git a/src/bin/memexist.cc b/src/bin/memexist.cc index 505f5385..d08492ee 100644 --- a/src/bin/memexist.cc +++ b/src/bin/memexist.cc @@ -17,7 +17,7 @@ #include #include -#include +#include "libmemcached-1.0/memcached.h" #include "client_options.h" #include "utilities.h" diff --git a/src/bin/memflush.cc b/src/bin/memflush.cc index 71545eab..8cd933ff 100644 --- a/src/bin/memflush.cc +++ b/src/bin/memflush.cc @@ -18,7 +18,7 @@ #include #include -#include +#include "libmemcached-1.0/memcached.h" #include "client_options.h" #include "utilities.h" diff --git a/src/bin/memparse.cc b/src/bin/memparse.cc index fc2cb0c7..341f5145 100644 --- a/src/bin/memparse.cc +++ b/src/bin/memparse.cc @@ -35,13 +35,13 @@ * */ -#include +#include "mem_config.h" #include #include #include -#include +#include "libmemcached-1.0/memcached.h" int main(int argc, char *argv[]) { diff --git a/src/bin/memping.cc b/src/bin/memping.cc index 180d6a21..f7962ae0 100644 --- a/src/bin/memping.cc +++ b/src/bin/memping.cc @@ -17,8 +17,8 @@ #include #include -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/util.h" #include "client_options.h" #include "utilities.h" diff --git a/src/bin/memrm.cc b/src/bin/memrm.cc index 50ead7a3..fc6df6c0 100644 --- a/src/bin/memrm.cc +++ b/src/bin/memrm.cc @@ -18,7 +18,7 @@ #include #include -#include +#include "libmemcached-1.0/memcached.h" #include "client_options.h" #include "utilities.h" diff --git a/src/bin/memslap.cc b/src/bin/memslap.cc index 9bc4f238..89649764 100644 --- a/src/bin/memslap.cc +++ b/src/bin/memslap.cc @@ -36,7 +36,7 @@ */ -#include +#include "mem_config.h" #include #include @@ -55,7 +55,7 @@ #include -#include +#include "libmemcached-1.0/memcached.h" #include "client_options.h" #include "utilities.h" diff --git a/src/bin/memstat.cc b/src/bin/memstat.cc index e5bac916..6021dbc5 100644 --- a/src/bin/memstat.cc +++ b/src/bin/memstat.cc @@ -12,7 +12,7 @@ * Brian Aker * Toru Maesaka */ -#include +#include "mem_config.h" #include #include @@ -26,7 +26,7 @@ #include #include -#include +#include "libmemcached-1.0/memcached.h" #include "client_options.h" #include "utilities.h" diff --git a/src/bin/memtouch.cc b/src/bin/memtouch.cc index 09e0c92a..b52ce9bd 100644 --- a/src/bin/memtouch.cc +++ b/src/bin/memtouch.cc @@ -10,7 +10,7 @@ * */ -#include +#include "mem_config.h" #include #include @@ -19,7 +19,7 @@ #include #include -#include +#include "libmemcached-1.0/memcached.h" #include "utilities.h" diff --git a/src/bin/ms_conn.h b/src/bin/ms_conn.h index 943965ca..d0530a7c 100644 --- a/src/bin/ms_conn.h +++ b/src/bin/ms_conn.h @@ -17,7 +17,7 @@ #include #include "ms_task.h" -#include +#include "libmemcachedprotocol-0.0/binary.h" #ifdef __cplusplus extern "C" { diff --git a/src/bin/ms_setting.c b/src/bin/ms_setting.c index eafe459a..6cb367a3 100644 --- a/src/bin/ms_setting.c +++ b/src/bin/ms_setting.c @@ -11,7 +11,7 @@ #include "mem_config.h" -#include +#include "libmemcached/memcached.h" #include #include diff --git a/src/bin/utilities.cc b/src/bin/utilities.cc index fe8f501c..c1f34b8e 100644 --- a/src/bin/utilities.cc +++ b/src/bin/utilities.cc @@ -9,7 +9,7 @@ * Summary: * */ -#include +#include "mem_config.h" #include "utilities.h" diff --git a/src/bin/utilities.h b/src/bin/utilities.h index e275fa85..149bd1f4 100644 --- a/src/bin/utilities.h +++ b/src/bin/utilities.h @@ -12,7 +12,7 @@ #pragma once #include -#include +#include "libmemcached-1.0/memcached.h" #include "client_options.h" #if defined(HAVE_SYS_TIME_H) diff --git a/src/libhashkit/CMakeLists.txt b/src/libhashkit/CMakeLists.txt index 08c48351..6decd186 100644 --- a/src/libhashkit/CMakeLists.txt +++ b/src/libhashkit/CMakeLists.txt @@ -23,7 +23,6 @@ add_library(libhashkit SHARED murmur.cc murmur3.cc murmur3_api.cc - nohsieh.cc one_at_a_time.cc rijndael.cc str_algorithm.cc @@ -41,7 +40,9 @@ install(TARGETS libhashkit EXPORT libhashkit LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) export(EXPORT libhashkit) install(EXPORT libhashkit DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake) -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - FILES_MATCHING PATTERN hashkit.h + +install_public_headers( + libhashkit + + hashkit.h ) diff --git a/src/libhashkit/behavior.cc b/src/libhashkit/behavior.cc index 6c7a9aca..04d1bba5 100644 --- a/src/libhashkit/behavior.cc +++ b/src/libhashkit/behavior.cc @@ -35,4 +35,4 @@ */ -#include +#include "libhashkit/common.h" diff --git a/src/libhashkit/common.h b/src/libhashkit/common.h index d32d31bc..fd3751a2 100644 --- a/src/libhashkit/common.h +++ b/src/libhashkit/common.h @@ -51,7 +51,7 @@ # endif #endif -#include +#include "libhashkit-1.0/hashkit.h" #include "libhashkit/algorithm.h" #include "libhashkit/is.h" #include "libhashkit/string.h" diff --git a/src/libhashkit/crc32.cc b/src/libhashkit/crc32.cc index fe9fe711..5938b363 100644 --- a/src/libhashkit/crc32.cc +++ b/src/libhashkit/crc32.cc @@ -40,7 +40,7 @@ * src/usr.bin/cksum/crc32.c. */ -#include +#include "libhashkit/common.h" static const uint32_t crc32tab[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, diff --git a/src/libhashkit/digest.cc b/src/libhashkit/digest.cc index 23002934..3afc2a5f 100644 --- a/src/libhashkit/digest.cc +++ b/src/libhashkit/digest.cc @@ -35,7 +35,7 @@ */ -#include +#include "libhashkit/common.h" uint32_t hashkit_digest(const hashkit_st *self, const char *key, size_t key_length) { diff --git a/src/libhashkit/encrypt.cc b/src/libhashkit/encrypt.cc index 95475d7b..7555640e 100644 --- a/src/libhashkit/encrypt.cc +++ b/src/libhashkit/encrypt.cc @@ -35,7 +35,7 @@ */ -#include +#include "libhashkit/common.h" hashkit_string_st *hashkit_encrypt(hashkit_st *kit, const char* source, size_t source_length) diff --git a/src/libhashkit/fnv_32.cc b/src/libhashkit/fnv_32.cc index 52eea80d..9d433f00 100644 --- a/src/libhashkit/fnv_32.cc +++ b/src/libhashkit/fnv_32.cc @@ -36,7 +36,7 @@ */ -#include +#include "libhashkit/common.h" /* FNV hash'es lifted from Dustin Sallings work */ static uint32_t FNV_32_INIT= 2166136261UL; diff --git a/src/libhashkit/fnv_64.cc b/src/libhashkit/fnv_64.cc index 68e4dd07..85a24f80 100644 --- a/src/libhashkit/fnv_64.cc +++ b/src/libhashkit/fnv_64.cc @@ -36,7 +36,7 @@ */ -#include +#include "libhashkit/common.h" #if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH) diff --git a/src/libhashkit/function.cc b/src/libhashkit/function.cc index 3d530ae9..c1eac358 100644 --- a/src/libhashkit/function.cc +++ b/src/libhashkit/function.cc @@ -6,7 +6,7 @@ * the COPYING file in the parent directory for full text. */ -#include +#include "libhashkit/common.h" static hashkit_return_t _set_function(struct hashkit_st::hashkit_function_st *self, hashkit_hash_algorithm_t hash_algorithm) { diff --git a/src/libhashkit/has.cc b/src/libhashkit/has.cc index 843e32e4..93a1204e 100644 --- a/src/libhashkit/has.cc +++ b/src/libhashkit/has.cc @@ -36,7 +36,7 @@ */ -#include +#include "libhashkit/common.h" bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo) { diff --git a/src/libhashkit/hashkit.cc b/src/libhashkit/hashkit.cc index e2528b97..dbfeacc0 100644 --- a/src/libhashkit/hashkit.cc +++ b/src/libhashkit/hashkit.cc @@ -36,7 +36,7 @@ */ -#include +#include "libhashkit/common.h" static inline void _hashkit_init(hashkit_st *self) { diff --git a/src/libhashkit/hashkit.h b/src/libhashkit/hashkit.h index 692d5915..48c99366 100644 --- a/src/libhashkit/hashkit.h +++ b/src/libhashkit/hashkit.h @@ -37,4 +37,4 @@ #pragma once -#include +#include "libhashkit-1.0/hashkit.h" diff --git a/src/libhashkit/hsieh.cc b/src/libhashkit/hsieh.cc index ca88f8d6..43800a49 100644 --- a/src/libhashkit/hsieh.cc +++ b/src/libhashkit/hsieh.cc @@ -42,7 +42,7 @@ * http://www.azillionmonkeys.com/qed/hash.html */ -#include +#include "libhashkit/common.h" #undef get16bits #if (defined(__GNUC__) && defined(__i386__)) diff --git a/src/libhashkit/jenkins.cc b/src/libhashkit/jenkins.cc index 3c6558a4..a08287db 100644 --- a/src/libhashkit/jenkins.cc +++ b/src/libhashkit/jenkins.cc @@ -48,7 +48,7 @@ * Add big endian support */ -#include +#include "libhashkit/common.h" #define hashsize(n) ((uint32_t)1<<(n)) #define hashmask(n) (hashsize(n)-1) diff --git a/src/libhashkit/ketama.cc b/src/libhashkit/ketama.cc index eaa8442c..11e6222b 100644 --- a/src/libhashkit/ketama.cc +++ b/src/libhashkit/ketama.cc @@ -36,7 +36,7 @@ */ -#include +#include "libhashkit/common.h" #include #if 0 diff --git a/src/libhashkit/md5.cc b/src/libhashkit/md5.cc index ef867766..d17b6c25 100644 --- a/src/libhashkit/md5.cc +++ b/src/libhashkit/md5.cc @@ -66,7 +66,7 @@ These notices must be retained in any copies of any part of this documentation and/or software. */ -#include +#include "libhashkit/common.h" #include #include diff --git a/src/libhashkit/murmur.cc b/src/libhashkit/murmur.cc index f3e8fe6a..a2ff5216 100644 --- a/src/libhashkit/murmur.cc +++ b/src/libhashkit/murmur.cc @@ -52,7 +52,7 @@ Updated to murmur2 hash - BP */ -#include +#include "libhashkit/common.h" #ifdef HAVE_MURMUR_HASH diff --git a/src/libhashkit/nohsieh.cc b/src/libhashkit/nohsieh.cc index 8def9939..6b0f767f 100644 --- a/src/libhashkit/nohsieh.cc +++ b/src/libhashkit/nohsieh.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libhashkit/common.h" #ifdef HAVE_HSIEH_HASH #error "not supported" diff --git a/src/libhashkit/one_at_a_time.cc b/src/libhashkit/one_at_a_time.cc index 647f3c18..bd66c920 100644 --- a/src/libhashkit/one_at_a_time.cc +++ b/src/libhashkit/one_at_a_time.cc @@ -41,7 +41,7 @@ http://en.wikipedia.org/wiki/Jenkins_hash_function */ -#include +#include "libhashkit/common.h" uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context) { diff --git a/src/libhashkit/str_algorithm.cc b/src/libhashkit/str_algorithm.cc index b84a0bb7..e5552f64 100644 --- a/src/libhashkit/str_algorithm.cc +++ b/src/libhashkit/str_algorithm.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libhashkit/common.h" const char * libhashkit_string_hash(hashkit_hash_algorithm_t type) { diff --git a/src/libhashkit/strerror.cc b/src/libhashkit/strerror.cc index f67e5c5d..5f905bc4 100644 --- a/src/libhashkit/strerror.cc +++ b/src/libhashkit/strerror.cc @@ -37,7 +37,7 @@ -#include +#include "libhashkit/common.h" const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc) { diff --git a/src/libhashkit/string.cc b/src/libhashkit/string.cc index 05bbdc58..e59c1649 100644 --- a/src/libhashkit/string.cc +++ b/src/libhashkit/string.cc @@ -35,7 +35,7 @@ */ -#include +#include "libhashkit/common.h" #include #include diff --git a/src/libmemcached/CMakeLists.txt b/src/libmemcached/CMakeLists.txt index e39c2f69..e3bcfbe7 100644 --- a/src/libmemcached/CMakeLists.txt +++ b/src/libmemcached/CMakeLists.txt @@ -77,12 +77,12 @@ install(TARGETS libmemcached EXPORT libmemcached export(EXPORT libmemcached) install(EXPORT libmemcached DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake) -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - FILES_MATCHING REGEX "(memcached|util)\\.h(pp)?" - PATTERN csl EXCLUDE - PATTERN memcached EXCLUDE - PATTERN util EXCLUDE +install_public_headers( + libmemcached + + memcached.h + memcached.hpp + util.h ) # FIXME: dtrace diff --git a/src/libmemcached/allocators.cc b/src/libmemcached/allocators.cc index f1caf71e..2bf5f6d1 100644 --- a/src/libmemcached/allocators.cc +++ b/src/libmemcached/allocators.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" void _libmemcached_free(const memcached_st*, void *mem, void*) { diff --git a/src/libmemcached/analyze.cc b/src/libmemcached/analyze.cc index c6ac15c2..c7a74757 100644 --- a/src/libmemcached/analyze.cc +++ b/src/libmemcached/analyze.cc @@ -1,4 +1,4 @@ -#include +#include "libmemcached/common.h" static void calc_largest_consumption(memcached_analysis_st *result, const uint32_t server_num, diff --git a/src/libmemcached/array.c b/src/libmemcached/array.c index cd472c39..62c85ece 100644 --- a/src/libmemcached/array.c +++ b/src/libmemcached/array.c @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" #include #include diff --git a/src/libmemcached/assert.hpp b/src/libmemcached/assert.hpp index cd4a194b..a1526bab 100644 --- a/src/libmemcached/assert.hpp +++ b/src/libmemcached/assert.hpp @@ -62,7 +62,7 @@ # include #endif -# include +# include "libmemcached/backtrace.hpp" # define assert_msg(__expr, __mesg) \ do \ diff --git a/src/libmemcached/auto.cc b/src/libmemcached/auto.cc index 06e7ab64..1d829f68 100644 --- a/src/libmemcached/auto.cc +++ b/src/libmemcached/auto.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" static void auto_response(memcached_instance_st* instance, const bool reply, memcached_return_t& rc, uint64_t* value) { diff --git a/src/libmemcached/behavior.cc b/src/libmemcached/behavior.cc index 7536248e..07ad1c46 100644 --- a/src/libmemcached/behavior.cc +++ b/src/libmemcached/behavior.cc @@ -35,9 +35,9 @@ * */ -#include -#include -#include +#include "libmemcached/common.h" +#include "libmemcached/options.hpp" +#include "libmemcached/virtual_bucket.h" #include #include diff --git a/src/libmemcached/callback.cc b/src/libmemcached/callback.cc index a43eef93..b7cc127b 100644 --- a/src/libmemcached/callback.cc +++ b/src/libmemcached/callback.cc @@ -9,7 +9,7 @@ * */ -#include +#include "libmemcached/common.h" #include #ifndef __INTEL_COMPILER diff --git a/src/libmemcached/common.h b/src/libmemcached/common.h index 8cedc521..e62709b2 100644 --- a/src/libmemcached/common.h +++ b/src/libmemcached/common.h @@ -42,7 +42,7 @@ #pragma once -#include +#include "mem_config.h" #ifdef __cplusplus # include @@ -111,7 +111,7 @@ # include "libmemcached/windows.hpp" #endif -#include +#include "libmemcached-1.0/memcached.h" #include "libmemcached/watchpoint.h" #include "libmemcached/is.h" typedef struct memcached_st Memcached; diff --git a/src/libmemcached/connect.cc b/src/libmemcached/connect.cc index 1cfe7940..4c4b1dff 100644 --- a/src/libmemcached/connect.cc +++ b/src/libmemcached/connect.cc @@ -36,7 +36,7 @@ */ -#include +#include "libmemcached/common.h" #include diff --git a/src/libmemcached/csl/common.h b/src/libmemcached/csl/common.h index 60b27d6e..667ac849 100644 --- a/src/libmemcached/csl/common.h +++ b/src/libmemcached/csl/common.h @@ -47,6 +47,6 @@ typedef void* yyscan_t; #endif -#include -#include +#include "libmemcached/common.h" +#include "libmemcached/csl/server.h" diff --git a/src/libmemcached/csl/context.cc b/src/libmemcached/csl/context.cc index fa2500be..1fd25212 100644 --- a/src/libmemcached/csl/context.cc +++ b/src/libmemcached/csl/context.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "libmemcached/csl/common.h" +#include "libmemcached/csl/context.h" void Context::abort(const char *error_arg, config_tokentype last_token, const char *last_token_str) { diff --git a/src/libmemcached/csl/parser.yy b/src/libmemcached/csl/parser.yy index 87fe4f3b..8d2835a1 100644 --- a/src/libmemcached/csl/parser.yy +++ b/src/libmemcached/csl/parser.yy @@ -36,7 +36,7 @@ %{ -#include +#include "libmemcached/csl/common.h" class Context; @@ -58,11 +58,11 @@ class Context; %{ -#include +#include "libmemcached/options.hpp" -#include -#include -#include +#include "libmemcached/csl/context.h" +#include "libmemcached/csl/symbol.h" +#include "libmemcached/csl/scanner.h" #ifndef __INTEL_COMPILER # pragma GCC diagnostic ignored "-Wold-style-cast" diff --git a/src/libmemcached/csl/scanner.l b/src/libmemcached/csl/scanner.l index d82af27c..af1d2bf8 100644 --- a/src/libmemcached/csl/scanner.l +++ b/src/libmemcached/csl/scanner.l @@ -37,10 +37,10 @@ %top{ -#include -#include -#include -#include +#include "libmemcached/csl/common.h" +#include "libmemcached/csl/context.h" +#include "libmemcached/csl/parser.h" +#include "libmemcached/csl/symbol.h" #ifndef __INTEL_COMPILER #pragma GCC diagnostic ignored "-Wold-style-cast" diff --git a/src/libmemcached/csl/symbol.h b/src/libmemcached/csl/symbol.h index 10ff603a..c185afdd 100644 --- a/src/libmemcached/csl/symbol.h +++ b/src/libmemcached/csl/symbol.h @@ -37,7 +37,7 @@ #pragma once -#include +#include "libmemcached/csl/common.h" union CONFIG_STYPE { diff --git a/src/libmemcached/delete.cc b/src/libmemcached/delete.cc index ef1d8472..fc0f6ddc 100644 --- a/src/libmemcached/delete.cc +++ b/src/libmemcached/delete.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" memcached_return_t memcached_delete(memcached_st *shell, const char *key, size_t key_length, time_t expiration) diff --git a/src/libmemcached/do.cc b/src/libmemcached/do.cc index 59f9d5a3..19ccd1bb 100644 --- a/src/libmemcached/do.cc +++ b/src/libmemcached/do.cc @@ -9,7 +9,7 @@ * */ -#include +#include "libmemcached/common.h" static memcached_return_t _vdo_udp(memcached_instance_st* instance, libmemcached_io_vector_st vector[], diff --git a/src/libmemcached/dump.cc b/src/libmemcached/dump.cc index c0c4ed63..2e6aa631 100644 --- a/src/libmemcached/dump.cc +++ b/src/libmemcached/dump.cc @@ -42,7 +42,7 @@ all slabs on servers and "grab" the keys. */ -#include +#include "libmemcached/common.h" static memcached_return_t ascii_dump(Memcached *memc, memcached_dump_fn *callback, void *context, uint32_t number_of_callbacks) { diff --git a/src/libmemcached/encoding_key.cc b/src/libmemcached/encoding_key.cc index 1e17d507..c0b99ab9 100644 --- a/src/libmemcached/encoding_key.cc +++ b/src/libmemcached/encoding_key.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "libmemcached/common.h" +#include "libmemcached/assert.hpp" static void _set_encoding_key(Memcached& memc, const char *key, size_t key_length) { diff --git a/src/libmemcached/error.cc b/src/libmemcached/error.cc index 3de8ece5..f0f0d97c 100644 --- a/src/libmemcached/error.cc +++ b/src/libmemcached/error.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" #include "libmemcached/assert.hpp" diff --git a/src/libmemcached/exist.cc b/src/libmemcached/exist.cc index 5cb99e60..c5aef71c 100644 --- a/src/libmemcached/exist.cc +++ b/src/libmemcached/exist.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libmemcached/common.h" static memcached_return_t ascii_exist(Memcached *memc, memcached_instance_st* instance, const char *key, size_t key_length) { diff --git a/src/libmemcached/fetch.cc b/src/libmemcached/fetch.cc index d7951092..2303688c 100644 --- a/src/libmemcached/fetch.cc +++ b/src/libmemcached/fetch.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" char *memcached_fetch(memcached_st *shell, char *key, size_t *key_length, size_t *value_length, diff --git a/src/libmemcached/flag.cc b/src/libmemcached/flag.cc index 09b401e6..99327541 100644 --- a/src/libmemcached/flag.cc +++ b/src/libmemcached/flag.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libmemcached/common.h" bool memcached_flag(const memcached_st& memc, const memcached_flag_t flag) { diff --git a/src/libmemcached/flush.cc b/src/libmemcached/flush.cc index 9702771f..82b8b8f6 100644 --- a/src/libmemcached/flush.cc +++ b/src/libmemcached/flush.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libmemcached/common.h" static memcached_return_t memcached_flush_binary(Memcached *ptr, time_t expiration, diff --git a/src/libmemcached/flush_buffers.cc b/src/libmemcached/flush_buffers.cc index 24f7c0df..d40bd327 100644 --- a/src/libmemcached/flush_buffers.cc +++ b/src/libmemcached/flush_buffers.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" memcached_return_t memcached_flush_buffers(memcached_st *shell) { diff --git a/src/libmemcached/get.cc b/src/libmemcached/get.cc index 86d8cf2e..57e2ae72 100644 --- a/src/libmemcached/get.cc +++ b/src/libmemcached/get.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" /* What happens if no servers exist? diff --git a/src/libmemcached/hash.cc b/src/libmemcached/hash.cc index 4e02312e..aa5dbfaf 100644 --- a/src/libmemcached/hash.cc +++ b/src/libmemcached/hash.cc @@ -36,11 +36,11 @@ */ -#include +#include "libmemcached/common.h" #include -#include +#include "libmemcached/virtual_bucket.h" uint32_t memcached_generate_hash_value(const char *key, size_t key_length, memcached_hash_t hash_algorithm) { diff --git a/src/libmemcached/hosts.cc b/src/libmemcached/hosts.cc index 98cb3f7d..630a52d0 100644 --- a/src/libmemcached/hosts.cc +++ b/src/libmemcached/hosts.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" #include "libmemcached/assert.hpp" #include diff --git a/src/libmemcached/initialize_query.cc b/src/libmemcached/initialize_query.cc index cef8e575..34daa4e9 100644 --- a/src/libmemcached/initialize_query.cc +++ b/src/libmemcached/initialize_query.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libmemcached/common.h" memcached_return_t initialize_query(Memcached *self, bool increment_query_id) { diff --git a/src/libmemcached/instance.cc b/src/libmemcached/instance.cc index df08c606..751188c7 100644 --- a/src/libmemcached/instance.cc +++ b/src/libmemcached/instance.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" static inline void _server_init(memcached_instance_st* self, Memcached *root, const memcached_string_t& hostname, diff --git a/src/libmemcached/io.cc b/src/libmemcached/io.cc index 13c8cf31..79007aaf 100644 --- a/src/libmemcached/io.cc +++ b/src/libmemcached/io.cc @@ -37,7 +37,7 @@ */ -#include +#include "libmemcached/common.h" #ifdef HAVE_SYS_SOCKET_H # include diff --git a/src/libmemcached/key.cc b/src/libmemcached/key.cc index cec0eece..0848c796 100644 --- a/src/libmemcached/key.cc +++ b/src/libmemcached/key.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool) { diff --git a/src/libmemcached/memcached.cc b/src/libmemcached/memcached.cc index 6e88c257..c39ca019 100644 --- a/src/libmemcached/memcached.cc +++ b/src/libmemcached/memcached.cc @@ -35,10 +35,10 @@ * */ -#include +#include "libmemcached/common.h" -#include -#include +#include "libmemcached/options.hpp" +#include "libmemcached/virtual_bucket.h" static inline bool _memcached_init(Memcached *self) { diff --git a/src/libmemcached/memcached.h b/src/libmemcached/memcached.h index a45077ee..01126042 100644 --- a/src/libmemcached/memcached.h +++ b/src/libmemcached/memcached.h @@ -36,4 +36,4 @@ #pragma once -#include +#include "libmemcached-1.0/memcached.h" diff --git a/src/libmemcached/memcached.hpp b/src/libmemcached/memcached.hpp index d38e6d24..75275be1 100644 --- a/src/libmemcached/memcached.hpp +++ b/src/libmemcached/memcached.hpp @@ -36,5 +36,5 @@ #pragma once -#include +#include "libmemcached-1.0/memcached.hpp" diff --git a/src/libmemcached/memcached/README.txt b/src/libmemcached/memcached/README.txt deleted file mode 100644 index adcac807..00000000 --- a/src/libmemcached/memcached/README.txt +++ /dev/null @@ -1,7 +0,0 @@ -For your convenience libmemcached contains a copy of protocol_binary.h so that -you may compile libmemcached without having a memcached server with support -for the binary protocol installed on your computer. Please do not modify this -fine, but replace it with a fresh copy from a new distribution if they are -out of sync. - -Trond Norbye diff --git a/src/libmemcached/memcached/protocol_binary.h b/src/libmemcached/memcached/protocol_binary.h deleted file mode 100644 index 51e2c422..00000000 --- a/src/libmemcached/memcached/protocol_binary.h +++ /dev/null @@ -1,728 +0,0 @@ -/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ -/* - * Copyright (c) <2008>, Sun Microsystems, Inc. - * All rights reserved. - * - * 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. - * * Neither the name of the nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY SUN MICROSYSTEMS, INC. ``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 SUN MICROSYSTEMS, INC. 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: Constants used by to implement the binary protocol. - * - * Copy: See Copyright for the status of this software. - * - * Author: Trond Norbye - */ - -#ifndef PROTOCOL_BINARY_H -#define PROTOCOL_BINARY_H - -#include - -/** - * \addtogroup Protocol - * @{ - */ - -/** - * This file contains definitions of the constants and packet formats - * defined in the binary specification. Please note that you _MUST_ remember - * to convert each multibyte field to / from network byte order to / from - * host order. - */ -#ifdef __cplusplus -extern "C" -{ -#endif - - /** - * Definition of the legal "magic" values used in a packet. - * See section 3.1 Magic byte - */ - typedef enum { - PROTOCOL_BINARY_REQ = 0x80, - PROTOCOL_BINARY_RES = 0x81 - } protocol_binary_magic; - - /** - * Definition of the valid response status numbers. - * See section 3.2 Response Status - */ - typedef enum { - PROTOCOL_BINARY_RESPONSE_SUCCESS = 0x00, - PROTOCOL_BINARY_RESPONSE_KEY_ENOENT = 0x01, - PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS = 0x02, - PROTOCOL_BINARY_RESPONSE_E2BIG = 0x03, - PROTOCOL_BINARY_RESPONSE_EINVAL = 0x04, - PROTOCOL_BINARY_RESPONSE_NOT_STORED = 0x05, - PROTOCOL_BINARY_RESPONSE_DELTA_BADVAL = 0x06, - PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET = 0x07, - PROTOCOL_BINARY_RESPONSE_AUTH_ERROR = 0x20, - PROTOCOL_BINARY_RESPONSE_AUTH_CONTINUE = 0x21, - PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND = 0x81, - PROTOCOL_BINARY_RESPONSE_ENOMEM = 0x82, - PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED = 0x83, - PROTOCOL_BINARY_RESPONSE_EINTERNAL = 0x84, - PROTOCOL_BINARY_RESPONSE_EBUSY = 0x85, - PROTOCOL_BINARY_RESPONSE_ETMPFAIL = 0x86 - } protocol_binary_response_status; - - /** - * Defintion of the different command opcodes. - * See section 3.3 Command Opcodes - */ - typedef enum { - PROTOCOL_BINARY_CMD_GET = 0x00, - PROTOCOL_BINARY_CMD_SET = 0x01, - PROTOCOL_BINARY_CMD_ADD = 0x02, - PROTOCOL_BINARY_CMD_REPLACE = 0x03, - PROTOCOL_BINARY_CMD_DELETE = 0x04, - PROTOCOL_BINARY_CMD_INCREMENT = 0x05, - PROTOCOL_BINARY_CMD_DECREMENT = 0x06, - PROTOCOL_BINARY_CMD_QUIT = 0x07, - PROTOCOL_BINARY_CMD_FLUSH = 0x08, - PROTOCOL_BINARY_CMD_GETQ = 0x09, - PROTOCOL_BINARY_CMD_NOOP = 0x0a, - PROTOCOL_BINARY_CMD_VERSION = 0x0b, - PROTOCOL_BINARY_CMD_GETK = 0x0c, - PROTOCOL_BINARY_CMD_GETKQ = 0x0d, - PROTOCOL_BINARY_CMD_APPEND = 0x0e, - PROTOCOL_BINARY_CMD_PREPEND = 0x0f, - PROTOCOL_BINARY_CMD_STAT = 0x10, - PROTOCOL_BINARY_CMD_SETQ = 0x11, - PROTOCOL_BINARY_CMD_ADDQ = 0x12, - PROTOCOL_BINARY_CMD_REPLACEQ = 0x13, - PROTOCOL_BINARY_CMD_DELETEQ = 0x14, - PROTOCOL_BINARY_CMD_INCREMENTQ = 0x15, - PROTOCOL_BINARY_CMD_DECREMENTQ = 0x16, - PROTOCOL_BINARY_CMD_QUITQ = 0x17, - PROTOCOL_BINARY_CMD_FLUSHQ = 0x18, - PROTOCOL_BINARY_CMD_APPENDQ = 0x19, - PROTOCOL_BINARY_CMD_PREPENDQ = 0x1a, - PROTOCOL_BINARY_CMD_VERBOSITY = 0x1b, - PROTOCOL_BINARY_CMD_TOUCH = 0x1c, - PROTOCOL_BINARY_CMD_GAT = 0x1d, - PROTOCOL_BINARY_CMD_GATQ = 0x1e, - PROTOCOL_BINARY_CMD_GATK = 0x23, - PROTOCOL_BINARY_CMD_GATKQ = 0x24, - - PROTOCOL_BINARY_CMD_SASL_LIST_MECHS = 0x20, - PROTOCOL_BINARY_CMD_SASL_AUTH = 0x21, - PROTOCOL_BINARY_CMD_SASL_STEP = 0x22, - - /* These commands are used for range operations and exist within - * this header for use in other projects. Range operations are - * not expected to be implemented in the memcached server itself. - */ - PROTOCOL_BINARY_CMD_RGET = 0x30, - PROTOCOL_BINARY_CMD_RSET = 0x31, - PROTOCOL_BINARY_CMD_RSETQ = 0x32, - PROTOCOL_BINARY_CMD_RAPPEND = 0x33, - PROTOCOL_BINARY_CMD_RAPPENDQ = 0x34, - PROTOCOL_BINARY_CMD_RPREPEND = 0x35, - PROTOCOL_BINARY_CMD_RPREPENDQ = 0x36, - PROTOCOL_BINARY_CMD_RDELETE = 0x37, - PROTOCOL_BINARY_CMD_RDELETEQ = 0x38, - PROTOCOL_BINARY_CMD_RINCR = 0x39, - PROTOCOL_BINARY_CMD_RINCRQ = 0x3a, - PROTOCOL_BINARY_CMD_RDECR = 0x3b, - PROTOCOL_BINARY_CMD_RDECRQ = 0x3c, - /* End Range operations */ - - /* VBucket commands */ - PROTOCOL_BINARY_CMD_SET_VBUCKET = 0x3d, - PROTOCOL_BINARY_CMD_GET_VBUCKET = 0x3e, - PROTOCOL_BINARY_CMD_DEL_VBUCKET = 0x3f, - /* End VBucket commands */ - - /* TAP commands */ - PROTOCOL_BINARY_CMD_TAP_CONNECT = 0x40, - PROTOCOL_BINARY_CMD_TAP_MUTATION = 0x41, - PROTOCOL_BINARY_CMD_TAP_DELETE = 0x42, - PROTOCOL_BINARY_CMD_TAP_FLUSH = 0x43, - PROTOCOL_BINARY_CMD_TAP_OPAQUE = 0x44, - PROTOCOL_BINARY_CMD_TAP_VBUCKET_SET = 0x45, - PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START = 0x46, - PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END = 0x47, - /* End TAP */ - - PROTOCOL_BINARY_CMD_LAST_RESERVED = 0xef, - - /* Scrub the data */ - PROTOCOL_BINARY_CMD_SCRUB = 0xf0 - } protocol_binary_command; - - /** - * Definition of the data types in the packet - * See section 3.4 Data Types - */ - typedef enum { - PROTOCOL_BINARY_RAW_BYTES = 0x00 - } protocol_binary_datatypes; - - /** - * Definition of the header structure for a request packet. - * See section 2 - */ - typedef union { - struct { - uint8_t magic; - uint8_t opcode; - uint16_t keylen; - uint8_t extlen; - uint8_t datatype; - uint16_t vbucket; - uint32_t bodylen; - uint32_t opaque; - uint64_t cas; - } request; - uint8_t bytes[24]; - } protocol_binary_request_header; - - /** - * Definition of the header structure for a response packet. - * See section 2 - */ - typedef union { - struct { - uint8_t magic; - uint8_t opcode; - uint16_t keylen; - uint8_t extlen; - uint8_t datatype; - uint16_t status; - uint32_t bodylen; - uint32_t opaque; - uint64_t cas; - } response; - uint8_t bytes[24]; - } protocol_binary_response_header; - - /** - * Definition of a request-packet containing no extras - */ - union protocol_binary_request_no_extras { - struct { - protocol_binary_request_header header; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header)]; - }; - typedef union protocol_binary_request_no_extras protocol_binary_request_no_extras; - - /** - * Definition of a response-packet containing no extras - */ - typedef union { - struct { - protocol_binary_response_header header; - } message; - uint8_t bytes[sizeof(protocol_binary_response_header)]; - } protocol_binary_response_no_extras; - - /** - * Definition of the packet used by the get, getq, getk and getkq command. - * See section 4 - */ - typedef protocol_binary_request_no_extras protocol_binary_request_get; - typedef protocol_binary_request_no_extras protocol_binary_request_getq; - typedef protocol_binary_request_no_extras protocol_binary_request_getk; - typedef protocol_binary_request_no_extras protocol_binary_request_getkq; - - /** - * Definition of the packet returned from a successful get, getq, getk and - * getkq. - * See section 4 - */ - typedef union { - struct { - protocol_binary_response_header header; - struct { - uint32_t flags; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_response_header) + 4]; - } protocol_binary_response_get; - - typedef protocol_binary_response_get protocol_binary_response_getq; - typedef protocol_binary_response_get protocol_binary_response_getk; - typedef protocol_binary_response_get protocol_binary_response_getkq; - - /** - * Definition of the packet used by the delete command - * See section 4 - */ - typedef protocol_binary_request_no_extras protocol_binary_request_delete; - - /** - * Definition of the packet returned by the delete command - * See section 4 - */ - typedef protocol_binary_response_no_extras protocol_binary_response_delete; - - /** - * Definition of the packet used by the flush command - * See section 4 - * Please note that the expiration field is optional, so remember to see - * check the header.bodysize to see if it is present. - */ - typedef union { - struct { - protocol_binary_request_header header; - struct { - uint32_t expiration; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; - } protocol_binary_request_flush; - - /** - * Definition of the packet returned by the flush command - * See section 4 - */ - typedef protocol_binary_response_no_extras protocol_binary_response_flush; - - /** - * Definition of the packet used by set, add and replace - * See section 4 - */ - typedef union { - struct { - protocol_binary_request_header header; - struct { - uint32_t flags; - uint32_t expiration; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 8]; - } protocol_binary_request_set; - typedef protocol_binary_request_set protocol_binary_request_add; - typedef protocol_binary_request_set protocol_binary_request_replace; - - /** - * Definition of the packet returned by set, add and replace - * See section 4 - */ - typedef protocol_binary_response_no_extras protocol_binary_response_set; - typedef protocol_binary_response_no_extras protocol_binary_response_add; - typedef protocol_binary_response_no_extras protocol_binary_response_replace; - - /** - * Definition of the noop packet - * See section 4 - */ - typedef protocol_binary_request_no_extras protocol_binary_request_noop; - - /** - * Definition of the packet returned by the noop command - * See section 4 - */ - typedef protocol_binary_response_no_extras protocol_binary_response_noop; - - /** - * Definition of the structure used by the increment and decrement - * command. - * See section 4 - */ - typedef union { - struct { - protocol_binary_request_header header; - struct { - uint64_t delta; - uint64_t initial; - uint32_t expiration; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 20]; - } protocol_binary_request_incr; - typedef protocol_binary_request_incr protocol_binary_request_decr; - - /** - * Definition of the response from an incr or decr command - * command. - * See section 4 - */ - typedef union { - struct { - protocol_binary_response_header header; - struct { - uint64_t value; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_response_header) + 8]; - } protocol_binary_response_incr; - typedef protocol_binary_response_incr protocol_binary_response_decr; - - /** - * Definition of the quit - * See section 4 - */ - typedef protocol_binary_request_no_extras protocol_binary_request_quit; - - /** - * Definition of the packet returned by the quit command - * See section 4 - */ - typedef protocol_binary_response_no_extras protocol_binary_response_quit; - - /** - * Definition of the packet used by append and prepend command - * See section 4 - */ - typedef protocol_binary_request_no_extras protocol_binary_request_append; - typedef protocol_binary_request_no_extras protocol_binary_request_prepend; - - /** - * Definition of the packet returned from a successful append or prepend - * See section 4 - */ - typedef protocol_binary_response_no_extras protocol_binary_response_append; - typedef protocol_binary_response_no_extras protocol_binary_response_prepend; - - /** - * Definition of the packet used by the version command - * See section 4 - */ - typedef protocol_binary_request_no_extras protocol_binary_request_version; - - /** - * Definition of the packet returned from a successful version command - * See section 4 - */ - typedef protocol_binary_response_no_extras protocol_binary_response_version; - - - /** - * Definition of the packet used by the stats command. - * See section 4 - */ - typedef protocol_binary_request_no_extras protocol_binary_request_stats; - - /** - * Definition of the packet returned from a successful stats command - * See section 4 - */ - typedef protocol_binary_response_no_extras protocol_binary_response_stats; - - /** - * Definition of the packet used by the verbosity command - */ - typedef union { - struct { - protocol_binary_request_header header; - struct { - uint32_t level; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; - } protocol_binary_request_verbosity; - - /** - * Definition of the packet returned from the verbosity command - */ - typedef protocol_binary_response_no_extras protocol_binary_response_verbosity; - - /** - * Definition of the packet used by the touch command. - */ - typedef union { - struct { - protocol_binary_request_header header; - struct { - uint32_t expiration; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; - } protocol_binary_request_touch; - - /** - * Definition of the packet returned from the touch command - */ - typedef protocol_binary_response_no_extras protocol_binary_response_touch; - - /** - * Definition of the packet used by the GAT(Q) command. - */ - typedef union { - struct { - protocol_binary_request_header header; - struct { - uint32_t expiration; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; - } protocol_binary_request_gat; - - typedef protocol_binary_request_gat protocol_binary_request_gatq; - - /** - * Definition of the packet returned from the GAT(Q) - */ - typedef protocol_binary_response_get protocol_binary_response_gat; - typedef protocol_binary_response_get protocol_binary_response_gatq; - - - /** - * Definition of a request for a range operation. - * See http://code.google.com/p/memcached/wiki/RangeOps - * - * These types are used for range operations and exist within - * this header for use in other projects. Range operations are - * not expected to be implemented in the memcached server itself. - */ - typedef union { - struct { - protocol_binary_response_header header; - struct { - uint16_t size; - uint8_t reserved; - uint8_t flags; - uint32_t max_results; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; - } protocol_binary_request_rangeop; - - typedef protocol_binary_request_rangeop protocol_binary_request_rget; - typedef protocol_binary_request_rangeop protocol_binary_request_rset; - typedef protocol_binary_request_rangeop protocol_binary_request_rsetq; - typedef protocol_binary_request_rangeop protocol_binary_request_rappend; - typedef protocol_binary_request_rangeop protocol_binary_request_rappendq; - typedef protocol_binary_request_rangeop protocol_binary_request_rprepend; - typedef protocol_binary_request_rangeop protocol_binary_request_rprependq; - typedef protocol_binary_request_rangeop protocol_binary_request_rdelete; - typedef protocol_binary_request_rangeop protocol_binary_request_rdeleteq; - typedef protocol_binary_request_rangeop protocol_binary_request_rincr; - typedef protocol_binary_request_rangeop protocol_binary_request_rincrq; - typedef protocol_binary_request_rangeop protocol_binary_request_rdecr; - typedef protocol_binary_request_rangeop protocol_binary_request_rdecrq; - - - /** - * Definition of tap commands - * See To be written - * - */ - - typedef union { - struct { - protocol_binary_request_header header; - struct { - /** - * flags is a bitmask used to set properties for the - * the connection. Please In order to be forward compatible - * you should set all undefined bits to 0. - * - * If the bit require extra userdata, it will be stored - * in the user-data field of the body (passed to the engine - * as enginespeciffic). That means that when you parse the - * flags and the engine-specific data, you have to work your - * way from bit 0 and upwards to find the correct offset for - * the data. - * - */ - uint32_t flags; - - /** - * Backfill age - * - * By using this flag you can limit the amount of data being - * transmitted. If you don't specify a backfill age, the - * server will transmit everything it contains. - * - * The first 8 bytes in the engine specific data contains - * the oldest entry (from epoc) you're interested in. - * Specifying a time in the future (for the server you are - * connecting to), will cause it to start streaming current - * changes. - */ -#define TAP_CONNECT_FLAG_BACKFILL 0x01 - /** - * Dump will cause the server to send the data stored on the - * server, but disconnect when the keys stored in the server - * are transmitted. - */ -#define TAP_CONNECT_FLAG_DUMP 0x02 - /** - * The body contains a list of 16 bits words in network byte - * order specifying the vbucket ids to monitor. The first 16 - * bit word contains the number of buckets. The number of 0 - * means "all buckets" - */ -#define TAP_CONNECT_FLAG_LIST_VBUCKETS 0x04 - /** - * The responsibility of the vbuckets is to be transferred - * over to the caller when all items are transferred. - */ -#define TAP_CONNECT_FLAG_TAKEOVER_VBUCKETS 0x08 - /** - * The tap consumer supports ack'ing of tap messages - */ -#define TAP_CONNECT_SUPPORT_ACK 0x10 - /** - * The tap consumer would prefer to just get the keys - * back. If the engine supports this it will set - * the TAP_FLAG_NO_VALUE flag in each of the - * tap packets returned. - */ -#define TAP_CONNECT_REQUEST_KEYS_ONLY 0x20 - /** - * The body contains a list of (vbucket_id, last_checkpoint_id) - * pairs. This provides the checkpoint support in TAP streams. - * The last checkpoint id represents the last checkpoint that - * was successfully persisted. - */ -#define TAP_CONNECT_CHECKPOINT 0x40 - /** - * The tap consumer is a registered tap client, which means that - * the tap server will maintain its checkpoint cursor permanently. - */ -#define TAP_CONNECT_REGISTERED_CLIENT 0x80 - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; - } protocol_binary_request_tap_connect; - - typedef union { - struct { - protocol_binary_request_header header; - struct { - struct { - uint16_t enginespecific_length; - /* - * The flag section support the following flags - */ - /** - * Request that the consumer send a response packet - * for this packet. The opaque field must be preserved - * in the response. - */ -#define TAP_FLAG_ACK 0x01 - /** - * The value for the key is not included in the packet - */ -#define TAP_FLAG_NO_VALUE 0x02 - uint16_t flags; - uint8_t ttl; - uint8_t res1; - uint8_t res2; - uint8_t res3; - } tap; - struct { - uint32_t flags; - uint32_t expiration; - } item; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 16]; - } protocol_binary_request_tap_mutation; - - typedef union { - struct { - protocol_binary_request_header header; - struct { - struct { - uint16_t enginespecific_length; - /** - * See the definition of the flags for - * protocol_binary_request_tap_mutation for a description - * of the available flags. - */ - uint16_t flags; - uint8_t ttl; - uint8_t res1; - uint8_t res2; - uint8_t res3; - } tap; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + 8]; - } protocol_binary_request_tap_no_extras; - - typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_delete; - typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_flush; - typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_opaque; - typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_vbucket_set; - - - /** - * Definition of the packet used by the scrub. - */ - typedef protocol_binary_request_no_extras protocol_binary_request_scrub; - - /** - * Definition of the packet returned from scrub. - */ - typedef protocol_binary_response_no_extras protocol_binary_response_scrub; - - - /** - * Definition of the packet used by set vbucket - */ - typedef union { - struct { - protocol_binary_request_header header; - struct { - vbucket_state_t state; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_request_header) + sizeof(vbucket_state_t)]; - } protocol_binary_request_set_vbucket; - /** - * Definition of the packet returned from set vbucket - */ - typedef protocol_binary_response_no_extras protocol_binary_response_set_vbucket; - /** - * Definition of the packet used by del vbucket - */ - typedef protocol_binary_request_no_extras protocol_binary_request_del_vbucket; - /** - * Definition of the packet returned from del vbucket - */ - typedef protocol_binary_response_no_extras protocol_binary_response_del_vbucket; - - /** - * Definition of the packet used by get vbucket - */ - typedef protocol_binary_request_no_extras protocol_binary_request_get_vbucket; - - /** - * Definition of the packet returned from get vbucket - */ - typedef union { - struct { - protocol_binary_response_header header; - struct { - vbucket_state_t state; - } body; - } message; - uint8_t bytes[sizeof(protocol_binary_response_header) + sizeof(vbucket_state_t)]; - } protocol_binary_response_get_vbucket; - - - /** - * @} - */ - -#ifdef __cplusplus -} -#endif -#endif /* PROTOCOL_BINARY_H */ diff --git a/src/libmemcached/memcached/vbucket.h b/src/libmemcached/memcached/vbucket.h deleted file mode 100644 index e2cc563e..00000000 --- a/src/libmemcached/memcached/vbucket.h +++ /dev/null @@ -1,59 +0,0 @@ -/* 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" -{ -#endif - -typedef enum { - vbucket_state_active = 1, /**< Actively servicing a vbucket. */ - vbucket_state_replica, /**< Servicing a vbucket as a replica only. */ - vbucket_state_pending, /**< Pending active. */ - vbucket_state_dead /**< Not in use, pending deletion. */ -} vbucket_state_t; - -#define is_valid_vbucket_state_t(state) \ - (state == vbucket_state_active || \ - state == vbucket_state_replica || \ - state == vbucket_state_pending || \ - state == vbucket_state_dead) - -#ifdef __cplusplus -} -#endif diff --git a/src/libmemcached/memory.h b/src/libmemcached/memory.h index 12d02849..2a805455 100644 --- a/src/libmemcached/memory.h +++ b/src/libmemcached/memory.h @@ -36,9 +36,9 @@ #pragma once -#include +#include "mem_config.h" -#include +#include "libmemcached/common.h" #ifdef __cplusplus #include diff --git a/src/libmemcached/options.cc b/src/libmemcached/options.cc index 290cfc89..c15187bb 100644 --- a/src/libmemcached/options.cc +++ b/src/libmemcached/options.cc @@ -35,10 +35,10 @@ * */ -#include -#include +#include "libmemcached/common.h" +#include "libmemcached/options.hpp" -#include +#include "libmemcached/csl/context.h" const char *memcached_parse_filename(memcached_st *memc) { diff --git a/src/libmemcached/parse.cc b/src/libmemcached/parse.cc index 7665b731..ef37e539 100644 --- a/src/libmemcached/parse.cc +++ b/src/libmemcached/parse.cc @@ -42,7 +42,7 @@ Frankly its too damn useful not to be here though. */ -#include +#include "libmemcached/common.h" memcached_server_list_st memcached_servers_parse(const char *server_strings) { diff --git a/src/libmemcached/purge.cc b/src/libmemcached/purge.cc index 4dbe24d0..7f54672c 100644 --- a/src/libmemcached/purge.cc +++ b/src/libmemcached/purge.cc @@ -37,7 +37,7 @@ */ -#include +#include "libmemcached/common.h" #define memcached_set_purging(__object, __value) ((__object)->state.is_purging= (__value)) diff --git a/src/libmemcached/quit.cc b/src/libmemcached/quit.cc index 5d17b313..ad16d2c1 100644 --- a/src/libmemcached/quit.cc +++ b/src/libmemcached/quit.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" namespace { memcached_return_t send_quit_message(memcached_instance_st* instance) diff --git a/src/libmemcached/response.cc b/src/libmemcached/response.cc index 3d1e764e..d2e2603f 100644 --- a/src/libmemcached/response.cc +++ b/src/libmemcached/response.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "libmemcached/common.h" +#include "libmemcached/string.hpp" static memcached_return_t textual_value_fetch(memcached_instance_st* instance, char *buffer, diff --git a/src/libmemcached/result.cc b/src/libmemcached/result.cc index 6fa507b2..7f2300cf 100644 --- a/src/libmemcached/result.cc +++ b/src/libmemcached/result.cc @@ -42,7 +42,7 @@ to memcached we will be able to absorb new attributes without having to addjust the entire API. */ -#include +#include "libmemcached/common.h" static inline void _result_init(memcached_result_st *self, Memcached *memc) diff --git a/src/libmemcached/server.cc b/src/libmemcached/server.cc index e2837c7d..bb8420e3 100644 --- a/src/libmemcached/server.cc +++ b/src/libmemcached/server.cc @@ -38,7 +38,7 @@ /* This is a partial implementation for fetching/creating memcached_server_st objects. */ -#include +#include "libmemcached/common.h" static inline void _server_init(memcached_server_st *self, Memcached *root, const memcached_string_t& hostname, diff --git a/src/libmemcached/server_list.cc b/src/libmemcached/server_list.cc index b5d5b72e..d8c9c40a 100644 --- a/src/libmemcached/server_list.cc +++ b/src/libmemcached/server_list.cc @@ -37,7 +37,7 @@ -#include +#include "libmemcached/common.h" memcached_server_list_st memcached_server_list_append_with_weight(memcached_server_list_st ptr, diff --git a/src/libmemcached/stats.cc b/src/libmemcached/stats.cc index 9e6083e9..c07403b4 100644 --- a/src/libmemcached/stats.cc +++ b/src/libmemcached/stats.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libmemcached/common.h" static const char *memcached_stat_keys[] = { "pid", diff --git a/src/libmemcached/storage.cc b/src/libmemcached/storage.cc index 61ca8270..236dd146 100644 --- a/src/libmemcached/storage.cc +++ b/src/libmemcached/storage.cc @@ -36,7 +36,7 @@ */ -#include +#include "libmemcached/common.h" enum memcached_storage_action_t { SET_OP, diff --git a/src/libmemcached/strerror.cc b/src/libmemcached/strerror.cc index c5615ca9..7b3a9df3 100644 --- a/src/libmemcached/strerror.cc +++ b/src/libmemcached/strerror.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" const char *memcached_strerror(const memcached_st *, memcached_return_t rc) { diff --git a/src/libmemcached/string.cc b/src/libmemcached/string.cc index b821aca6..6ac24c78 100644 --- a/src/libmemcached/string.cc +++ b/src/libmemcached/string.cc @@ -36,7 +36,7 @@ */ -#include +#include "libmemcached/common.h" inline static memcached_return_t _string_check(memcached_string_st *string, size_t need) { diff --git a/src/libmemcached/touch.cc b/src/libmemcached/touch.cc index 9e9cbd6e..a4bb585a 100644 --- a/src/libmemcached/touch.cc +++ b/src/libmemcached/touch.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" static memcached_return_t ascii_touch(memcached_instance_st* instance, const char *key, size_t key_length, diff --git a/src/libmemcached/udp.cc b/src/libmemcached/udp.cc index 5d21f9ff..f58b5bb7 100644 --- a/src/libmemcached/udp.cc +++ b/src/libmemcached/udp.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" /* * The udp request id consists of two seperate sections diff --git a/src/libmemcached/util.h b/src/libmemcached/util.h index 03ed6da5..59405b5a 100644 --- a/src/libmemcached/util.h +++ b/src/libmemcached/util.h @@ -36,5 +36,5 @@ #pragma once -#include +#include "libmemcachedutil-1.0/util.h" diff --git a/src/libmemcached/util/Makefile.am b/src/libmemcached/util/Makefile.am deleted file mode 100644 index bbb94ddd..00000000 --- a/src/libmemcached/util/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -EXTRA_DIST= libmemcachedutil.ver - -lib_LTLIBRARIES= - -if BUILD_LIBMEMCACHEDUTIL -lib_LTLIBRARIES+= libmemcachedutil.la -endif - -libmemcachedutil_la_SOURCES= memcached_pool.c -libmemcachedutil_la_LDFLAGS= -version-info $(MEMCACHEDUTIL_LIBRARY_VERSION) $(LD_UTIL_VERSION_SCRIPT) -libmemcachedutil_la_LIBADD= ${top_builddir}/libmemcached/libmemcached.la diff --git a/src/libmemcached/verbosity.cc b/src/libmemcached/verbosity.cc index 43d73744..315ee346 100644 --- a/src/libmemcached/verbosity.cc +++ b/src/libmemcached/verbosity.cc @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" struct context_st { diff --git a/src/libmemcached/version.cc b/src/libmemcached/version.cc index 53d24c1c..6a04b835 100644 --- a/src/libmemcached/version.cc +++ b/src/libmemcached/version.cc @@ -34,7 +34,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -#include +#include "libmemcached/common.h" const char * memcached_lib_version(void) { diff --git a/src/libmemcached/virtual_bucket.c b/src/libmemcached/virtual_bucket.c index 951881bd..e68aa789 100644 --- a/src/libmemcached/virtual_bucket.c +++ b/src/libmemcached/virtual_bucket.c @@ -35,7 +35,7 @@ * */ -#include +#include "libmemcached/common.h" struct bucket_t { uint32_t master; diff --git a/src/libmemcachedprotocol/ascii_handler.c b/src/libmemcachedprotocol/ascii_handler.c index 449b650d..a6ecadab 100644 --- a/src/libmemcachedprotocol/ascii_handler.c +++ b/src/libmemcachedprotocol/ascii_handler.c @@ -34,7 +34,7 @@ * */ -#include +#include "libmemcachedprotocol/common.h" #include #include diff --git a/src/libmemcachedprotocol/binary_handler.c b/src/libmemcachedprotocol/binary_handler.c index d720424a..37cd3778 100644 --- a/src/libmemcachedprotocol/binary_handler.c +++ b/src/libmemcachedprotocol/binary_handler.c @@ -34,7 +34,7 @@ * */ -#include +#include "libmemcachedprotocol/common.h" #include #include diff --git a/src/libmemcachedprotocol/cache.c b/src/libmemcachedprotocol/cache.c index 67c72ead..c68cc254 100644 --- a/src/libmemcachedprotocol/cache.c +++ b/src/libmemcachedprotocol/cache.c @@ -45,7 +45,7 @@ #include #endif -#include +#include "libmemcachedprotocol/common.h" #ifndef NDEBUG const uint64_t redzone_pattern = 0xdeadbeefcafebabe; diff --git a/src/libmemcachedprotocol/common.h b/src/libmemcachedprotocol/common.h index a4ddc2ca..20ebe985 100644 --- a/src/libmemcachedprotocol/common.h +++ b/src/libmemcachedprotocol/common.h @@ -39,10 +39,10 @@ #include "mem_config.h" #include -#include -#include -#include -#include +#include "libmemcachedprotocol-0.0/handler.h" +#include "libmemcachedprotocol/cache.h" +#include "libmemcached/byteorder.h" +#include "libmemcached/socket.hpp" /* * I don't really need the following two functions as function pointers diff --git a/src/libmemcachedprotocol/handler.c b/src/libmemcachedprotocol/handler.c index afd70865..24bd74a9 100644 --- a/src/libmemcachedprotocol/handler.c +++ b/src/libmemcachedprotocol/handler.c @@ -35,7 +35,7 @@ */ /* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ -#include +#include "libmemcachedprotocol/common.h" #include #include diff --git a/src/libmemcachedprotocol/pedantic.c b/src/libmemcachedprotocol/pedantic.c index 54a2add0..cfbc8194 100644 --- a/src/libmemcachedprotocol/pedantic.c +++ b/src/libmemcachedprotocol/pedantic.c @@ -35,7 +35,7 @@ */ /* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ -#include +#include "libmemcachedprotocol/common.h" #include diff --git a/src/libmemcachedutil/flush.cc b/src/libmemcachedutil/flush.cc index 6a99603f..99d07e87 100644 --- a/src/libmemcachedutil/flush.cc +++ b/src/libmemcachedutil/flush.cc @@ -36,7 +36,7 @@ * */ -#include +#include "libmemcachedutil/common.h" bool libmemcached_util_flush(const char *hostname, in_port_t port, memcached_return_t *ret) diff --git a/src/libmemcachedutil/pid.cc b/src/libmemcachedutil/pid.cc index 34656118..eabdd442 100644 --- a/src/libmemcachedutil/pid.cc +++ b/src/libmemcachedutil/pid.cc @@ -37,7 +37,7 @@ * */ -#include +#include "libmemcachedutil/common.h" // Never look at the stat object directly. diff --git a/src/libmemcachedutil/ping.cc b/src/libmemcachedutil/ping.cc index a867c56b..c48037a1 100644 --- a/src/libmemcachedutil/ping.cc +++ b/src/libmemcachedutil/ping.cc @@ -37,7 +37,7 @@ * */ -#include +#include "libmemcachedutil/common.h" bool libmemcached_util_ping(const char *hostname, in_port_t port, memcached_return_t *ret) { diff --git a/src/libmemcachedutil/pool.cc b/src/libmemcachedutil/pool.cc index 8d760246..4a41158c 100644 --- a/src/libmemcachedutil/pool.cc +++ b/src/libmemcachedutil/pool.cc @@ -36,7 +36,7 @@ */ -#include +#include "libmemcachedutil/common.h" #include #include diff --git a/src/libmemcachedutil/version.cc b/src/libmemcachedutil/version.cc index 75a8f60e..91d6cbe9 100644 --- a/src/libmemcachedutil/version.cc +++ b/src/libmemcachedutil/version.cc @@ -36,7 +36,7 @@ */ -#include +#include "libmemcachedutil/common.h" #include struct local_context diff --git a/src/libtest/alarm.cc b/src/libtest/alarm.cc index 6193fbb3..027a646a 100644 --- a/src/libtest/alarm.cc +++ b/src/libtest/alarm.cc @@ -36,7 +36,7 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include #include diff --git a/src/libtest/blobslap_worker.cc b/src/libtest/blobslap_worker.cc index 5100a388..54a0353c 100644 --- a/src/libtest/blobslap_worker.cc +++ b/src/libtest/blobslap_worker.cc @@ -36,9 +36,9 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" -#include +#include "libtest/blobslap_worker.h" #include #include diff --git a/src/libtest/client.cc b/src/libtest/client.cc index c536e9dd..c6e8604e 100644 --- a/src/libtest/client.cc +++ b/src/libtest/client.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include #include diff --git a/src/libtest/collection.cc b/src/libtest/collection.cc index ff9c8869..2bf15fec 100644 --- a/src/libtest/collection.cc +++ b/src/libtest/collection.cc @@ -36,7 +36,7 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" // @todo possibly have this code fork off so if it fails nothing goes bad static test_return_t runner_code(libtest::Framework* frame, diff --git a/src/libtest/collection.h b/src/libtest/collection.h index a9f9cba8..2657449d 100644 --- a/src/libtest/collection.h +++ b/src/libtest/collection.h @@ -36,9 +36,9 @@ #pragma once -#include +#include "libtest/formatter.hpp" -#include +#include "libtest/timer.hpp" namespace { class Framework; } diff --git a/src/libtest/common.h b/src/libtest/common.h index 90d8b6a8..bba458fd 100644 --- a/src/libtest/common.h +++ b/src/libtest/common.h @@ -82,20 +82,20 @@ # define get_socket_errno() errno #endif -#include +#include "libtest/test.hpp" -#include +#include "libtest/is_pid.hpp" -#include -#include -#include -#include +#include "libtest/gearmand.h" +#include "libtest/blobslap_worker.h" +#include "libtest/memcached.h" +#include "libtest/drizzled.h" -#include -#include -#include -#include -#include +#include "libtest/libtool.hpp" +#include "libtest/killpid.h" +#include "libtest/signal.h" +#include "libtest/dns.hpp" +#include "libtest/formatter.hpp" struct FreeFromVector { diff --git a/src/libtest/comparison.cc b/src/libtest/comparison.cc index c0c21937..b9c748ea 100644 --- a/src/libtest/comparison.cc +++ b/src/libtest/comparison.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" namespace libtest { diff --git a/src/libtest/comparison.hpp b/src/libtest/comparison.hpp index 9a7d81c0..b238697c 100644 --- a/src/libtest/comparison.hpp +++ b/src/libtest/comparison.hpp @@ -39,9 +39,9 @@ #include #if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED -#include -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/ostream.hpp" +#include "libtest/memcached.hpp" #endif #if defined(HAVE_LIBGEARMAN) && HAVE_LIBGEARMAN diff --git a/src/libtest/core.cc b/src/libtest/core.cc index 2542f43f..84014956 100644 --- a/src/libtest/core.cc +++ b/src/libtest/core.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" namespace libtest { diff --git a/src/libtest/core_count.cc b/src/libtest/core_count.cc index 36ebc226..40306fdc 100644 --- a/src/libtest/core_count.cc +++ b/src/libtest/core_count.cc @@ -44,7 +44,7 @@ #include #include -#include +#include "libtest/cpu.hpp" static void version_command(const char *command_name, int major_version, int minor_version) { diff --git a/src/libtest/cpu.cc b/src/libtest/cpu.cc index c62d6c25..1ae99a7f 100644 --- a/src/libtest/cpu.cc +++ b/src/libtest/cpu.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include diff --git a/src/libtest/dns.cc b/src/libtest/dns.cc index 75a5bbfb..cbc81123 100644 --- a/src/libtest/dns.cc +++ b/src/libtest/dns.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include #include diff --git a/src/libtest/dream.cc b/src/libtest/dream.cc index 42f9222d..6d42efa9 100644 --- a/src/libtest/dream.cc +++ b/src/libtest/dream.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" namespace libtest { diff --git a/src/libtest/drizzled.cc b/src/libtest/drizzled.cc index 3a93b666..9d58ce7e 100644 --- a/src/libtest/drizzled.cc +++ b/src/libtest/drizzled.cc @@ -35,9 +35,9 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" -#include +#include "libtest/drizzled.h" #include "util/instance.hpp" #include "util/operation.hpp" diff --git a/src/libtest/exception.cc b/src/libtest/exception.cc index 0b18f777..d1fa0768 100644 --- a/src/libtest/exception.cc +++ b/src/libtest/exception.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include namespace libtest { diff --git a/src/libtest/exception/fatal.cc b/src/libtest/exception/fatal.cc index 5a3bab5e..7f391994 100644 --- a/src/libtest/exception/fatal.cc +++ b/src/libtest/exception/fatal.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include "libtest/exception.hpp" #include diff --git a/src/libtest/failed.cc b/src/libtest/failed.cc index df5d083f..4e687074 100644 --- a/src/libtest/failed.cc +++ b/src/libtest/failed.cc @@ -35,9 +35,9 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" -#include +#include "libtest/failed.h" #include #include diff --git a/src/libtest/formatter.cc b/src/libtest/formatter.cc index 443256b6..296c056b 100644 --- a/src/libtest/formatter.cc +++ b/src/libtest/formatter.cc @@ -36,7 +36,7 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include #include diff --git a/src/libtest/framework.cc b/src/libtest/framework.cc index 2c9ba74b..2565e9c0 100644 --- a/src/libtest/framework.cc +++ b/src/libtest/framework.cc @@ -36,9 +36,9 @@ #include "libtest/yatlcon.h" -#include -#include -#include +#include "libtest/common.h" +#include "libtest/collection.h" +#include "libtest/signal.h" #include #include diff --git a/src/libtest/framework.h b/src/libtest/framework.h index 361779db..58c7ad99 100644 --- a/src/libtest/framework.h +++ b/src/libtest/framework.h @@ -36,7 +36,7 @@ #pragma once -#include +#include "libtest/signal.h" /** Framework is the structure which is passed to the test implementation to be filled. diff --git a/src/libtest/gearmand.cc b/src/libtest/gearmand.cc index 852cf194..6ff824ca 100644 --- a/src/libtest/gearmand.cc +++ b/src/libtest/gearmand.cc @@ -35,9 +35,9 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" -#include +#include "libtest/gearmand.h" using namespace libtest; diff --git a/src/libtest/has.cc b/src/libtest/has.cc index 74b4aa26..031f2a7b 100644 --- a/src/libtest/has.cc +++ b/src/libtest/has.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include #include diff --git a/src/libtest/http.cc b/src/libtest/http.cc index 465ce618..cf85cdf7 100644 --- a/src/libtest/http.cc +++ b/src/libtest/http.cc @@ -36,7 +36,7 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #if defined(HAVE_LIBCURL) && HAVE_LIBCURL #include diff --git a/src/libtest/http.hpp b/src/libtest/http.hpp index 68278218..4c326117 100644 --- a/src/libtest/http.hpp +++ b/src/libtest/http.hpp @@ -36,7 +36,7 @@ #pragma once -#include +#include "libtest/vchar.hpp" namespace libtest { namespace http { diff --git a/src/libtest/is_local.cc b/src/libtest/is_local.cc index ef4059c3..1473df14 100644 --- a/src/libtest/is_local.cc +++ b/src/libtest/is_local.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" namespace libtest { diff --git a/src/libtest/killpid.cc b/src/libtest/killpid.cc index 2cefff2c..af74442f 100644 --- a/src/libtest/killpid.cc +++ b/src/libtest/killpid.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include #include @@ -47,8 +47,8 @@ #include -#include -#include +#include "libtest/killpid.h" +#include "libtest/stream.h" using namespace libtest; diff --git a/src/libtest/libtool.cc b/src/libtest/libtool.cc index 9d4b0f50..7a8e838c 100644 --- a/src/libtest/libtool.cc +++ b/src/libtest/libtool.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include char _libtool[1024]= { 0 }; diff --git a/src/libtest/lite.h b/src/libtest/lite.h index 36f873e8..a0bdc57a 100644 --- a/src/libtest/lite.h +++ b/src/libtest/lite.h @@ -77,7 +77,7 @@ # define SKIP(__message_format, ...) #endif -#include +#include "libtest/valgrind.h" static inline size_t yatl_strlen(const char *s) { diff --git a/src/libtest/main.cc b/src/libtest/main.cc index f20cb955..5684ba46 100644 --- a/src/libtest/main.cc +++ b/src/libtest/main.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include #include diff --git a/src/libtest/memcached.cc b/src/libtest/memcached.cc index caeb11c3..0c16383e 100644 --- a/src/libtest/memcached.cc +++ b/src/libtest/memcached.cc @@ -49,10 +49,10 @@ #include #include -#include -#include +#include "libtest/server.h" +#include "libtest/wait.h" -#include +#include "libtest/memcached.h" #ifndef __INTEL_COMPILER #pragma GCC diagnostic ignored "-Wold-style-cast" diff --git a/src/libtest/port.cc b/src/libtest/port.cc index d8e8c12d..73ac67d0 100644 --- a/src/libtest/port.cc +++ b/src/libtest/port.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include #include @@ -55,7 +55,7 @@ #include -#include +#include "libtest/signal.h" #ifndef SOCK_CLOEXEC # define SOCK_CLOEXEC 0 diff --git a/src/libtest/result.cc b/src/libtest/result.cc index 3e4523d3..84b50676 100644 --- a/src/libtest/result.cc +++ b/src/libtest/result.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include namespace libtest { diff --git a/src/libtest/result.hpp b/src/libtest/result.hpp index 79acbb40..66461de5 100644 --- a/src/libtest/result.hpp +++ b/src/libtest/result.hpp @@ -36,10 +36,10 @@ #pragma once -#include -#include -#include -#include +#include "libtest/result/base.hpp" +#include "libtest/result/fail.hpp" +#include "libtest/result/skip.hpp" +#include "libtest/result/success.hpp" #define _SUCCESS throw libtest::__success(LIBYATL_DEFAULT_PARAM) diff --git a/src/libtest/runner.cc b/src/libtest/runner.cc index 2f94ad37..d5d8d5be 100644 --- a/src/libtest/runner.cc +++ b/src/libtest/runner.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" namespace libtest { diff --git a/src/libtest/server.cc b/src/libtest/server.cc index bfb265cd..3c60143b 100644 --- a/src/libtest/server.cc +++ b/src/libtest/server.cc @@ -36,7 +36,7 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include #include @@ -57,9 +57,9 @@ static inline std::string &rtrim(std::string &s) return s; } -#include -#include -#include +#include "libtest/server.h" +#include "libtest/stream.h" +#include "libtest/killpid.h" namespace libtest { diff --git a/src/libtest/server.h b/src/libtest/server.h index 73ad3bf8..3e6f1724 100644 --- a/src/libtest/server.h +++ b/src/libtest/server.h @@ -36,7 +36,7 @@ #pragma once -#include +#include "libtest/cmdline.h" #include #include diff --git a/src/libtest/signal.cc b/src/libtest/signal.cc index 70012f1d..bf257251 100644 --- a/src/libtest/signal.cc +++ b/src/libtest/signal.cc @@ -35,11 +35,11 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" #include -#include +#include "libtest/signal.h" using namespace libtest; diff --git a/src/libtest/skiptest.cc b/src/libtest/skiptest.cc index 098a5753..6ff0e7e8 100644 --- a/src/libtest/skiptest.cc +++ b/src/libtest/skiptest.cc @@ -36,7 +36,7 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/test.hpp" #include #include diff --git a/src/libtest/socket.cc b/src/libtest/socket.cc index 9e06841a..a681dd82 100644 --- a/src/libtest/socket.cc +++ b/src/libtest/socket.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" static char global_socket[1024]= { 0 }; diff --git a/src/libtest/strerror.cc b/src/libtest/strerror.cc index ebbc1e4f..7701e91f 100644 --- a/src/libtest/strerror.cc +++ b/src/libtest/strerror.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" namespace libtest { diff --git a/src/libtest/test.h b/src/libtest/test.h index 3c3c37d1..bd5419c7 100644 --- a/src/libtest/test.h +++ b/src/libtest/test.h @@ -40,7 +40,7 @@ #pragma GCC diagnostic ignored "-Wold-style-cast" #endif -#include +#include "libtest/lite.h" /** A structure describing the test case. diff --git a/src/libtest/test.hpp b/src/libtest/test.hpp index d9040700..b4ccfa42 100644 --- a/src/libtest/test.hpp +++ b/src/libtest/test.hpp @@ -61,42 +61,42 @@ #include #include -#include -#include +#include "libtest/visibility.h" +#include "libtest/version.h" -#include -#include -#include -#include -#include -#include +#include "libtest/vchar.hpp" +#include "libtest/error.h" +#include "libtest/exception.hpp" +#include "libtest/exception/disconnected.hpp" +#include "libtest/exception/fatal.hpp" +#include "libtest/result.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "libtest/has.hpp" +#include "libtest/error.h" +#include "libtest/strerror.h" +#include "libtest/timer.hpp" +#include "libtest/alarm.h" +#include "libtest/stream.h" +#include "libtest/comparison.hpp" +#include "libtest/server.h" +#include "libtest/server_container.h" +#include "libtest/wait.h" +#include "libtest/callbacks.h" +#include "libtest/test.h" +#include "libtest/dream.h" +#include "libtest/core.h" +#include "libtest/runner.h" +#include "libtest/port.h" +#include "libtest/is_local.hpp" +#include "libtest/socket.hpp" +#include "libtest/collection.h" +#include "libtest/framework.h" +#include "libtest/get.h" +#include "libtest/cmdline.h" +#include "libtest/string.hpp" +#include "libtest/binaries.h" +#include "libtest/http.hpp" +#include "libtest/cpu.hpp" +#include "libtest/tmpfile.hpp" +#include "libtest/client.hpp" +#include "libtest/thread.hpp" diff --git a/src/libtest/timer.cc b/src/libtest/timer.cc index fae814ca..a3457862 100644 --- a/src/libtest/timer.cc +++ b/src/libtest/timer.cc @@ -36,7 +36,7 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/timer.hpp" #include #include diff --git a/src/libtest/tmpfile.cc b/src/libtest/tmpfile.cc index 425a21e7..5bf22337 100644 --- a/src/libtest/tmpfile.cc +++ b/src/libtest/tmpfile.cc @@ -36,7 +36,7 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" namespace libtest { diff --git a/src/libtest/tmpfile.hpp b/src/libtest/tmpfile.hpp index 9283b84a..e08397f4 100644 --- a/src/libtest/tmpfile.hpp +++ b/src/libtest/tmpfile.hpp @@ -36,7 +36,7 @@ #pragma once -#include +#include "libtest/common.h" namespace libtest { diff --git a/src/libtest/unittest.cc b/src/libtest/unittest.cc index fafe032a..1a7a0d72 100644 --- a/src/libtest/unittest.cc +++ b/src/libtest/unittest.cc @@ -36,10 +36,10 @@ #include "libtest/yatlcon.h" -#include +#include "libtest/yatl.h" #if defined(HAVE_LIBMEMCACHED_1_0_TYPES_RETURN_H) && HAVE_LIBMEMCACHED_1_0_TYPES_RETURN_H -# include +# include "libmemcached-1.0/types/return.h" #endif #if defined(HAVE_LIBGEARMAN_1_0_RETURN_H) && HAVE_LIBGEARMAN_1_0_RETURN_H diff --git a/src/libtest/vchar.cc b/src/libtest/vchar.cc index a4bddfde..2d89c341 100644 --- a/src/libtest/vchar.cc +++ b/src/libtest/vchar.cc @@ -35,7 +35,7 @@ */ #include "libtest/yatlcon.h" -#include +#include "libtest/common.h" /* Use this for string generation */ static const char ALPHANUMERICS[]= diff --git a/src/libtest/wait.cc b/src/libtest/wait.cc index d1292e18..0317f9ba 100644 --- a/src/libtest/wait.cc +++ b/src/libtest/wait.cc @@ -44,7 +44,7 @@ #include #include -#include +#include "libtest/wait.h" static void version_command(const char *command_name, int major_version, int minor_version) { diff --git a/src/libtest/wait.h b/src/libtest/wait.h index e5cdcb3d..ffb7b3eb 100644 --- a/src/libtest/wait.h +++ b/src/libtest/wait.h @@ -40,7 +40,7 @@ #include #include -#include +#include "libtest/dream.h" namespace libtest { diff --git a/src/libtest/yatl.h b/src/libtest/yatl.h index 6da02a3d..d1d6c3d1 100644 --- a/src/libtest/yatl.h +++ b/src/libtest/yatl.h @@ -40,4 +40,4 @@ # define YATL_FULL 1 #endif -#include +#include "libtest/test.hpp" diff --git a/src/util/daemon.cc b/src/util/daemon.cc index 90e29efb..3c65a7bb 100644 --- a/src/util/daemon.cc +++ b/src/util/daemon.cc @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -#include +#include "mem_config.h" #if defined __SUNPRO_C || defined __DECC || defined __HP_cc # pragma ident "@(#)$Header: /cvsroot/wikipedia/willow/src/bin/willow/daemon.c,v 1.1 2005/05/02 19:15:21 kateturner Exp $" diff --git a/src/util/operation.cc b/src/util/operation.cc index 3b84a278..974f27dd 100644 --- a/src/util/operation.cc +++ b/src/util/operation.cc @@ -36,7 +36,7 @@ */ -#include +#include "mem_config.h" #include "util/operation.hpp" #include diff --git a/src/util/signal.cc b/src/util/signal.cc index 8e63016f..b1a7a4e2 100644 --- a/src/util/signal.cc +++ b/src/util/signal.cc @@ -34,7 +34,7 @@ * */ -#include +#include "mem_config.h" #include #include diff --git a/support/libmemcached.pc.in b/support/libmemcached.pc.in index d8012913..c53e7513 100644 --- a/support/libmemcached.pc.in +++ b/support/libmemcached.pc.in @@ -1,11 +1,11 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@ +libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ +includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ Name: libmemcached -URL: http://libmemcachd.org/ -Description: libmemcached C/C++ library. -Version: @VERSION@ -Libs: -L${libdir} -lmemcached -lmemcachedutil -Cflags: -I${includedir} +URL: https://m6w6.github.io/libmemcached/ +Description: libmemcached C/C++ library +Version: @PROJECT_VERSION@ +Libs: -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lmemcached -lmemcachedutil +Cflags: -I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ diff --git a/tests/basic.h b/tests/basic.h index cb9669ff..e3207d8b 100644 --- a/tests/basic.h +++ b/tests/basic.h @@ -37,7 +37,7 @@ #pragma once -#include +#include "libtest/visibility.h" #ifdef __cplusplus extern "C" { diff --git a/tests/cpp_example.cc b/tests/cpp_example.cc index c490ac2d..0aa375e2 100644 --- a/tests/cpp_example.cc +++ b/tests/cpp_example.cc @@ -1,7 +1,7 @@ /* * An example file showing the usage of the C++ libmemcached interface. */ -#include +#include "mem_config.h" #include #include @@ -11,7 +11,7 @@ #include -#include +#include "libmemcached/memcached.hpp" using namespace std; using namespace memcache; diff --git a/tests/cycle.cc b/tests/cycle.cc index 0137b038..618994b3 100644 --- a/tests/cycle.cc +++ b/tests/cycle.cc @@ -39,11 +39,11 @@ Test that we are cycling the servers we are creating during testing. */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; -#include +#include "libmemcached-1.0/memcached.h" static test_return_t server_startup_single_TEST(void *obj) { diff --git a/tests/failure.cc b/tests/failure.cc index 64b2fa7f..facaa7d5 100644 --- a/tests/failure.cc +++ b/tests/failure.cc @@ -34,14 +34,14 @@ * */ -#include +#include "mem_config.h" /* C++ interface test */ -#include -#include -#include +#include "libmemcached-1.0/memcached.hpp" +#include "libmemcached/server_instance.h" +#include "libtest/test.hpp" #include #include diff --git a/tests/hash_plus.cc b/tests/hash_plus.cc index 8675adef..720f6e1c 100644 --- a/tests/hash_plus.cc +++ b/tests/hash_plus.cc @@ -2,15 +2,15 @@ C++ to libhashkit */ -#include +#include "mem_config.h" -#include +#include "libtest/test.hpp" #include #include #include -#include +#include "libhashkit-1.0/hashkit.hpp" using namespace libtest; diff --git a/tests/hashkit_functions.cc b/tests/hashkit_functions.cc index 59c53809..5d070afb 100644 --- a/tests/hashkit_functions.cc +++ b/tests/hashkit_functions.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; @@ -44,8 +44,8 @@ using namespace libtest; #include #include -#include -#include +#include "libhashkit-1.0/hashkit.h" +#include "libhashkit/is.h" #include "tests/hash_results.h" diff --git a/tests/libmemcached-1.0/all_tests.cc b/tests/libmemcached-1.0/all_tests.cc index 37471773..a7cbd2c0 100644 --- a/tests/libmemcached-1.0/all_tests.cc +++ b/tests/libmemcached-1.0/all_tests.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" #include "libmemcached-1.0/memcached.h" #include "tests/basic.h" #include "tests/debug.h" diff --git a/tests/libmemcached-1.0/all_tests_socket.cc b/tests/libmemcached-1.0/all_tests_socket.cc index fc3aa666..ad8a37f5 100644 --- a/tests/libmemcached-1.0/all_tests_socket.cc +++ b/tests/libmemcached-1.0/all_tests_socket.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" #include "libmemcached-1.0/memcached.h" #include "tests/basic.h" #include "tests/debug.h" diff --git a/tests/libmemcached-1.0/atomsmasher.cc b/tests/libmemcached-1.0/atomsmasher.cc index 3a87bd23..169f503f 100644 --- a/tests/libmemcached-1.0/atomsmasher.cc +++ b/tests/libmemcached-1.0/atomsmasher.cc @@ -12,11 +12,11 @@ /* Sample test application. */ -#include +#include "mem_config.h" -#include +#include "libtest/test.hpp" -#include +#include "libmemcached-1.0/memcached.h" #include #include @@ -30,9 +30,9 @@ #include #include -#include +#include "libtest/server.h" -#include +#include "tests/debug.h" #include "tests/libmemcached-1.0/generate.h" diff --git a/tests/libmemcached-1.0/basic.cc b/tests/libmemcached-1.0/basic.cc index 715490dc..b6df5b47 100644 --- a/tests/libmemcached-1.0/basic.cc +++ b/tests/libmemcached-1.0/basic.cc @@ -35,10 +35,10 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" -#include +#include "libmemcached-1.0/memcached.h" #include "libmemcached/is.h" #include "tests/basic.h" diff --git a/tests/libmemcached-1.0/callback_counter.cc b/tests/libmemcached-1.0/callback_counter.cc index a3f43de2..fd52ca25 100644 --- a/tests/libmemcached-1.0/callback_counter.cc +++ b/tests/libmemcached-1.0/callback_counter.cc @@ -35,9 +35,9 @@ * */ -#include -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" #include "tests/libmemcached-1.0/callback_counter.h" memcached_return_t callback_counter(const memcached_st*, memcached_result_st*, void *context) diff --git a/tests/libmemcached-1.0/callbacks.cc b/tests/libmemcached-1.0/callbacks.cc index 89eb75f7..1f8c5162 100644 --- a/tests/libmemcached-1.0/callbacks.cc +++ b/tests/libmemcached-1.0/callbacks.cc @@ -35,10 +35,10 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" #include "libmemcached-1.0/memcached.h" -#include +#include "tests/callbacks.h" using namespace libtest; diff --git a/tests/libmemcached-1.0/debug.cc b/tests/libmemcached-1.0/debug.cc index 83241f43..3d5cda3d 100644 --- a/tests/libmemcached-1.0/debug.cc +++ b/tests/libmemcached-1.0/debug.cc @@ -35,16 +35,16 @@ * */ -#include +#include "mem_config.h" -#include +#include "libtest/test.hpp" #include using namespace libtest; -#include -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "tests/debug.h" +#include "tests/print.h" #include "libmemcached/instance.hpp" diff --git a/tests/libmemcached-1.0/deprecated.cc b/tests/libmemcached-1.0/deprecated.cc index 891a4c94..cfc0e23e 100644 --- a/tests/libmemcached-1.0/deprecated.cc +++ b/tests/libmemcached-1.0/deprecated.cc @@ -35,11 +35,11 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "tests/deprecated.h" test_return_t server_list_null_test(memcached_st *ptr) { diff --git a/tests/libmemcached-1.0/dump.cc b/tests/libmemcached-1.0/dump.cc index c0da31c4..9740d698 100644 --- a/tests/libmemcached-1.0/dump.cc +++ b/tests/libmemcached-1.0/dump.cc @@ -34,15 +34,15 @@ * */ -#include +#include "mem_config.h" #include #include -#include +#include "libtest/test.hpp" -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/util.h" using namespace libtest; diff --git a/tests/libmemcached-1.0/encoding_key.cc b/tests/libmemcached-1.0/encoding_key.cc index 24707582..cd245cf6 100644 --- a/tests/libmemcached-1.0/encoding_key.cc +++ b/tests/libmemcached-1.0/encoding_key.cc @@ -35,11 +35,11 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/util.h" #include "tests/libmemcached-1.0/encoding_key.h" diff --git a/tests/libmemcached-1.0/error_conditions.cc b/tests/libmemcached-1.0/error_conditions.cc index 584f4c69..b9481b17 100644 --- a/tests/libmemcached-1.0/error_conditions.cc +++ b/tests/libmemcached-1.0/error_conditions.cc @@ -35,15 +35,15 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" #define BUILDING_LIBMEMCACHED -#include +#include "libmemcached-1.0/memcached.h" #include "libmemcached/is.h" -#include +#include "tests/error_conditions.h" test_return_t memcached_increment_MEMCACHED_NO_SERVERS(memcached_st *) { diff --git a/tests/libmemcached-1.0/exist.cc b/tests/libmemcached-1.0/exist.cc index 912785d8..caf7429e 100644 --- a/tests/libmemcached-1.0/exist.cc +++ b/tests/libmemcached-1.0/exist.cc @@ -34,10 +34,10 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" #include "libmemcached-1.0/memcached.h" -#include +#include "tests/exist.h" using namespace libtest; diff --git a/tests/libmemcached-1.0/fetch_all_results.cc b/tests/libmemcached-1.0/fetch_all_results.cc index b7532134..d0690508 100644 --- a/tests/libmemcached-1.0/fetch_all_results.cc +++ b/tests/libmemcached-1.0/fetch_all_results.cc @@ -35,10 +35,10 @@ * */ -#include -#include -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" +#include "tests/libmemcached-1.0/fetch_all_results.h" test_return_t fetch_all_results(memcached_st *memc, unsigned int &keys_returned, memcached_return_t& rc) { diff --git a/tests/libmemcached-1.0/generate.cc b/tests/libmemcached-1.0/generate.cc index 8af302b0..d876b209 100644 --- a/tests/libmemcached-1.0/generate.cc +++ b/tests/libmemcached-1.0/generate.cc @@ -35,14 +35,14 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" -#include -#include +#include "libmemcachedutil-1.0/util.h" +#include "libmemcached/is.h" -#include -#include +#include "tests/libmemcached-1.0/generate.h" +#include "tests/libmemcached-1.0/fetch_all_results.h" #include "tests/libmemcached-1.0/callback_counter.h" #include "bin/generator.h" diff --git a/tests/libmemcached-1.0/haldenbrand.cc b/tests/libmemcached-1.0/haldenbrand.cc index 8e9f6cc4..f695d988 100644 --- a/tests/libmemcached-1.0/haldenbrand.cc +++ b/tests/libmemcached-1.0/haldenbrand.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" #include "libmemcached-1.0/memcached.h" #include "tests/libmemcached-1.0/haldenbrand.h" #include "tests/libmemcached-1.0/fetch_all_results.h" diff --git a/tests/libmemcached-1.0/internals.cc b/tests/libmemcached-1.0/internals.cc index 7aff7db8..2ccd4336 100644 --- a/tests/libmemcached-1.0/internals.cc +++ b/tests/libmemcached-1.0/internals.cc @@ -34,8 +34,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; diff --git a/tests/libmemcached-1.0/ketama.cc b/tests/libmemcached-1.0/ketama.cc index 83c18aa8..99491fc3 100644 --- a/tests/libmemcached-1.0/ketama.cc +++ b/tests/libmemcached-1.0/ketama.cc @@ -34,17 +34,17 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" -#include +#include "libmemcached-1.0/memcached.h" #include "libmemcached/server_instance.h" #include "libmemcached/continuum.hpp" #include "libmemcached/instance.hpp" -#include -#include +#include "tests/ketama.h" +#include "tests/ketama_test_cases.h" test_return_t ketama_compatibility_libmemcached(memcached_st *) { diff --git a/tests/libmemcached-1.0/mem_functions.cc b/tests/libmemcached-1.0/mem_functions.cc index 74921f70..eedf002f 100644 --- a/tests/libmemcached-1.0/mem_functions.cc +++ b/tests/libmemcached-1.0/mem_functions.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" #if defined(HAVE_LIBUUID) && HAVE_LIBUUID # include @@ -46,13 +46,13 @@ Test cases */ -#include +#include "libmemcached-1.0/memcached.h" #include "libmemcached/is.h" #include "libmemcached/server_instance.h" -#include +#include "libhashkit-1.0/hashkit.h" -#include +#include "libtest/memcached.hpp" #include #include @@ -66,17 +66,17 @@ #include -#include +#include "libtest/server.h" #include "bin/generator.h" #define SMALL_STRING_LEN 1024 -#include +#include "libtest/test.hpp" using namespace libtest; -#include +#include "libmemcachedutil-1.0/util.h" #include "tests/hash_results.h" diff --git a/tests/libmemcached-1.0/memcached_fetch_execute.cc b/tests/libmemcached-1.0/memcached_fetch_execute.cc index c74d2ec9..a2673e0c 100644 --- a/tests/libmemcached-1.0/memcached_fetch_execute.cc +++ b/tests/libmemcached-1.0/memcached_fetch_execute.cc @@ -34,11 +34,11 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcached/util.h" using namespace libtest; diff --git a/tests/libmemcached-1.0/memcached_get.cc b/tests/libmemcached-1.0/memcached_get.cc index dc046544..7a4650d9 100644 --- a/tests/libmemcached-1.0/memcached_get.cc +++ b/tests/libmemcached-1.0/memcached_get.cc @@ -34,14 +34,14 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" /* Test cases */ -#include +#include "libmemcached-1.0/memcached.h" #include "tests/libmemcached-1.0/memcached_get.h" #include "tests/libmemcached-1.0/setup_and_teardowns.h" diff --git a/tests/libmemcached-1.0/namespace.cc b/tests/libmemcached-1.0/namespace.cc index a1c362a9..29548b9e 100644 --- a/tests/libmemcached-1.0/namespace.cc +++ b/tests/libmemcached-1.0/namespace.cc @@ -35,14 +35,14 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; -#include +#include "libmemcached-1.0/memcached.h" -#include +#include "tests/namespace.h" test_return_t memcached_increment_namespace(memcached_st *memc) { diff --git a/tests/libmemcached-1.0/parser.cc b/tests/libmemcached-1.0/parser.cc index 064c5cfb..b5204a83 100644 --- a/tests/libmemcached-1.0/parser.cc +++ b/tests/libmemcached-1.0/parser.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; @@ -44,11 +44,11 @@ using namespace libtest; #include #include -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/util.h" -#include -#include +#include "tests/libmemcached-1.0/parser.h" +#include "tests/print.h" #include "libmemcached/instance.hpp" enum scanner_type_t diff --git a/tests/libmemcached-1.0/plus.cpp b/tests/libmemcached-1.0/plus.cpp index 5897dcb7..b0f92f6e 100644 --- a/tests/libmemcached-1.0/plus.cpp +++ b/tests/libmemcached-1.0/plus.cpp @@ -35,13 +35,13 @@ * */ -#include +#include "mem_config.h" /* C++ interface test */ -#include -#include +#include "libmemcached-1.0/memcached.hpp" +#include "libtest/test.hpp" #include #include diff --git a/tests/libmemcached-1.0/pool.cc b/tests/libmemcached-1.0/pool.cc index 457cf962..26932996 100644 --- a/tests/libmemcached-1.0/pool.cc +++ b/tests/libmemcached-1.0/pool.cc @@ -35,8 +35,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; @@ -47,10 +47,10 @@ using namespace libtest; #include -#include -#include -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/util.h" +#include "libmemcached/is.h" +#include "tests/pool.h" #include #include diff --git a/tests/libmemcached-1.0/print.cc b/tests/libmemcached-1.0/print.cc index 00222de3..1e948eb4 100644 --- a/tests/libmemcached-1.0/print.cc +++ b/tests/libmemcached-1.0/print.cc @@ -35,15 +35,15 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; #include -#include +#include "libmemcached-1.0/memcached.h" #include "tests/print.h" diff --git a/tests/libmemcached-1.0/replication.cc b/tests/libmemcached-1.0/replication.cc index 937041f2..a760060e 100644 --- a/tests/libmemcached-1.0/replication.cc +++ b/tests/libmemcached-1.0/replication.cc @@ -35,17 +35,17 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; -#include +#include "libmemcached-1.0/memcached.h" #include "libmemcached/server_instance.h" -#include -#include +#include "tests/replication.h" +#include "tests/debug.h" #include "tests/libmemcached-1.0/setup_and_teardowns.h" diff --git a/tests/libmemcached-1.0/sasl.cc b/tests/libmemcached-1.0/sasl.cc index 44d0f31f..041af205 100644 --- a/tests/libmemcached-1.0/sasl.cc +++ b/tests/libmemcached-1.0/sasl.cc @@ -34,8 +34,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; @@ -43,7 +43,7 @@ using namespace libtest; Test cases */ -#include +#include "libmemcached-1.0/memcached.h" static test_return_t pre_sasl(memcached_st *) { diff --git a/tests/libmemcached-1.0/server_add.cc b/tests/libmemcached-1.0/server_add.cc index 49eb8448..3b42e980 100644 --- a/tests/libmemcached-1.0/server_add.cc +++ b/tests/libmemcached-1.0/server_add.cc @@ -35,16 +35,16 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/yatl.h" #include using namespace libtest; -#include +#include "libmemcached-1.0/memcached.h" -#include +#include "tests/server_add.h" static std::string random_hostname() { diff --git a/tests/libmemcached-1.0/setup_and_teardowns.cc b/tests/libmemcached-1.0/setup_and_teardowns.cc index 047497d6..9e69c7dd 100644 --- a/tests/libmemcached-1.0/setup_and_teardowns.cc +++ b/tests/libmemcached-1.0/setup_and_teardowns.cc @@ -35,10 +35,10 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" -#include +#include "libmemcachedutil-1.0/util.h" #include "tests/print.h" #include "tests/libmemcached-1.0/setup_and_teardowns.h" diff --git a/tests/libmemcached-1.0/stat.cc b/tests/libmemcached-1.0/stat.cc index fe92230e..f65dea5f 100644 --- a/tests/libmemcached-1.0/stat.cc +++ b/tests/libmemcached-1.0/stat.cc @@ -34,15 +34,15 @@ * */ -#include +#include "mem_config.h" #include #include -#include +#include "libtest/test.hpp" -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/util.h" using namespace libtest; diff --git a/tests/libmemcached-1.0/string.cc b/tests/libmemcached-1.0/string.cc index 25613d8f..2151fa8b 100644 --- a/tests/libmemcached-1.0/string.cc +++ b/tests/libmemcached-1.0/string.cc @@ -38,16 +38,16 @@ // We let libmemcached/common.h define config since we are looking at // library internals. -#include +#include "mem_config.h" -#include +#include "libmemcached-1.0/memcached.h" #include "libmemcached/string.hpp" #include "libmemcached/is.h" -#include +#include "libtest/test.hpp" -#include +#include "tests/string.h" test_return_t string_static_null(void*) { diff --git a/tests/libmemcached-1.0/touch.cc b/tests/libmemcached-1.0/touch.cc index 08ff68f4..5f894339 100644 --- a/tests/libmemcached-1.0/touch.cc +++ b/tests/libmemcached-1.0/touch.cc @@ -35,13 +35,13 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/util.h" #include "tests/touch.h" diff --git a/tests/libmemcached-1.0/virtual_buckets.cc b/tests/libmemcached-1.0/virtual_buckets.cc index a50477c9..99b19843 100644 --- a/tests/libmemcached-1.0/virtual_buckets.cc +++ b/tests/libmemcached-1.0/virtual_buckets.cc @@ -35,14 +35,14 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; -#include +#include "tests/virtual_buckets.h" -#include +#include "libmemcached-1.0/memcached.h" #include diff --git a/tests/mem_udp.cc b/tests/mem_udp.cc index 9c9fd0a3..8610f258 100644 --- a/tests/mem_udp.cc +++ b/tests/mem_udp.cc @@ -40,16 +40,16 @@ Sample test application. */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; -#include -#include -#include -#include -#include +#include "libmemcached-1.0/memcached.h" +#include "libmemcached/server_instance.h" +#include "libmemcached/io.h" +#include "libmemcached/udp.hpp" +#include "libmemcachedutil-1.0/util.h" #include #include @@ -61,7 +61,7 @@ using namespace libtest; #include #include -#include +#include "libtest/server.h" #include "libmemcached/instance.hpp" diff --git a/tests/memcapable.cc b/tests/memcapable.cc index 6a903439..2bd1aec2 100644 --- a/tests/memcapable.cc +++ b/tests/memcapable.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; diff --git a/tests/memcat.cc b/tests/memcat.cc index 1108b92f..1da52fd2 100644 --- a/tests/memcat.cc +++ b/tests/memcat.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; diff --git a/tests/memcp.cc b/tests/memcp.cc index 547d568c..89ded54c 100644 --- a/tests/memcp.cc +++ b/tests/memcp.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" #include diff --git a/tests/memdump.cc b/tests/memdump.cc index 2d9937b3..0ad421f1 100644 --- a/tests/memdump.cc +++ b/tests/memdump.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; diff --git a/tests/memerror.cc b/tests/memerror.cc index 6920a169..816ef9de 100644 --- a/tests/memerror.cc +++ b/tests/memerror.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; diff --git a/tests/memexist.cc b/tests/memexist.cc index f2dd2f7a..b081e685 100644 --- a/tests/memexist.cc +++ b/tests/memexist.cc @@ -39,11 +39,11 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/util.h" using namespace libtest; diff --git a/tests/memflush.cc b/tests/memflush.cc index e7caf606..06b38ea5 100644 --- a/tests/memflush.cc +++ b/tests/memflush.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; diff --git a/tests/memping.cc b/tests/memping.cc index 75c7687f..0712efd2 100644 --- a/tests/memping.cc +++ b/tests/memping.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; diff --git a/tests/memrm.cc b/tests/memrm.cc index bc342b1a..e3c807be 100644 --- a/tests/memrm.cc +++ b/tests/memrm.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; diff --git a/tests/memslap.cc b/tests/memslap.cc index 352c43bb..a8fd1747 100644 --- a/tests/memslap.cc +++ b/tests/memslap.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; diff --git a/tests/memstat.cc b/tests/memstat.cc index 168b5cd1..516ff7d9 100644 --- a/tests/memstat.cc +++ b/tests/memstat.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; diff --git a/tests/memtouch.cc b/tests/memtouch.cc index d7c798cd..f2d9a80c 100644 --- a/tests/memtouch.cc +++ b/tests/memtouch.cc @@ -39,11 +39,11 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" +#include "libmemcachedutil-1.0/util.h" using namespace libtest; diff --git a/tests/parser.am b/tests/parser.am deleted file mode 100644 index e0e19987..00000000 --- a/tests/parser.am +++ /dev/null @@ -1,28 +0,0 @@ -# vim:ft=automake -# Copyright (C) 2012 Data Differential -# All rights reserved. -# -# Use and distribution licensed under the BSD license. See -# the COPYING file in the parent directory for full text. -# -# included from Top Level Makefile.am -# All paths should be given relative to the root - -noinst_HEADERS+= tests/libmemcached-1.0/parser.h - -tests_parser_SOURCES= -tests_parser_CXXFLAGS= -tests_parser_LDADD= - -tests_parser_SOURCES+= tests/parser.cc - -tests_parser_CXXFLAGS+= $(AM_CXXFLAGS) $(NO_EFF_CXX) -tests_parser_LDADD+= $(TESTS_LDADDS) -check_PROGRAMS+= tests/parser -noinst_PROGRAMS+= tests/parser - -test-parser: tests/parser - @tests/parser - -valgrind-parser: tests/parser - @$(VALGRIND_COMMAND) tests/parser diff --git a/tests/parser.cc b/tests/parser.cc index 656c885a..5e164a3b 100644 --- a/tests/parser.cc +++ b/tests/parser.cc @@ -34,13 +34,13 @@ * */ -#include +#include "mem_config.h" /* C++ interface test */ -#include -#include +#include "libmemcached-1.0/memcached.hpp" +#include "libtest/test.hpp" using namespace libtest;