+1.0.7
+* Add API call for exist calls.
+
1.0.6 Sat Apr 7 18:26:49 PDT 2012
* Fixes for gcc 4.7, lp:961812
* Fix for restart issue that happens under testing.
AC_CHECK_FUNCS([strtoull])
AC_CHECK_HEADERS([arpa/inet.h])
+AC_CHECK_HEADERS([errno.h])
+AC_CHECK_HEADERS([execinfo.h])
AC_CHECK_HEADERS([fcntl.h])
+AC_CHECK_HEADERS([inttypes.h])
AC_CHECK_HEADERS([libintl.h])
AC_CHECK_HEADERS([limits.h])
AC_CHECK_HEADERS([malloc.h])
+AC_CHECK_HEADERS([math.h])
AC_CHECK_HEADERS([netdb.h])
AC_CHECK_HEADERS([netinet/in.h])
+AC_CHECK_HEADERS([pthread.h])
+AC_CHECK_HEADERS([stdarg.h])
AC_CHECK_HEADERS([stddef.h])
+AC_CHECK_HEADERS([stdlib.h])
AC_CHECK_HEADERS([sys/time.h])
-AC_CHECK_HEADERS([execinfo.h])
+AC_CHECK_HEADERS([unistd.h])
AC_CHECK_HEADERS([cxxabi.h],
AC_DEFINE([HAVE_CXXABI_H], [1], [Have cxxabi.h]),
AC_DEFINE([HAVE_CXXABI_H], [0], [Have cxxabi.h]))
-.TH "HASHKIT_CLONE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_CLONE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_clone \- libhashkit Documentation
.
-.TH "HASHKIT_CRC32" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_CRC32" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_crc32 \- libhashkit Documentation
.
-.TH "HASHKIT_CREATE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_CREATE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_create \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1_32" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_FNV1_32" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_fnv1_32 \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1_64" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_FNV1_64" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_fnv1_64 \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1A_32" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_FNV1A_32" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_fnv1a_32 \- libhashkit Documentation
.
-.TH "HASHKIT_FNV1A_64" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_FNV1A_64" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_fnv1a_64 \- libhashkit Documentation
.
-.TH "HASHKIT_FREE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_FREE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_free \- libhashkit Documentation
.
-.TH "HASHKIT_FUNCTIONS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_FUNCTIONS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_functions \- libhashkit Documentation
.
-.TH "HASHKIT_HSIEH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_HSIEH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_hsieh \- libhashkit Documentation
.
-.TH "HASHKIT_IS_ALLOCATED" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_IS_ALLOCATED" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_is_allocated \- libhashkit Documentation
.
-.TH "HASHKIT_JENKINS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_JENKINS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_jenkins \- libhashkit Documentation
.
-.TH "HASHKIT_MD5" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_MD5" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_md5 \- libhashkit Documentation
.
-.TH "HASHKIT_MURMUR" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_MURMUR" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_murmur \- libhashkit Documentation
.
-.TH "HASHKIT_VALUE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "HASHKIT_VALUE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
hashkit_value \- libhashkit Documentation
.
-.TH "LIBHASHKIT" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "LIBHASHKIT" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
libhashkit \- libhashkit Documentation
.
-.TH "LIBMEMCACHED" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "LIBMEMCACHED" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
libmemcached \- Introducing the C Client Library for memcached
.
-.TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
libmemcached_check_configuration \- libmemcached Documentation
.
-.TH "LIBMEMCACHED_CONFIGURATION" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "LIBMEMCACHED_CONFIGURATION" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
libmemcached_configuration \- libmemcached Documentation
.
-.TH "LIBMEMCACHED_EXAMPLES" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "LIBMEMCACHED_EXAMPLES" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
libmemcached_examples \- libmemcached Documentation
.
-.TH "LIBMEMCACHEDUTIL" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "LIBMEMCACHEDUTIL" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
libmemcachedutil \- libmemcached Documentation
.
-.TH "MEMASLAP" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMASLAP" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memaslap \- libmemcached Documentation
.
-.TH "MEMCACHED" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached \- libmemcached Documentation
.
-.TH "MEMCACHED_ADD" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_ADD" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_add \- Storing and Replacing Data
.
-.TH "MEMCACHED_ADD_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_ADD_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_add_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_ANALYZE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_ANALYZE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_analyze \- libmemcached Documentation
.
-.TH "MEMCACHED_APPEND" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_APPEND" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_append \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_APPEND_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_APPEND_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_append_by_key \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_AUTO" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_AUTO" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_auto \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_BEHAVIOR" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_BEHAVIOR" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_behavior \- libmemcached Documentation
.
.B MEMCACHED_BEHAVIOR_POLL_TIMEOUT
.UNINDENT
.sp
-Modify the timeout value that is used by poll. The default value is \-1. An signed int pointer must be passed to memcached_behavior_set to change this value. For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
+Modify the timeout value that is used by poll. The default value is \-1. An signed int must be passed to memcached_behavior_set to change this value (this requires casting). For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
.INDENT 0.0
.TP
.B MEMCACHED_BEHAVIOR_USER_DATA
-.TH "MEMCACHED_BEHAVIOR_GET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_BEHAVIOR_GET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_behavior_get \- libmemcached Documentation
.
.B MEMCACHED_BEHAVIOR_POLL_TIMEOUT
.UNINDENT
.sp
-Modify the timeout value that is used by poll. The default value is \-1. An signed int pointer must be passed to memcached_behavior_set to change this value. For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
+Modify the timeout value that is used by poll. The default value is \-1. An signed int must be passed to memcached_behavior_set to change this value (this requires casting). For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
.INDENT 0.0
.TP
.B MEMCACHED_BEHAVIOR_USER_DATA
-.TH "MEMCACHED_BEHAVIOR_SET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_BEHAVIOR_SET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_behavior_set \- libmemcached Documentation
.
.B MEMCACHED_BEHAVIOR_POLL_TIMEOUT
.UNINDENT
.sp
-Modify the timeout value that is used by poll. The default value is \-1. An signed int pointer must be passed to memcached_behavior_set to change this value. For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
+Modify the timeout value that is used by poll. The default value is \-1. An signed int must be passed to memcached_behavior_set to change this value (this requires casting). For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
.INDENT 0.0
.TP
.B MEMCACHED_BEHAVIOR_USER_DATA
-.TH "MEMCACHED_CALLBACK" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_CALLBACK" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_callback \- libmemcached Documentation
.
-.TH "MEMCACHED_CALLBACK_GET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_CALLBACK_GET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_callback_get \- libmemcached Documentation
.
-.TH "MEMCACHED_CALLBACK_SET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_CALLBACK_SET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_callback_set \- libmemcached Documentation
.
-.TH "MEMCACHED_CAS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_CAS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_cas \- Working with data on the server in an atomic fashion
.
-.TH "MEMCACHED_CAS_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_CAS_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_cas_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_CLONE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_CLONE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_clone \- libmemcached Documentation
.
-.TH "MEMCACHED_CREATE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_CREATE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_create \- libmemcached Documentation
.
-.TH "MEMCACHED_DECREMENT" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_DECREMENT" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_decrement \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_decrement_with_initial \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_DELETE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_DELETE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_delete \- libmemcached Documentation
.
-.TH "MEMCACHED_DELETE_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_DELETE_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_delete_by_key \- libmemcached Documentation
.
-.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_destroy_sasl_auth_data \- libmemcached Documentation
.
-.TH "MEMCACHED_DUMP" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_DUMP" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_dump \- libmemcached Documentation
.
-.TH "MEMCACHED_EXIST" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_EXIST" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_exist \- libmemcached Documentation
.
-.TH "MEMCACHED_EXIST_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_EXIST_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_exist_by_key \- libmemcached Documentation
.
-.TH "MEMCACHED_FETCH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_FETCH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_fetch \- Retrieving data from the server
.
-.TH "MEMCACHED_FETCH_EXECUTE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_FETCH_EXECUTE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_fetch_execute \- Retrieving data from the server
.
-.TH "MEMCACHED_FETCH_RESULT" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_FETCH_RESULT" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_fetch_result \- Retrieving data from the server
.
-.TH "MEMCACHED_FLUSH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_FLUSH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_flush \- libmemcached Documentation
.
-.TH "MEMCACHED_FLUSH_BUFFERS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_FLUSH_BUFFERS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_flush_buffers \- libmemcached Documentation
.
-.TH "MEMCACHED_FREE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_FREE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_free \- libmemcached Documentation
.
-.TH "MEMCACHED_GENERATE_HASH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_GENERATE_HASH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_generate_hash \- Generating hash values directly
.
-.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_generate_hash_value \- Generating hash values directly
.
-.TH "MEMCACHED_GET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_GET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_get \- Retrieving data from the server
.
-.TH "MEMCACHED_GET_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_GET_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_get_by_key \- Retrieving data from the server
.
-.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_get_memory_allocators \- libmemcached Documentation
.
-.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_get_sasl_callbacks \- libmemcached Documentation
.
-.TH "MEMCACHED_GET_USER_DATA" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_GET_USER_DATA" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_get_user_data \- libmemcached Documentation
.
-.TH "MEMCACHED_INCREMENT" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_INCREMENT" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_increment \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_increment_with_initial \- Incrementing and Decrementing Values
.
-.TH "MEMCACHED_LAST_ERROR_MESSAGE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_LAST_ERROR_MESSAGE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_last_error_message \- libmemcached Documentation
.
-.TH "MEMCACHED_LIB_VERSION" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_LIB_VERSION" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_lib_version \- libmemcached Documentation
.
-.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_MEMORY_ALLOCATORS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_memory_allocators \- libmemcached Documentation
.
-.TH "MEMCACHED_MGET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_MGET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_mget \- Retrieving data from the server
.
-.TH "MEMCACHED_MGET_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_MGET_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_mget_by_key \- Retrieving data from the server
.
-.TH "MEMCACHED_MGET_EXECUTE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_MGET_EXECUTE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_mget_execute \- Retrieving data from the server
.
-.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_mget_execute_by_key \- Retrieving data from the server
.
-.TH "MEMCACHED_POOL" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool_behavior_get \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool_behavior_set \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_CREATE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL_CREATE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool_create \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_DESTROY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL_DESTROY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool_destroy \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_FETCH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL_FETCH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool_fetch \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_POP" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL_POP" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool_pop \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_PUSH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL_PUSH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool_push \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_RELEASE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL_RELEASE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool_release \- libmemcached Documentation
.
-.TH "MEMCACHED_POOL_ST" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_POOL_ST" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_pool_st \- libmemcached Documentation
.
-.TH "MEMCACHED_PREPEND" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_PREPEND" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_prepend \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_PREPEND_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_PREPEND_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_prepend_by_key \- Appending to or Prepending to data on the server
.
-.TH "MEMCACHED_QUIT" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_QUIT" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_quit \- libmemcached Documentation
.
-.TH "MEMCACHED_REPLACE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_REPLACE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_replace \- Storing and Replacing Data
.
-.TH "MEMCACHED_REPLACE_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_REPLACE_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_replace_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_RESULT_CAS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RESULT_CAS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_result_cas \- Working with result sets
.
-.TH "MEMCACHED_RESULT_CREATE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RESULT_CREATE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_result_create \- Working with result sets
.
-.TH "MEMCACHED_RESULT_FLAGS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RESULT_FLAGS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_result_flags \- Working with result sets
.
-.TH "MEMCACHED_RESULT_FREE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RESULT_FREE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_result_free \- Working with result sets
.
-.TH "MEMCACHED_RESULT_KEY_LENGTH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RESULT_KEY_LENGTH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_result_key_length \- Working with result sets
.
-.TH "MEMCACHED_RESULT_KEY_VALUE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RESULT_KEY_VALUE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_result_key_value \- Working with result sets
.
-.TH "MEMCACHED_RESULT_LENGTH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RESULT_LENGTH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_result_length \- Working with result sets
.
-.TH "MEMCACHED_RESULT_ST" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RESULT_ST" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_result_st \- Working with result sets
.
-.TH "MEMCACHED_RESULT_VALUE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RESULT_VALUE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_result_value \- Working with result sets
.
-.TH "MEMCACHED_RETURN_T" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_RETURN_T" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_return_t \- Return type values
.
-.TH "MEMCACHED_SASL" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SASL" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_sasl \- libmemcached Documentation
.
-.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_sasl_set_auth_data \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_ADD" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_ADD" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_add \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_ADD_UNIX_SOCKET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_ADD_UNIX_SOCKET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_add_unix_socket \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_COUNT" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_COUNT" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_count \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_CURSOR" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_CURSOR" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_cursor \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_list \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_list_append \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_list_count \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_LIST_FREE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_LIST_FREE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_list_free \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_PUSH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_PUSH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_push \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVER_ST" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVER_ST" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_server_st \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVERS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVERS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_servers \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVERS_PARSE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVERS_PARSE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_servers_parse \- libmemcached Documentation
.
-.TH "MEMCACHED_SERVERS_RESET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SERVERS_RESET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_servers_reset \- libmemcached Documentation
.
-.TH "MEMCACHED_SET" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SET" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_set \- Storing and Replacing Data
.
-.TH "MEMCACHED_SET_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SET_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_set_by_key \- Storing and Replacing Data
.
-.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_set_memory_allocators \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_MEMORY_ALLOCATORS_CONTEXT" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS_CONTEXT" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_set_memory_allocators_context \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_set_sasl_callbacks \- libmemcached Documentation
.
-.TH "MEMCACHED_SET_USER_DATA" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_SET_USER_DATA" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_set_user_data \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_STAT" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_stat \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_EXECUTE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_STAT_EXECUTE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_stat_execute \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_GET_KEYS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_STAT_GET_KEYS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_stat_get_keys \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_GET_VALUE" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_STAT_GET_VALUE" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_stat_get_value \- libmemcached Documentation
.
-.TH "MEMCACHED_STAT_SERVERNAME" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_STAT_SERVERNAME" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_stat_servername \- libmemcached Documentation
.
-.TH "MEMCACHED_STATS" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_STATS" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_stats \- libmemcached Documentation
.
-.TH "MEMCACHED_STRERROR" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_STRERROR" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_strerror \- libmemcached Documentation
.
-.TH "MEMCACHED_TOUCH" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_TOUCH" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_touch \- libmemcached Documentation
.
-.TH "MEMCACHED_TOUCH_BY_KEY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_TOUCH_BY_KEY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_touch_by_key \- libmemcached Documentation
.
-.TH "MEMCACHED_USER_DATA" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_USER_DATA" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_user_data \- libmemcached Documentation
.
-.TH "MEMCACHED_VERBOSITY" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_VERBOSITY" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_verbosity \- libmemcached Documentation
.
-.TH "MEMCACHED_VERSION" "3" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCACHED_VERSION" "3" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcached_version \- libmemcached Documentation
.
-.TH "MEMCAPABLE" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCAPABLE" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcapable \- libmemcached Documentation
.
-.TH "MEMCAT" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCAT" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcat \- libmemcached Documentation
.
-.TH "MEMCP" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMCP" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memcp \- libmemcached Documentation
.
-.TH "MEMDUMP" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMDUMP" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memdump \- libmemcached Documentation
.
-.TH "MEMERROR" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMERROR" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memerror \- libmemcached Documentation
.
-.TH "MEMFLUSH" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMFLUSH" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memflush \- libmemcached Documentation
.
-.TH "MEMRM" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMRM" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memrm \- libmemcached Documentation
.
-.TH "MEMSLAP" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMSLAP" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memslap \- libmemcached Documentation
.
-.TH "MEMSTAT" "1" "April 21, 2012" "1.0.6" "libmemcached"
+.TH "MEMSTAT" "1" "April 27, 2012" "1.0.6" "libmemcached"
.SH NAME
memstat \- libmemcached Documentation
.
.. c:type:: MEMCACHED_BEHAVIOR_POLL_TIMEOUT
-Modify the timeout value that is used by poll. The default value is -1. An signed int pointer must be passed to memcached_behavior_set to change this value. For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
+Modify the timeout value that is used by poll. The default value is -1. An signed int must be passed to memcached_behavior_set to change this value (this requires casting). For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
.. c:type:: MEMCACHED_BEHAVIOR_USER_DATA
.. deprecated:: < 0.30
example_t_memcached_light_SOURCES+= example/t/memcached_light.cc
example_t_memcached_light_SOURCES+= tests/libmemcached-1.0/memcached_get.cc
+example_t_memcached_light_SOURCES+= tests/libmemcached-1.0/print.cc
example_t_memcached_light_SOURCES+= tests/libmemcached-1.0/setup_and_teardowns.cc
example_t_memcached_light_CXXFLAGS = $(AM_CXXFLAGS)
example_t_memcached_light_DEPENDENCIES= $(MEMCACHED_LIGHT_TESTS_LDADDS) example/memcached_light
#pragma once
+LIBMEMCACHED_API
memcached_return_t memcached_exist(memcached_st *memc, const char *key, size_t key_length);
+LIBMEMCACHED_API
memcached_return_t memcached_exist_by_key(memcached_st *memc,
const char *group_key, size_t group_key_length,
const char *key, size_t key_length);
uint32_t timeouts;
} io_wait_count;
uint8_t major_version; // Default definition of UINT8_MAX means that it has not been set.
- uint8_t micro_version; // ditto
+ uint8_t micro_version; // ditto, and note that this is the third, not second version bit
uint8_t minor_version; // ditto
memcached_connection_t type;
char *read_ptr;
{
if (mem)
{
- free(mem);
+ std::free(mem);
}
}
void *_libmemcached_malloc(const memcached_st *, size_t size, void *)
{
- return malloc(size);
+ return std::malloc(size);
}
void *_libmemcached_realloc(const memcached_st*, void *mem, size_t size, void *)
{
- return realloc(mem, size);
+ return std::realloc(mem, size);
}
void *_libmemcached_calloc(const memcached_st *self, size_t nelem, size_t size, void *context)
return ret;
}
- return calloc(nelem, size);
+ return std::calloc(nelem, size);
}
struct memcached_allocator_t memcached_allocators_return_default(void)
return;
}
- *mem_malloc= self->allocators.malloc;
- *mem_free= self->allocators.free;
- *mem_realloc= self->allocators.realloc;
- *mem_calloc= self->allocators.calloc;
+ if (mem_malloc)
+ {
+ *mem_malloc= self->allocators.malloc;
+ }
+
+ if (mem_free)
+ {
+ *mem_free= self->allocators.free;
+ }
+
+ if (mem_realloc)
+ {
+ *mem_realloc= self->allocators.realloc;
+ }
+
+ if (mem_calloc)
+ {
+ *mem_calloc= self->allocators.calloc;
+ }
}
const uint64_t total_bytes)
{
if (total_items > 0 && total_bytes > 0)
+ {
result->average_item_size= (uint32_t) (total_bytes / total_items);
+ }
}
static void calc_hit_ratio(memcached_analysis_st *result,
{
uint64_t total_items= 0, total_bytes= 0;
uint64_t total_get_cmds= 0, total_get_hits= 0;
- uint32_t server_count;
- if (not memc or not memc_stat)
+ if (memc == NULL or memc_stat == NULL)
{
return NULL;
}
+ memcached_return_t not_used;
+ if (error == NULL)
+ {
+ error= ¬_used;
+ }
+
*error= MEMCACHED_SUCCESS;
- server_count= memcached_server_count(memc);
- memcached_analysis_st *result= (memcached_analysis_st*)calloc(memcached_server_count(memc),
- sizeof(memcached_analysis_st));
+ uint32_t server_count= memcached_server_count(memc);
+ memcached_analysis_st *result= (memcached_analysis_st*)libmemcached_xcalloc(memc,
+ memcached_server_count(memc),
+ memcached_analysis_st);
- if (not result)
+ if (result == NULL)
{
*error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
return NULL;
void memcached_analyze_free(memcached_analysis_st *ptr)
{
- free(ptr);
+ libmemcached_free(ptr->root, ptr);
}
fprintf(stderr, "Number of stack frames obtained: %lu\n", (unsigned long)size);
- char *named_function= (char *)::realloc(NULL, 1024);
+ char *named_function= (char *)std::realloc(NULL, 1024);
if (named_function == NULL)
{
- ::free(strings);
+ std::free(strings);
return;
}
if (USE_DEMANGLE)
{
size_t sz= 200;
- char *named_function_ptr= (char *)::realloc(named_function, sz);
+ char *named_function_ptr= (char *)std::realloc(named_function, sz);
if (named_function_ptr == NULL)
{
continue;
}
}
- ::free(named_function);
- ::free(strings);
+ std::free(named_function);
+ std::free(strings);
#endif // HAVE_EXECINFO_H
}
#include <cstdlib>
#include <cstring>
#include <ctime>
-#include <ctype.h>
+#include <cctype>
+#include <cerrno>
+#include <climits>
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <errno.h>
+#include <limits.h>
#endif
-#include <errno.h>
#include <fcntl.h>
-#include <limits.h>
#include <sys/types.h>
#include <unistd.h>
{
assert_msg(rc != MEMCACHED_ERRNO, "Programmer error, MEMCACHED_ERRNO was set to be returned to client");
assert_msg(rc != MEMCACHED_SOME_ERRORS, "Programmer error, MEMCACHED_SOME_ERRORS was about to be set on a memcached_server_st");
+
memcached_string_t tmp= { str, length };
return memcached_set_error(self, rc, at, tmp);
}
_error_free(error->next);
- if (error && error->root)
+ if (error and error->root)
{
libmemcached_free(error->root, error);
}
else if (error)
{
- free(error);
+ libmemcached_free(error->root, error);
}
}
return MEMCACHED_INVALID_ARGUMENTS;
}
- if (not memc->error_messages)
+ if (memc->error_messages == NULL)
{
return MEMCACHED_SUCCESS;
}
return 0;
}
- if (not memc->error_messages)
+ if (memc->error_messages == NULL)
{
return 0;
}
return NULL;
}
- if (not server->error_messages)
+ if (server->error_messages == NULL)
{
return memcached_strerror(server->root, MEMCACHED_SUCCESS);
}
- if (not server->error_messages->size)
+ if (server->error_messages->size == 0)
{
return memcached_strerror(server->root, server->error_messages->rc);
}
return true;
}
-static void _free(memcached_st *ptr, bool release_st)
+static void __memcached_free(memcached_st *ptr, bool release_st)
{
/* If we have anything open, lets close it now */
send_quit(ptr);
}
else
{
- ptr= (memcached_st *)malloc(sizeof(memcached_st));
+ ptr= (memcached_st *)libmemcached_xmalloc(NULL, memcached_st);
if (ptr == NULL)
{
bool stored_is_allocated= memcached_is_allocated(ptr);
uint64_t query_id= ptr->query_id;
- _free(ptr, false);
+ __memcached_free(ptr, false);
memcached_create(ptr);
memcached_set_allocated(ptr, stored_is_allocated);
ptr->query_id= query_id;
{
if (ptr)
{
- _free(ptr, true);
+ __memcached_free(ptr, true);
}
}
void *memcached_get_user_data(const memcached_st *ptr)
{
+ if (ptr == NULL)
+ {
+ return NULL;
+ }
+
return ptr->user_data;
}
void *memcached_set_user_data(memcached_st *ptr, void *data)
{
+ if (ptr == NULL)
+ {
+ return NULL;
+ }
+
void *ret= ptr->user_data;
ptr->user_data= data;
memcached_server_write_instance_st memcached_server_instance_fetch(memcached_st *ptr, uint32_t server_key)
{
+ if (ptr == NULL)
+ {
+ return NULL;
+ }
+
return &ptr->servers[server_key];
}
memcached_server_instance_st memcached_server_instance_by_position(const memcached_st *ptr, uint32_t server_key)
{
+ if (ptr == NULL)
+ {
+ return NULL;
+ }
+
return &ptr->servers[server_key];
}
uint64_t memcached_query_id(const memcached_st *self)
{
- if (not self)
+ if (self == NULL)
+ {
return 0;
+ }
return self->query_id;
}
#ifndef PROTOCOL_BINARY_H
#define PROTOCOL_BINARY_H
-#include "vbucket.h"
+#include <libmemcachedprotocol-0.0/vbucket.h>
/**
* \addtogroup Protocol
-/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#ifndef MEMCACHED_VBUCKET_H
-#define MEMCACHED_VBUCKET_H 1
+/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ *
+ * Libmemcached library
+ *
+ * Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * The names of its contributors may not be used to endorse or
+ * promote products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#pragma once
#ifdef __cplusplus
extern "C"
#ifdef __cplusplus
}
#endif
-#endif
#pragma once
+#include <config.h>
+
#include <libmemcached-1.0/struct/memcached.h>
#ifdef __cplusplus
}
else if (mem)
{
+#ifdef __cplusplus
+ std::free(mem);
+#else
free(mem);
+#endif
}
}
return self->allocators.malloc(self, size, self->allocators.context);
}
+#ifdef __cplusplus
+ return std::malloc(size);
+#else
return malloc(size);
+#endif
}
#define libmemcached_xmalloc(__memcachd_st, __type) ((__type *)libmemcached_malloc((__memcachd_st), sizeof(__type)))
return self->allocators.realloc(self, mem, nmemb * size, self->allocators.context);
}
- return realloc(mem, size);
+#ifdef __cplusplus
+ return std::realloc(mem, size);
+#else
+ return realloc(mem, size);
+#endif
}
#define libmemcached_xrealloc(__memcachd_st, __mem, __nelem, __type) ((__type *)libmemcached_realloc((__memcachd_st), (__mem), (__nelem), sizeof(__type)))
#define libmemcached_xvalloc(__memcachd_st, __nelem, __type) ((__type *)libmemcached_realloc((__memcachd_st), NULL, (__nelem), sizeof(__type)))
return self->allocators.calloc(self, nelem, size, self->allocators.context);
}
- return calloc(nelem, size);
+#ifdef __cplusplus
+ return std::calloc(nelem, size);
+#else
+ return calloc(nelem, size);
+#endif
}
#define libmemcached_xcalloc(__memcachd_st, __nelem, __type) ((__type *)libmemcached_calloc((__memcachd_st), (__nelem), sizeof(__type)))
{
/* Find the space, and then move one past it to copy version */
char *response_ptr= index(buffer, ' ');
- response_ptr++;
- long int version= strtol(response_ptr, (char **)NULL, 10);
+ char *endptr;
+ long int version= strtol(response_ptr, &endptr, 10);
if (version == LONG_MIN or version == LONG_MAX or errno == EINVAL or version > UINT8_MAX or version == 0)
{
instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX;
}
instance->major_version= uint8_t(version);
- response_ptr= index(response_ptr, '.');
- response_ptr++;
-
- version= strtol(response_ptr, (char **)NULL, 10);
+ endptr++;
+ version= strtol(endptr, &endptr, 10);
if (version == LONG_MIN or version == LONG_MAX or errno == EINVAL or version > UINT8_MAX)
{
instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX;
}
instance->minor_version= uint8_t(version);
- response_ptr= index(response_ptr, '.');
- response_ptr++;
-
- version= strtol(response_ptr, (char **)NULL, 10);
+ endptr++;
+ version= strtol(endptr, &endptr, 10);
if (version == LONG_MIN or version == LONG_MAX or errno == EINVAL or version > UINT8_MAX)
{
instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX;
break;
case PROTOCOL_BINARY_CMD_SASL_LIST_MECHS:
+ {
+ if (header.response.keylen != 0 || bodylen + 1 > buffer_length)
+ {
+ return MEMCACHED_UNKNOWN_READ_FAILURE;
+ }
+ else
+ {
+ if ((rc= memcached_safe_read(instance, buffer, bodylen)) != MEMCACHED_SUCCESS)
+ {
+ return MEMCACHED_UNKNOWN_READ_FAILURE;
+ }
+ }
+ }
+ break;
+
case PROTOCOL_BINARY_CMD_VERSION:
{
char version_buffer[32]; // @todo document this number
return MEMCACHED_UNKNOWN_READ_FAILURE;
}
- char *p;
- long int version= strtol(version_buffer, &p, 10);
+ char *endptr;
+ long int version= strtol(version_buffer, &endptr, 10);
if (version == LONG_MIN or version == LONG_MAX or errno == EINVAL or version > UINT8_MAX or version == 0)
{
instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX;
}
instance->major_version= uint8_t(version);
- version= strtol(p +1, &p, 10);
+ endptr++;
+ version= strtol(endptr, &endptr, 10);
if (version == LONG_MIN or version == LONG_MAX or errno == EINVAL or version > UINT8_MAX)
{
instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX;
- return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, memcached_literal_param("strtol() failed to parse micro version"));
+ return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, memcached_literal_param("strtol() failed to parse minor version"));
}
instance->minor_version= uint8_t(version);
- version= strtol(p + 1, NULL, 10);
- if (errno == ERANGE)
+ endptr++;
+ version= strtol(endptr, &endptr, 10);
+ if (version == LONG_MIN or version == LONG_MAX or errno == EINVAL or version > UINT8_MAX)
{
instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX;
return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, memcached_literal_param("strtol() failed to parse micro version"));
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,
case PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START\n", __FILE__, __LINE__); return;
case PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END\n", __FILE__, __LINE__); return;
case PROTOCOL_BINARY_CMD_LAST_RESERVED: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_LAST_RESERVED\n", __FILE__, __LINE__); return;
+ case PROTOCOL_BINARY_CMD_GATK: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GATK\n", __FILE__, __LINE__); return;
+ case PROTOCOL_BINARY_CMD_GATKQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GATKQ\n", __FILE__, __LINE__); return;
case PROTOCOL_BINARY_CMD_SCRUB: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_SCRUB\n", __FILE__, __LINE__); return;
default:
abort();
} \
} while (0)
+#define test_skip_hint(__expected, __actual, __hint) \
+do \
+{ \
+ if (libtest::_compare_hint(__FILE__, __LINE__, __func__, (__expected), (__actual), (__hint)) == false) \
+ { \
+ return TEST_SKIPPED; \
+ } \
+} while (0)
+
#define test_skip_valgrind() \
do \
{ \
# define HAVE_ULONG 1
typedef unsigned long int ulong;
#endif
+
+#define RPACKAGE "memcached"
+#define RVERSION "1.4.13"
-#if defined(RMEMCACHED_PACKAGE)
-#undef VERSION
-#define VERSION VERSION_NUMBER
-#endif
-
-#if defined(RMEMCACHED_PACKAGE)
-#undef PACKAGE
-#define PACKAGE RMEMCACHED_PACKAGE
-#endif
-
-
])
])dnl CONFIG_EXTRA
noinst_HEADERS+= memcached/trace.h
noinst_HEADERS+= memcached/util.h
-memcached_memcached_SOURCES=
memcached_memcached_CFLAGS=
memcached_memcached_LDADD=
+memcached_memcached_SOURCES=
memcached_memcached_SOURCES+=
memcached_memcached_SOURCES+= memcached/assoc.c
memcached_memcached_SOURCES+= memcached/trace.h
memcached_memcached_SOURCES+= memcached/util.c
-memcached_memcached_CFLAGS+= -DHAVE_CONFIG_H -std=c99
memcached_memcached_CFLAGS+= ${PTHREAD_CFLAGS}
-memcached_memcached_CFLAGS+= -DRMEMCACHED_VERSION="\"1.4.13\""
-memcached_memcached_CFLAGS+= -DRMEMCACHED_PACKAGE="\"memcached\""
+memcached_memcached_CFLAGS+= -DHAVE_CONFIG_H -std=c99
memcached_memcached_LDADD+= $(LIBEVENT_LDFLAGS)
memcached_memcached_LDADD+= ${PTHREAD_LIBS}
switch (c->cmd) {
case PROTOCOL_BINARY_CMD_VERSION:
if (extlen == 0 && keylen == 0 && bodylen == 0) {
- write_bin_response(c, VERSION, 0, 0, strlen(VERSION));
+ write_bin_response(c, RVERSION, 0, 0, strlen(RVERSION));
} else {
protocol_error = 1;
}
APPEND_STAT("pid", "%lu", (long)pid);
APPEND_STAT("uptime", "%u", now);
APPEND_STAT("time", "%ld", now + (long)process_started);
- APPEND_STAT("version", "%s", VERSION);
+ APPEND_STAT("version", "%s", RVERSION);
APPEND_STAT("libevent", "%s", event_get_version());
APPEND_STAT("pointer_size", "%d", (int)(8 * sizeof(void *)));
} else if (ntokens == 2 && (strcmp(tokens[COMMAND_TOKEN].value, "version") == 0)) {
- out_string(c, "VERSION " VERSION);
+ out_string(c, "VERSION " RVERSION);
} else if (ntokens == 2 && (strcmp(tokens[COMMAND_TOKEN].value, "quit") == 0)) {
}
#endif
- setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags));
+ error = setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof(flags));
+ if (error != 0)
+ {
+ perror("setsockopt(SO_REUSEADDR)");
+ }
+
if (IS_UDP(transport)) {
maximize_sndbuf(sfd);
} else {
}
static void usage(void) {
- printf(PACKAGE " " VERSION "\n");
+ printf(RPACKAGE " " RVERSION "\n");
printf("-p <num> TCP port number to listen on (default: 11211)\n"
"-U <num> UDP port number to listen on (default: 11211, 0 is off)\n"
"-s <file> UNIX socket path to listen on (disables network support)\n"
}
static void usage_license(void) {
- printf(PACKAGE " " VERSION "\n\n");
+ printf(RPACKAGE " " RVERSION "\n\n");
printf(
"Copyright (c) 2003, Danga Interactive, Inc. <http://www.danga.com/>\n"
"All rights reserved.\n"
tests_failure_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
tests_failure_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
tests_failure_SOURCES+= tests/libmemcached-1.0/generate.cc
+tests_failure_SOURCES+= tests/libmemcached-1.0/print.cc
tests_failure_CXXFLAGS = $(AM_CXXFLAGS)
tests_failure_DEPENDENCIES= $(TESTS_LDADDS)
tests_testudp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
tests_testudp_SOURCES=
-tests_testudp_SOURCES+= tests/mem_udp.cc
+
tests_testudp_SOURCES+= clients/execute.cc
tests_testudp_SOURCES+= clients/generator.cc
tests_testudp_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
tests_testudp_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
tests_testudp_SOURCES+= tests/libmemcached-1.0/generate.cc
-
+tests_testudp_SOURCES+= tests/libmemcached-1.0/print.cc
+tests_testudp_SOURCES+= tests/mem_udp.cc
tests_testudp_DEPENDENCIES= $(TESTS_LDADDS)
tests_testudp_LDADD= $(tests_testudp_DEPENDENCIES)
check_PROGRAMS+= tests/testudp
tests_testplus_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
tests_testplus_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
tests_testplus_SOURCES+= tests/libmemcached-1.0/generate.cc
+tests_testplus_SOURCES+= tests/libmemcached-1.0/print.cc
tests_testplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
tests_testplus_DEPENDENCIES= $(TESTS_LDADDS)
#include "tests/print.h"
-memcached_return_t server_print_callback(const memcached_st *ptr,
+memcached_return_t server_print_callback(const memcached_st*,
const memcached_server_st *server,
void *context)
{
- (void)ptr;
-
if (context)
{
std::cerr << memcached_server_name(server) << ":" << memcached_server_port(server) << std::endl;
return MEMCACHED_SUCCESS;
}
+
+const char * print_version(memcached_st *memc)
+{
+ memcached_server_fn callbacks[1];
+ callbacks[0]= server_print_version_callback;
+ memcached_server_cursor(memc, callbacks, NULL, 1);
+
+ return "print_version()";
+}
+
+
+memcached_return_t server_print_version_callback(const memcached_st *,
+ const memcached_server_st *server,
+ void *)
+{
+ std::cerr << "Server: " << memcached_server_name(server) << ":" << memcached_server_port(server) << " "
+ << int(server->major_version) << "."
+ << int(server->minor_version) << "."
+ << int(server->micro_version)
+ << std::endl;
+
+ return MEMCACHED_SUCCESS;
+}
#include <libmemcached/util.h>
+#include "tests/print.h"
#include "tests/libmemcached-1.0/setup_and_teardowns.h"
#include <sys/stat.h>
*/
test_return_t pre_binary(memcached_st *memc)
{
+ test_true(memcached_server_count(memc) > 0);
test_skip(true, libmemcached_util_version_check(memc, 1, 4, 4));
test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, true));
memcached_return_t server_print_callback(const memcached_st *ptr,
const memcached_server_st *server,
void *context);
+
+memcached_return_t server_print_version_callback(const memcached_st *ptr,
+ const memcached_server_st *server,
+ void *context);
+
+const char * print_version(memcached_st *memc);
#include "tests/libmemcached-1.0/generate.h"
#include "tests/memc.h"
+#include "tests/print.h"
class LibmemcachedRunner : public libtest::Runner {
public: