[-]
[+]
|
Changed |
libmemcached.changes
|
|
[-]
[+]
|
Changed |
libmemcached.spec
^
|
|
[-]
[+]
|
Deleted |
libmemcached-0.46.tar.bz2/tests/server.c
^
|
@@ -1,246 +0,0 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
- *
- * Use and distribution licensed under the BSD license. See
- * the COPYING file in the parent directory for full text.
- *
- * Summary:
- *
- */
-
-/*
- Startup, and shutdown the memcached servers.
-*/
-
-#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT+10
-
-#define PID_FILE_BASE "/tmp/%ulibmemcached_memc.pid"
-
-#include "config.h"
-
-#include <assert.h>
-#include <limits.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <time.h>
-#include <unistd.h>
-
-#include <libmemcached/memcached.h>
-#include <libmemcached/util.h>
-
-#include "server.h"
-
-static struct timespec global_sleep_value= { .tv_sec= 0, .tv_nsec= 50000 };
-
-static void global_sleep(void)
-{
-#ifdef WIN32
- sleep(1);
-#else
- nanosleep(&global_sleep_value, NULL);
-#endif
-}
-
-static void kill_file(const char *file_buffer)
-{
- FILE *fp= fopen(file_buffer, "r");
-
- while ((fp= fopen(file_buffer, "r")))
- {
- char pid_buffer[1024];
-
- if (fgets(pid_buffer, sizeof(pid_buffer), fp) != NULL)
- {
- pid_t pid= (pid_t)atoi(pid_buffer);
- if (pid != 0)
- {
- if (kill(pid, SIGTERM) == -1)
- {
- remove(file_buffer); // If this happens we may be dealing with a dead server that left its pid file.
- }
- else
- {
- uint32_t counter= 3;
- while ((kill(pid, 0) == 0) && --counter)
- {
- global_sleep();
- }
- }
- }
- }
-
- global_sleep();
-
- fclose(fp);
- }
-}
-
-void server_startup(server_startup_st *construct)
-{
- if ((construct->server_list= getenv("MEMCACHED_SERVERS")))
- {
- printf("servers %s\n", construct->server_list);
- construct->servers= memcached_servers_parse(construct->server_list);
- construct->server_list= NULL;
- construct->count= 0;
- }
- else
- {
- {
- char server_string_buffer[8096];
- char *end_ptr;
- end_ptr= server_string_buffer;
-
- for (uint32_t x= 0; x < construct->count; x++)
- {
- int status;
- in_port_t port;
-
- {
- char *var;
- char variable_buffer[1024];
-
- snprintf(variable_buffer, sizeof(variable_buffer), "LIBMEMCACHED_PORT_%u", x);
-
- if ((var= getenv(variable_buffer)))
- {
- port= (in_port_t)atoi(var);
- }
- else
- {
- port= (in_port_t)(x + TEST_PORT_BASE);
- }
- }
-
- char buffer[PATH_MAX];
- snprintf(buffer, sizeof(buffer), PID_FILE_BASE, x);
- kill_file(buffer);
-
- if (x == 0)
- {
- snprintf(buffer, sizeof(buffer), "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u -m 128",
- MEMCACHED_BINARY, x, port, port);
- }
- else
- {
- snprintf(buffer, sizeof(buffer), "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u",
- MEMCACHED_BINARY, x, port, port);
- }
- if (libmemcached_util_ping("localhost", port, NULL))
- {
- fprintf(stderr, "Server on port %u already exists\n", port);
- }
- else
- {
- status= system(buffer);
- fprintf(stderr, "STARTING SERVER: %s status:%d\n", buffer, status);
- }
- int count;
- size_t remaining_length= sizeof(server_string_buffer) - (size_t)(end_ptr -server_string_buffer);
- count= snprintf(end_ptr, remaining_length, "localhost:%u,", port);
-
- if ((size_t)count >= remaining_length || count < 0)
- {
- fprintf(stderr, "server names grew to be larger then buffer allowed\n");
- abort();
- }
- end_ptr+= count;
- }
- *end_ptr= 0;
-
-
- int *pids= calloc(construct->count, sizeof(int));
- for (uint32_t x= 0; x < construct->count; x++)
- {
- char buffer[PATH_MAX]; /* Nothing special for number */
-
- snprintf(buffer, sizeof(buffer), PID_FILE_BASE, x);
-
- uint32_t counter= 3000; // Absurd, just to catch run away process
- while (pids[x] <= 0 && --counter)
- {
- FILE *file= fopen(buffer, "r");
- if (file)
- {
- char pid_buffer[1024];
- char *found= fgets(pid_buffer, sizeof(pid_buffer), file);
-
- if (found)
- {
- pids[x]= atoi(pid_buffer);
- fclose(file);
-
- if (pids[x] > 0)
- break;
- }
- fclose(file);
- }
- global_sleep();
- }
-
- bool was_started= false;
- if (pids[x] > 0)
- {
- counter= 30;
- while (--counter)
- {
- if (kill(pids[x], 0) == 0)
- {
- was_started= true;
- break;
- }
- global_sleep();
- }
- }
-
- if (was_started == false)
- {
- fprintf(stderr, "Failed to open buffer %s(%d)\n", buffer, pids[x]);
- for (uint32_t y= 0; y < construct->count; y++)
- {
- if (pids[y] > 0)
- kill(pids[y], SIGTERM);
- }
- abort();
- }
- }
- free(pids);
-
- construct->server_list= strdup(server_string_buffer);
- }
- printf("servers %s\n", construct->server_list);
- construct->servers= memcached_servers_parse(construct->server_list);
- }
-
- assert(construct->servers);
-
- srandom((unsigned int)time(NULL));
-
- for (uint32_t x= 0; x < memcached_server_list_count(construct->servers); x++)
- {
- printf("\t%s : %d\n", memcached_server_name(&construct->servers[x]), memcached_server_port(&construct->servers[x]));
- assert(construct->servers[x].fd == -1);
- assert(construct->servers[x].cursor_active == 0);
- }
-
- printf("\n");
-}
-
-void server_shutdown(server_startup_st *construct)
-{
- if (construct->server_list)
- {
- for (uint32_t x= 0; x < construct->count; x++)
- {
- char file_buffer[PATH_MAX]; /* Nothing special for number */
- snprintf(file_buffer, sizeof(file_buffer), PID_FILE_BASE, x);
- kill_file(file_buffer);
- }
-
- free(construct->server_list);
- }
-}
|
[-]
[+]
|
Deleted |
libmemcached-0.46.tar.bz2/tests/server.h
^
|
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
- *
- * Use and distribution licensed under the BSD license. See
- * the COPYING file in the parent directory for full text.
- */
-
-/*
- Server startup and shutdown functions.
-*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <libmemcached/memcached.h>
-
-typedef struct server_startup_st server_startup_st;
-
-struct server_startup_st
-{
- uint8_t count;
- uint8_t udp;
- memcached_server_st *servers;
- char *server_list;
-};
-
-void server_startup(server_startup_st *construct);
-void server_shutdown(server_startup_st *construct);
-
-#ifdef __cplusplus
-}
-#endif
|
[-]
[+]
|
Deleted |
libmemcached-0.46.tar.bz2/tests/test.c
^
|
@@ -1,371 +0,0 @@
-/* uTest
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
- *
- * Use and distribution licensed under the BSD license. See
- * the COPYING file in the parent directory for full text.
- */
-
-/*
- Sample test application.
-*/
-
-#include "config.h"
-
-#include <unistd.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <time.h>
-#include <stdint.h>
-
-#include "libmemcached/memcached.h"
-
-#include "test.h"
-
-static void world_stats_print(world_stats_st *stats)
-{
- fputc('\n', stderr);
- fprintf(stderr, "Total Collections\t\t\t\t%u\n", stats->collection_total);
- fprintf(stderr, "\tFailed Collections\t\t\t%u\n", stats->collection_failed);
- fprintf(stderr, "\tSkipped Collections\t\t\t%u\n", stats->collection_skipped);
- fprintf(stderr, "\tSucceeded Collections\t\t%u\n", stats->collection_success);
- fputc('\n', stderr);
- fprintf(stderr, "Total\t\t\t\t%u\n", stats->total);
- fprintf(stderr, "\tFailed\t\t\t%u\n", stats->failed);
- fprintf(stderr, "\tSkipped\t\t\t%u\n", stats->skipped);
- fprintf(stderr, "\tSucceeded\t\t%u\n", stats->success);
-}
-
-long int timedif(struct timeval a, struct timeval b)
-{
- long us, s;
-
- us = (int)(a.tv_usec - b.tv_usec);
- us /= 1000;
- s = (int)(a.tv_sec - b.tv_sec);
- s *= 1000;
- return s + us;
-}
-
-const char *test_strerror(test_return_t code)
-{
- switch (code) {
- case TEST_SUCCESS:
- return "ok";
- case TEST_FAILURE:
- return "failed";
- case TEST_MEMORY_ALLOCATION_FAILURE:
- return "memory allocation";
- case TEST_SKIPPED:
- return "skipped";
- case TEST_MAXIMUM_RETURN:
- default:
- fprintf(stderr, "Unknown return value\n");
- abort();
- }
-}
-
-void create_core(void)
-{
- if (getenv("LIBMEMCACHED_NO_COREDUMP") == NULL)
- {
- pid_t pid= fork();
-
- if (pid == 0)
- {
- abort();
- }
- else
- {
- while (waitpid(pid, NULL, 0) != pid)
- {
- ;
- }
- }
- }
-}
-
-
-static test_return_t _runner_default(test_callback_fn func, void *p)
-{
- if (func)
- {
- return func(p);
- }
- else
- {
- return TEST_SUCCESS;
- }
-}
-
-static world_runner_st defualt_runners= {
- _runner_default,
- _runner_default,
- _runner_default
-};
-
-static test_return_t _default_callback(void *p)
-{
- (void)p;
-
- return TEST_SUCCESS;
-}
-
-static inline void set_default_fn(test_callback_fn *fn)
-{
- if (*fn == NULL)
- {
- *fn= _default_callback;
- }
-}
-
-static collection_st *init_world(world_st *world)
-{
- if (! world->runner)
- {
- world->runner= &defualt_runners;
- }
-
- set_default_fn(&world->collection.startup);
- set_default_fn(&world->collection.shutdown);
-
- return world->collections;
-}
-
-
-int main(int argc, char *argv[])
-{
- test_return_t return_code;
- unsigned int x;
- char *collection_to_run= NULL;
- char *wildcard= NULL;
- world_st world;
- collection_st *collection;
- collection_st *next;
- void *world_ptr;
-
- world_stats_st stats;
-
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
- if (sasl_client_init(NULL) != SASL_OK)
- {
- fprintf(stderr, "Failed to initialize sasl library!\n");
- return 1;
- }
-#endif
-
- memset(&stats, 0, sizeof(stats));
- memset(&world, 0, sizeof(world));
- get_world(&world);
-
- collection= init_world(&world);
-
- if (world.create)
- {
- test_return_t error;
- world_ptr= world.create(&error);
- if (error != TEST_SUCCESS)
- exit(1);
- }
- else
- {
- world_ptr= NULL;
- }
-
- if (argc > 1)
- collection_to_run= argv[1];
-
- if (argc == 3)
- wildcard= argv[2];
-
- for (next= collection; next->name; next++)
- {
- test_return_t collection_rc= TEST_SUCCESS;
- test_st *run;
- bool failed= false;
- bool skipped= false;
-
- run= next->tests;
- if (collection_to_run && fnmatch(collection_to_run, next->name, 0))
- continue;
-
- stats.collection_total++;
-
- collection_rc= world.collection.startup(world_ptr);
-
- if (collection_rc != TEST_SUCCESS)
- goto skip_pre;
-
- if (next->pre)
- {
- collection_rc= world.runner->pre(next->pre, world_ptr);
- }
-
-skip_pre:
- switch (collection_rc)
- {
- case TEST_SUCCESS:
- fprintf(stderr, "\n%s\n\n", next->name);
- break;
- case TEST_FAILURE:
- fprintf(stderr, "\n%s [ failed ]\n\n", next->name);
- stats.collection_failed++;
- goto cleanup;
- case TEST_SKIPPED:
- fprintf(stderr, "\n%s [ skipping ]\n\n", next->name);
- stats.collection_skipped++;
- goto cleanup;
- case TEST_MEMORY_ALLOCATION_FAILURE:
- case TEST_MAXIMUM_RETURN:
- default:
- assert(0);
- break;
- }
-
-
- for (x= 0; run->name; run++)
- {
- struct timeval start_time, end_time;
- long int load_time= 0;
-
- if (wildcard && fnmatch(wildcard, run->name, 0))
- continue;
-
- fprintf(stderr, "Testing %s", run->name);
-
- if (world.test.startup)
- {
- world.test.startup(world_ptr);
- }
-
- if (run->requires_flush && world.test.flush)
- {
- world.test.flush(world_ptr);
- }
-
- if (world.test.pre_run)
- {
- world.test.pre_run(world_ptr);
- }
-
-
- // Runner code
- {
-#if 0
- if (next->pre && world.runner->pre)
- {
- return_code= world.runner->pre(next->pre, world_ptr);
-
- if (return_code != TEST_SUCCESS)
- {
- goto error;
- }
- }
-#endif
-
- gettimeofday(&start_time, NULL);
- return_code= world.runner->run(run->test_fn, world_ptr);
- gettimeofday(&end_time, NULL);
- load_time= timedif(end_time, start_time);
-
-#if 0
- if (next->post && world.runner->post)
- {
- (void) world.runner->post(next->post, world_ptr);
- }
-#endif
- }
-
- if (world.test.post_run)
- {
- world.test.post_run(world_ptr);
- }
-
- stats.total++;
-
- fprintf(stderr, "\t\t\t\t\t");
-
- switch (return_code)
- {
- case TEST_SUCCESS:
- fprintf(stderr, "%ld.%03ld ", load_time / 1000, load_time % 1000);
- stats.success++;
- break;
- case TEST_FAILURE:
- stats.failed++;
- failed= true;
- break;
- case TEST_SKIPPED:
- stats.skipped++;
- skipped= true;
- break;
- case TEST_MEMORY_ALLOCATION_FAILURE:
- fprintf(stderr, "Exhausted memory, quitting\n");
- abort();
- case TEST_MAXIMUM_RETURN:
- default:
- assert(0); // Coding error.
- break;
- }
-
- fprintf(stderr, "[ %s ]\n", test_strerror(return_code));
-
- if (world.test.on_error)
- {
- test_return_t rc;
- rc= world.test.on_error(return_code, world_ptr);
-
- if (rc != TEST_SUCCESS)
- break;
- }
- }
-
- if (next->post && world.runner->post)
- {
- (void) world.runner->post(next->post, world_ptr);
- }
-
- if (! failed && ! skipped)
- {
- stats.collection_success++;
- }
-cleanup:
-
- world.collection.shutdown(world_ptr);
- }
-
- if (stats.collection_failed || stats.collection_skipped)
- {
- fprintf(stderr, "Some test failures and/or skipped test occurred.\n\n");
- }
- else
- {
- fprintf(stderr, "All tests completed successfully\n\n");
- }
-
- if (world.destroy)
- {
- test_return_t error;
- error= world.destroy(world_ptr);
-
- if (error != TEST_SUCCESS)
- {
- fprintf(stderr, "Failure during shutdown.\n");
- stats.failed++; // We do this to make our exit code return 1
- }
- }
-
- world_stats_print(&stats);
-
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
- sasl_done();
-#endif
-
- return stats.failed == 0 ? 0 : 1;
-}
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/COPYING
^
|
@@ -1,6 +1,7 @@
Software License Agreement (BSD License)
-Copyright (c) 2007, TangentOrg (Brian Aker)
+Copyright (c) 2011, Data Differential (http://datadifferential.com/)
+Copyright (c) 2007-2010, TangentOrg (Brian Aker)
All rights reserved.
Redistribution and use in source and binary forms, with or without
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/ChangeLog
^
|
@@ -1,3 +1,16 @@
+0.48 Tue Mar 15 23:05:18 PDT 2011
+ * Fix memory leak in server parse.
+ * Move test framework out to be its own library (easier to work with Gearman).
+
+
+0.47 Wed Feb 23 18:46:48 PST 2011
+ * Additional fixes for OpenBSD.
+ * Bug fix 677609, 456080.
+ * SIGPIPE fix for Linux send().
+ * memcapable can now test ascii or binary based on flags.
+ * Additional build fixes for SASL.
+
+
0.46 Mon Feb 14 10:28:01 PST 2011
* Fixes a number of corner case bugs.
* Fixes related to OpenBSD.
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/Makefile.am
^
|
@@ -19,6 +19,7 @@
${srcdir}/m4/pandora_*.m4 \
.quickly \
README.FIRST \
+ README.win32 \
config/autorun.sh \
config/pandora-plugin \
config/uncrustify.cfg \
@@ -40,6 +41,7 @@
(cd docs && $(MAKE) test-docs)
include libmemcached/include.am
include clients/include.am
+include libtest/include.am
include libhashkit/include.am
include unittests/include.am
include tests/include.am
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/Makefile.in
^
|
@@ -24,6 +24,16 @@
# All paths should be given relative to the root
# vim:ft=automake
+# Copyright (C) 2011 Data Differential (http://datadifferential.com/)
+# 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
+
+# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
#
@@ -39,6 +49,12 @@
# All paths should be given relative to the root
# vim:ft=automake
+# Copyright (C) 2011 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
@@ -90,10 +106,10 @@
$(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/clients/include.am $(srcdir)/config.h.in \
$(srcdir)/example/include.am $(srcdir)/libhashkit/include.am \
- $(srcdir)/libmemcached/include.am $(srcdir)/poll/include.am \
- $(srcdir)/support/include.am $(srcdir)/tests/include.am \
- $(srcdir)/unittests/include.am $(srcdir)/win32/include.am \
- $(top_srcdir)/configure \
+ $(srcdir)/libmemcached/include.am $(srcdir)/libtest/include.am \
+ $(srcdir)/poll/include.am $(srcdir)/support/include.am \
+ $(srcdir)/tests/include.am $(srcdir)/unittests/include.am \
+ $(srcdir)/win32/include.am $(top_srcdir)/configure \
$(top_srcdir)/libhashkit/configure.h.in \
$(top_srcdir)/libmemcached/configure.h.in \
$(top_srcdir)/support/libmemcached-fc.spec.in \
@@ -113,7 +129,7 @@
@BUILD_BYTEORDER_TRUE@am__append_4 = libmemcached/libbyteorder.la
@BUILD_BYTEORDER_TRUE@am__append_5 = libmemcached/libbyteorder.la
@BUILD_BYTEORDER_TRUE@am__append_6 = libmemcached/libbyteorder.la
-@HAVE_SASL_TRUE@am__append_7 = $(LIBSASL)
+@HAVE_SASL_TRUE@am__append_7 = $(LTLIBSASL) $(LTLIBSASL2)
@HAVE_SASL_TRUE@am__append_8 = libmemcached/sasl.c
@HAVE_DTRACE_TRUE@am__append_9 = libmemcached/dtrace_probes.h
@HAVE_DTRACE_TRUE@am__append_10 = libmemcached/dtrace_probes.h
@@ -125,17 +141,18 @@
@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__append_16 = clients/memslap
@BUILD_BYTEORDER_TRUE@am__append_17 = libmemcached/libbyteorder.la
@INCLUDE_HSIEH_SRC_TRUE@am__append_18 = libhashkit/hsieh.c
-@HAVE_LIBGTEST_TRUE@am__append_19 = unittests/unittests
-@BUILD_LIBMEMCACHEDUTIL_TRUE@am__append_20 = libmemcached/libmemcachedutil.la
-@HAVE_LIBEVENT_TRUE@am__append_21 = example/memcached_light
-@BUILD_BYTEORDER_TRUE@am__append_22 = libmemcached/libbyteorder.la
-@HAVE_LIBINNODB_TRUE@am__append_23 = example/storage_innodb.c
-@HAVE_LIBINNODB_FALSE@am__append_24 = example/storage.c
-@BUILD_POLL_TRUE@am__append_25 = poll/poll.c
-@BUILD_WIN32_WRAPPERS_TRUE@am__append_26 = -no-undefined
+@INCLUDE_MURMUR_SRC_TRUE@am__append_19 = libhashkit/murmur.c
+@HAVE_LIBGTEST_TRUE@am__append_20 = unittests/unittests
+@BUILD_LIBMEMCACHEDUTIL_TRUE@am__append_21 = libmemcached/libmemcachedutil.la
+@HAVE_LIBEVENT_TRUE@am__append_22 = example/memcached_light
+@BUILD_BYTEORDER_TRUE@am__append_23 = libmemcached/libbyteorder.la
+@HAVE_LIBINNODB_TRUE@am__append_24 = example/storage_innodb.c
+@HAVE_LIBINNODB_FALSE@am__append_25 = example/storage.c
+@BUILD_POLL_TRUE@am__append_26 = poll/poll.c
@BUILD_WIN32_WRAPPERS_TRUE@am__append_27 = -no-undefined
@BUILD_WIN32_WRAPPERS_TRUE@am__append_28 = -no-undefined
@BUILD_WIN32_WRAPPERS_TRUE@am__append_29 = -no-undefined
+@BUILD_WIN32_WRAPPERS_TRUE@am__append_30 = -no-undefined
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
@@ -146,7 +163,7 @@
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/memcached.m4 \
- $(top_srcdir)/m4/pandora_64bit.m4 \
+ $(top_srcdir)/m4/murmur.m4 $(top_srcdir)/m4/pandora_64bit.m4 \
$(top_srcdir)/m4/pandora_canonical.m4 \
$(top_srcdir)/m4/pandora_check_compiler_version.m4 \
$(top_srcdir)/m4/pandora_check_cxx_standard.m4 \
@@ -176,7 +193,9 @@
$(top_srcdir)/m4/pandora_warnings.m4 \
$(top_srcdir)/m4/pod2man.m4 $(top_srcdir)/m4/podchecker.m4 \
$(top_srcdir)/m4/protocol_binary.m4 \
- $(top_srcdir)/m4/setsockopt.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/setsockopt.m4 \
+ $(top_srcdir)/m4/socket_send_flags.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -229,9 +248,10 @@
libhashkit/behavior.c libhashkit/crc32.c libhashkit/fnv.c \
libhashkit/digest.c libhashkit/function.c libhashkit/hashkit.c \
libhashkit/jenkins.c libhashkit/ketama.c libhashkit/md5.c \
- libhashkit/murmur.c libhashkit/one_at_a_time.c \
- libhashkit/strerror.c libhashkit/hsieh.c
+ libhashkit/one_at_a_time.c libhashkit/strerror.c \
+ libhashkit/hsieh.c libhashkit/murmur.c
@INCLUDE_HSIEH_SRC_TRUE@am__objects_1 = libhashkit/libhashkit_libhashkit_la-hsieh.lo
+@INCLUDE_MURMUR_SRC_TRUE@am__objects_2 = libhashkit/libhashkit_libhashkit_la-murmur.lo
am_libhashkit_libhashkit_la_OBJECTS = \
libhashkit/libhashkit_libhashkit_la-algorithm.lo \
libhashkit/libhashkit_libhashkit_la-behavior.lo \
@@ -243,10 +263,9 @@
libhashkit/libhashkit_libhashkit_la-jenkins.lo \
libhashkit/libhashkit_libhashkit_la-ketama.lo \
libhashkit/libhashkit_libhashkit_la-md5.lo \
- libhashkit/libhashkit_libhashkit_la-murmur.lo \
libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo \
libhashkit/libhashkit_libhashkit_la-strerror.lo \
- $(am__objects_1)
+ $(am__objects_1) $(am__objects_2)
libhashkit_libhashkit_la_OBJECTS = \
$(am_libhashkit_libhashkit_la_OBJECTS)
libhashkit_libhashkit_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -258,10 +277,11 @@
libhashkit/behavior.c libhashkit/crc32.c libhashkit/fnv.c \
libhashkit/digest.c libhashkit/function.c libhashkit/hashkit.c \
libhashkit/jenkins.c libhashkit/ketama.c libhashkit/md5.c \
- libhashkit/murmur.c libhashkit/one_at_a_time.c \
- libhashkit/strerror.c libhashkit/hsieh.c
-@INCLUDE_HSIEH_SRC_TRUE@am__objects_2 = libhashkit/libhashkit_libhashkitinc_la-hsieh.lo
-am__objects_3 = libhashkit/libhashkit_libhashkitinc_la-algorithm.lo \
+ libhashkit/one_at_a_time.c libhashkit/strerror.c \
+ libhashkit/hsieh.c libhashkit/murmur.c
+@INCLUDE_HSIEH_SRC_TRUE@am__objects_3 = libhashkit/libhashkit_libhashkitinc_la-hsieh.lo
+@INCLUDE_MURMUR_SRC_TRUE@am__objects_4 = libhashkit/libhashkit_libhashkitinc_la-murmur.lo
+am__objects_5 = libhashkit/libhashkit_libhashkitinc_la-algorithm.lo \
libhashkit/libhashkit_libhashkitinc_la-behavior.lo \
libhashkit/libhashkit_libhashkitinc_la-crc32.lo \
libhashkit/libhashkit_libhashkitinc_la-fnv.lo \
@@ -271,11 +291,10 @@
libhashkit/libhashkit_libhashkitinc_la-jenkins.lo \
libhashkit/libhashkit_libhashkitinc_la-ketama.lo \
libhashkit/libhashkit_libhashkitinc_la-md5.lo \
- libhashkit/libhashkit_libhashkitinc_la-murmur.lo \
libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo \
libhashkit/libhashkit_libhashkitinc_la-strerror.lo \
- $(am__objects_2)
-am_libhashkit_libhashkitinc_la_OBJECTS = $(am__objects_3)
+ $(am__objects_3) $(am__objects_4)
+am_libhashkit_libhashkitinc_la_OBJECTS = $(am__objects_5)
libhashkit_libhashkitinc_la_OBJECTS = \
$(am_libhashkit_libhashkitinc_la_OBJECTS)
libhashkit_libhashkitinc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -306,9 +325,9 @@
libmemcached/strerror.c libmemcached/verbosity.c \
libmemcached/version.c libmemcached/sasl.c \
libmemcached/libmemcached_probes.d poll/poll.c
-@HAVE_SASL_TRUE@am__objects_4 = libmemcached/libmemcached_libmemcached_la-sasl.lo
-am__objects_5 =
-@BUILD_POLL_TRUE@am__objects_6 = \
+@HAVE_SASL_TRUE@am__objects_6 = libmemcached/libmemcached_libmemcached_la-sasl.lo
+am__objects_7 =
+@BUILD_POLL_TRUE@am__objects_8 = \
@BUILD_POLL_TRUE@ poll/libmemcached_libmemcached_la-poll.lo
am_libmemcached_libmemcached_la_OBJECTS = \
libmemcached/libmemcached_libmemcached_la-allocators.lo \
@@ -340,7 +359,7 @@
libmemcached/libmemcached_libmemcached_la-strerror.lo \
libmemcached/libmemcached_libmemcached_la-verbosity.lo \
libmemcached/libmemcached_libmemcached_la-version.lo \
- $(am__objects_4) $(am__objects_5) $(am__objects_6)
+ $(am__objects_6) $(am__objects_7) $(am__objects_8)
libmemcached_libmemcached_la_OBJECTS = \
$(am_libmemcached_libmemcached_la_OBJECTS)
libmemcached_libmemcached_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -384,12 +403,12 @@
$(libmemcached_libmemcachedutil_la_LDFLAGS) $(LDFLAGS) -o $@
@BUILD_LIBMEMCACHEDUTIL_TRUE@am_libmemcached_libmemcachedutil_la_rpath = \
@BUILD_LIBMEMCACHEDUTIL_TRUE@ -rpath $(libdir)
-tests_libserver_la_LIBADD =
-am_tests_libserver_la_OBJECTS = tests/server.lo
-tests_libserver_la_OBJECTS = $(am_tests_libserver_la_OBJECTS)
-tests_libtest_la_LIBADD =
-am_tests_libtest_la_OBJECTS = tests/test.lo
-tests_libtest_la_OBJECTS = $(am_tests_libtest_la_OBJECTS)
+libtest_libserver_la_LIBADD =
+am_libtest_libserver_la_OBJECTS = libtest/server.lo
+libtest_libserver_la_OBJECTS = $(am_libtest_libserver_la_OBJECTS)
+libtest_libtest_la_LIBADD =
+am_libtest_libtest_la_OBJECTS = libtest/test.lo
+libtest_libtest_la_OBJECTS = $(am_libtest_libtest_la_OBJECTS)
@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__EXEEXT_1 = clients/memslap$(EXEEXT)
@HAVE_LIBGTEST_TRUE@am__EXEEXT_2 = unittests/unittests$(EXEEXT)
@HAVE_LIBEVENT_TRUE@am__EXEEXT_3 = example/memcached_light$(EXEEXT)
@@ -433,17 +452,17 @@
example/interface_v1.c example/memcached_light.c \
example/memcached_light.h example/storage.h \
example/storage_innodb.c example/storage.c
-@HAVE_LIBINNODB_TRUE@am__objects_7 = example/storage_innodb.$(OBJEXT)
-@HAVE_LIBINNODB_FALSE@am__objects_8 = example/storage.$(OBJEXT)
+@HAVE_LIBINNODB_TRUE@am__objects_9 = example/storage_innodb.$(OBJEXT)
+@HAVE_LIBINNODB_FALSE@am__objects_10 = example/storage.$(OBJEXT)
am_example_memcached_light_OBJECTS = example/interface_v0.$(OBJEXT) \
example/interface_v1.$(OBJEXT) \
- example/memcached_light.$(OBJEXT) $(am__objects_7) \
- $(am__objects_8)
+ example/memcached_light.$(OBJEXT) $(am__objects_9) \
+ $(am__objects_10)
example_memcached_light_OBJECTS = \
$(am_example_memcached_light_OBJECTS)
example_memcached_light_DEPENDENCIES = \
libmemcached/libmemcachedprotocol.la $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__append_22)
+ $(am__DEPENDENCIES_1) $(am__append_23)
am_tests_atomsmasher_OBJECTS = tests/atomsmasher.$(OBJEXT)
tests_atomsmasher_OBJECTS = $(am_tests_atomsmasher_OBJECTS)
am_tests_hashplus_OBJECTS = tests/tests_hashplus-hash_plus.$(OBJEXT)
@@ -483,7 +502,7 @@
unittests/unittests_unittests-main.$(OBJEXT) \
unittests/unittests_unittests-strings.$(OBJEXT)
unittests_unittests_OBJECTS = $(am_unittests_unittests_OBJECTS)
-unittests_unittests_DEPENDENCIES = tests/libserver.la \
+unittests_unittests_DEPENDENCIES = libtest/libserver.la \
libmemcached/libmemcachedinternal.la $(TESTS_LDADDS) \
$(am__DEPENDENCIES_1)
unittests_unittests_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
@@ -542,7 +561,7 @@
$(libmemcached_libmemcachedinternal_la_SOURCES) \
$(libmemcached_libmemcachedprotocol_la_SOURCES) \
$(libmemcached_libmemcachedutil_la_SOURCES) \
- $(tests_libserver_la_SOURCES) $(tests_libtest_la_SOURCES) \
+ $(libtest_libserver_la_SOURCES) $(libtest_libtest_la_SOURCES) \
$(clients_memcapable_SOURCES) $(clients_memcat_SOURCES) \
$(clients_memcp_SOURCES) $(clients_memdump_SOURCES) \
$(clients_memerror_SOURCES) $(clients_memflush_SOURCES) \
@@ -563,7 +582,7 @@
$(libmemcached_libmemcachedinternal_la_SOURCES) \
$(libmemcached_libmemcachedprotocol_la_SOURCES) \
$(libmemcached_libmemcachedutil_la_SOURCES) \
- $(tests_libserver_la_SOURCES) $(tests_libtest_la_SOURCES) \
+ $(libtest_libserver_la_SOURCES) $(libtest_libtest_la_SOURCES) \
$(clients_memcapable_SOURCES) $(clients_memcat_SOURCES) \
$(clients_memcp_SOURCES) $(clients_memdump_SOURCES) \
$(clients_memerror_SOURCES) $(clients_memflush_SOURCES) \
@@ -881,9 +900,9 @@
clients/ms_atomic.h clients/ms_conn.h clients/ms_memslap.h \
clients/ms_setting.h clients/ms_sigsegv.h clients/ms_stats.h \
clients/ms_task.h clients/ms_thread.h clients/utilities.h \
- libhashkit/common.h tests/hash_results.h \
- tests/ketama_test_cases.h tests/ketama_test_cases_spy.h \
- tests/libmemcached_world.h tests/server.h tests/test.h \
+ libtest/server.h libtest/test.h libhashkit/common.h \
+ tests/hash_results.h tests/ketama_test_cases.h \
+ tests/ketama_test_cases_spy.h tests/libmemcached_world.h \
poll/poll.h win32/wrappers.h
lib_LTLIBRARIES = libmemcached/libmemcachedprotocol.la \
libmemcached/libmemcached.la $(am__append_3) \
@@ -895,8 +914,8 @@
noinst_LTLIBRARIES = libmemcached/libmemcachedcallbacks.la \
libmemcached/libmemcachedinternal.la $(am__append_4) \
clients/libutilities.la clients/libgenexec.la \
- libhashkit/libhashkitinc.la tests/libserver.la \
- tests/libtest.la
+ libtest/libserver.la libtest/libtest.la \
+ libhashkit/libhashkitinc.la
include_HEADERS =
nobase_include_HEADERS = libmemcached/allocators.h \
libmemcached/analyze.h libmemcached/auto.h \
@@ -926,11 +945,13 @@
EXTRA_HEADERS =
BUILT_SOURCES = $(am__append_9)
EXTRA_DIST = ${srcdir}/m4/pandora_*.m4 .quickly README.FIRST \
- config/autorun.sh config/pandora-plugin config/uncrustify.cfg \
- m4/ac_cxx_header_stdcxx_98.m4 m4/acx_pthread.m4 m4/gettext.m4 \
- m4/iconv.m4 m4/pkg.m4 m4/po.m4 m4/progtest.m4 \
- libmemcached/configure.h.in libmemcached/libmemcached_probes.d \
+ README.win32 config/autorun.sh config/pandora-plugin \
+ config/uncrustify.cfg m4/ac_cxx_header_stdcxx_98.m4 \
+ m4/acx_pthread.m4 m4/gettext.m4 m4/iconv.m4 m4/pkg.m4 m4/po.m4 \
+ m4/progtest.m4 libmemcached/configure.h.in \
+ libmemcached/libmemcached_probes.d \
libmemcached/memcached/README.txt libhashkit/configure.h.in \
+ tests/cpp_example.cc tests/output_plus.res \
support/libmemcached.spec support/libmemcached-fc.spec.in \
support/set_benchmark.sh
TEST_DOCS = $(am__append_1)
@@ -945,7 +966,7 @@
libmemcached_libmemcachedprotocol_la_CFLAGS = ${AM_CFLAGS} ${NO_CONVERSION} ${PTHREAD_CFLAGS}
libmemcached_libmemcachedprotocol_la_LDFLAGS = ${AM_LDFLAGS} \
${PTHREAD_LIBS} -version-info \
- ${MEMCACHED_PROTOCAL_LIBRARY_VERSION} $(am__append_27)
+ ${MEMCACHED_PROTOCAL_LIBRARY_VERSION} $(am__append_28)
libmemcached_libmemcachedcallbacks_la_CFLAGS = ${AM_CFLAGS} ${NO_STRICT_ALIASING}
libmemcached_libmemcachedcallbacks_la_SOURCES = libmemcached/callback.c
libmemcached_libmemcachedinternal_la_SOURCES = \
@@ -966,7 +987,7 @@
libmemcached/stats.c libmemcached/storage.c \
libmemcached/strerror.c libmemcached/verbosity.c \
libmemcached/version.c $(am__append_8) $(am__append_11) \
- $(am__append_25)
+ $(am__append_26)
libmemcached_libmemcached_la_DEPENDENCIES = \
libmemcached/libmemcachedcallbacks.la \
libmemcached/libmemcachedinternal.la \
@@ -976,7 +997,7 @@
libmemcached/libmemcachedinternal.la \
libhashkit/libhashkitinc.la $(am__append_5) $(am__append_13)
libmemcached_libmemcached_la_LDFLAGS = ${AM_LDFLAGS} -version-info \
- ${MEMCACHED_LIBRARY_VERSION} $(am__append_7) $(am__append_26)
+ ${MEMCACHED_LIBRARY_VERSION} $(am__append_7) $(am__append_27)
libmemcached_libmemcachedutil_la_SOURCES = \
libmemcached/util/ping.c \
libmemcached/util/pool.c \
@@ -986,7 +1007,7 @@
libmemcached_libmemcachedutil_la_LIBADD = libmemcached/libmemcached.la
libmemcached_libmemcachedutil_la_LDFLAGS = ${AM_LDFLAGS} \
${PTHREAD_LIBS} -version-info \
- ${MEMCACHED_UTIL_LIBRARY_VERSION} $(am__append_28)
+ ${MEMCACHED_UTIL_LIBRARY_VERSION} $(am__append_29)
libmemcached_libmemcachedutil_la_DEPENDENCIES = libmemcached/libmemcached.la
@BUILD_BYTEORDER_TRUE@libmemcached_libbyteorder_la_SOURCES = libmemcached/byteorder.c
@BUILD_BYTEORDER_TRUE@libmemcached_libmemcachedprotocol_la_LIBADD = libmemcached/libbyteorder.la
@@ -1021,18 +1042,20 @@
clients_memslap_LDADD = $(LTLIBEVENT) clients/libgenexec.la $(CLIENTS_LDADDS)
clients_memcapable_SOURCES = clients/memcapable.c
clients_memcapable_LDADD = $(CLIENTS_LDADDS) $(am__append_17)
+libtest_libserver_la_SOURCES = libtest/server.c
+libtest_libtest_la_SOURCES = libtest/test.c
libhashkit_libhashkit_la_SOURCES = libhashkit/algorithm.c \
libhashkit/behavior.c libhashkit/crc32.c libhashkit/fnv.c \
libhashkit/digest.c libhashkit/function.c libhashkit/hashkit.c \
libhashkit/jenkins.c libhashkit/ketama.c libhashkit/md5.c \
- libhashkit/murmur.c libhashkit/one_at_a_time.c \
- libhashkit/strerror.c $(am__append_18)
+ libhashkit/one_at_a_time.c libhashkit/strerror.c \
+ $(am__append_18) $(am__append_19)
libhashkit_libhashkit_la_CFLAGS = \
${AM_CFLAGS} \
-DBUILDING_HASHKIT
libhashkit_libhashkit_la_LDFLAGS = $(LIBM) -version-info \
- $(HASHKIT_LIBRARY_VERSION) $(am__append_29)
+ $(HASHKIT_LIBRARY_VERSION) $(am__append_30)
libhashkit_libhashkitinc_la_SOURCES = ${libhashkit_libhashkit_la_SOURCES}
libhashkit_libhashkitinc_la_CFLAGS = ${libhashkit_libhashkit_la_CFLAGS}
libhashkit_libhashkitinc_la_LDFLAGS = $(LIBM)
@@ -1042,41 +1065,34 @@
unittests_unittests_CXXFLAGS = ${AM_CXXFLAGS} ${NO_WERROR} ${NO_EFF_CXX}
unittests_unittests_LDADD = \
- tests/libserver.la \
+ libtest/libserver.la \
libmemcached/libmemcachedinternal.la \
${TESTS_LDADDS} ${LTLIBGTEST}
-TESTS_LDADDS = libmemcached/libmemcached.la $(am__append_20)
+TESTS_LDADDS = libmemcached/libmemcached.la libtest/libserver.la \
+ libtest/libtest.la $(am__append_21)
VALGRIND_COMMAND = $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --track-fds=yes
DEBUG_COMMAND = $(LIBTOOL) --mode=execute gdb
PAHOLE_COMMAND = $(LIBTOOL) --mode=execute pahole
-tests_libserver_la_SOURCES = tests/server.c
-tests_libtest_la_SOURCES = tests/test.c
tests_testapp_CFLAGS = $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
tests_testapp_SOURCES = tests/mem_functions.c
tests_testapp_DEPENDENCIES = \
$(BUILT_SOURCES) \
clients/libgenexec.la \
- tests/libserver.la \
- tests/libtest.la \
libmemcached/libmemcachedinternal.la \
$(TESTS_LDADDS)
tests_testapp_LDADD = clients/libgenexec.la \
- tests/libserver.la \
- tests/libtest.la \
libmemcached/libmemcachedinternal.la \
$(TESTS_LDADDS) $(LIBSASL)
tests_testplus_SOURCES = tests/plus.cpp
tests_testplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_testplus_DEPENDENCIES = tests/libtest.la tests/libserver.la $(TESTS_LDADDS)
+tests_testplus_DEPENDENCIES = $(TESTS_LDADDS)
tests_testplus_LDADD = $(tests_testplus_DEPENDENCIES) $(LIBSASL)
tests_atomsmasher_SOURCES = tests/atomsmasher.c
tests_atomsmasher_DEPENDENCIES = \
clients/libgenexec.la \
- tests/libserver.la \
- tests/libtest.la \
$(TESTS_LDADDS)
tests_atomsmasher_LDADD = $(tests_atomsmasher_DEPENDENCIES) $(LIBSASL)
@@ -1084,16 +1100,14 @@
tests_testudp_SOURCES = tests/mem_udp.c
tests_testudp_DEPENDENCIES = \
clients/libgenexec.la \
- tests/libserver.la \
- tests/libtest.la \
$(TESTS_LDADDS)
tests_testudp_LDADD = $(tests_testudp_DEPENDENCIES) $(LIBSASL)
tests_startservers_SOURCES = tests/start.c
-tests_startservers_DEPENDENCIES = tests/libserver.la $(TESTS_LDADDS)
+tests_startservers_DEPENDENCIES = $(TESTS_LDADDS)
tests_startservers_LDADD = $(tests_startservers_DEPENDENCIES) $(LIBSASL)
tests_testhashkit_SOURCES = tests/hashkit_functions.c
-tests_testhashkit_DEPENDENCIES = tests/libtest.la libhashkit/libhashkit.la
+tests_testhashkit_DEPENDENCIES = libtest/libtest.la libhashkit/libhashkit.la
tests_testhashkit_LDADD = $(tests_testhashkit_DEPENDENCIES) $(LIBSASL)
tests_hashplus_SOURCES = tests/hash_plus.cc
tests_hashplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
@@ -1101,7 +1115,7 @@
tests_hashplus_LDADD = $(tests_testhashkit_DEPENDENCIES) $(LIBSASL)
tests_memplus_SOURCES = tests/mem_plus.cc
tests_memplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memplus_DEPENDENCIES = tests/libtest.la tests/libserver.la libmemcached/libmemcached.la
+tests_memplus_DEPENDENCIES = $(TESTS_LDADDS)
tests_memplus_LDADD = $(tests_memplus_DEPENDENCIES) $(LIBSASL)
MEMSLAP_COMMAND = clients/memslap $(COLLECTION) $(SUITE)
MEM_COMMAND = tests/testapp $(COLLECTION) $(SUITE)
@@ -1113,10 +1127,10 @@
HASH_COMMAND = tests/testhashkit $(COLLECTION) $(SUITE)
example_memcached_light_SOURCES = example/interface_v0.c \
example/interface_v1.c example/memcached_light.c \
- example/memcached_light.h example/storage.h $(am__append_23) \
- $(am__append_24)
+ example/memcached_light.h example/storage.h $(am__append_24) \
+ $(am__append_25)
example_memcached_light_LDADD = libmemcached/libmemcachedprotocol.la \
- $(LIBINNODB) $(LTLIBEVENT) $(am__append_22)
+ $(LIBINNODB) $(LTLIBEVENT) $(am__append_23)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = support/libmemcached.pc
all: $(BUILT_SOURCES) config.h
@@ -1126,7 +1140,7 @@
.SUFFIXES: .d .c .cc .cpp .lo .o .obj
am--refresh:
@:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/libmemcached/include.am $(srcdir)/clients/include.am $(srcdir)/libhashkit/include.am $(srcdir)/unittests/include.am $(srcdir)/tests/include.am $(srcdir)/example/include.am $(srcdir)/support/include.am $(srcdir)/poll/include.am $(srcdir)/win32/include.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/libmemcached/include.am $(srcdir)/clients/include.am $(srcdir)/libtest/include.am $(srcdir)/libhashkit/include.am $(srcdir)/unittests/include.am $(srcdir)/tests/include.am $(srcdir)/example/include.am $(srcdir)/support/include.am $(srcdir)/poll/include.am $(srcdir)/win32/include.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -1277,9 +1291,6 @@
libhashkit/libhashkit_libhashkit_la-md5.lo: \
libhashkit/$(am__dirstamp) \
libhashkit/$(DEPDIR)/$(am__dirstamp)
-libhashkit/libhashkit_libhashkit_la-murmur.lo: \
- libhashkit/$(am__dirstamp) \
- libhashkit/$(DEPDIR)/$(am__dirstamp)
libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo: \
libhashkit/$(am__dirstamp) \
libhashkit/$(DEPDIR)/$(am__dirstamp)
@@ -1289,6 +1300,9 @@
libhashkit/libhashkit_libhashkit_la-hsieh.lo: \
libhashkit/$(am__dirstamp) \
libhashkit/$(DEPDIR)/$(am__dirstamp)
+libhashkit/libhashkit_libhashkit_la-murmur.lo: \
+ libhashkit/$(am__dirstamp) \
+ libhashkit/$(DEPDIR)/$(am__dirstamp)
libhashkit/libhashkit.la: $(libhashkit_libhashkit_la_OBJECTS) $(libhashkit_libhashkit_la_DEPENDENCIES) libhashkit/$(am__dirstamp)
$(AM_V_CCLD)$(libhashkit_libhashkit_la_LINK) -rpath $(libdir) $(libhashkit_libhashkit_la_OBJECTS) $(libhashkit_libhashkit_la_LIBADD) $(LIBS)
libhashkit/libhashkit_libhashkitinc_la-algorithm.lo: \
@@ -1321,9 +1335,6 @@
libhashkit/libhashkit_libhashkitinc_la-md5.lo: \
libhashkit/$(am__dirstamp) \
libhashkit/$(DEPDIR)/$(am__dirstamp)
-libhashkit/libhashkit_libhashkitinc_la-murmur.lo: \
- libhashkit/$(am__dirstamp) \
- libhashkit/$(DEPDIR)/$(am__dirstamp)
libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo: \
libhashkit/$(am__dirstamp) \
libhashkit/$(DEPDIR)/$(am__dirstamp)
@@ -1333,6 +1344,9 @@
libhashkit/libhashkit_libhashkitinc_la-hsieh.lo: \
libhashkit/$(am__dirstamp) \
libhashkit/$(DEPDIR)/$(am__dirstamp)
+libhashkit/libhashkit_libhashkitinc_la-murmur.lo: \
+ libhashkit/$(am__dirstamp) \
+ libhashkit/$(DEPDIR)/$(am__dirstamp)
libhashkit/libhashkitinc.la: $(libhashkit_libhashkitinc_la_OBJECTS) $(libhashkit_libhashkitinc_la_DEPENDENCIES) libhashkit/$(am__dirstamp)
$(AM_V_CCLD)$(libhashkit_libhashkitinc_la_LINK) $(libhashkit_libhashkitinc_la_OBJECTS) $(libhashkit_libhashkitinc_la_LIBADD) $(LIBS)
libmemcached/$(am__dirstamp):
@@ -1494,18 +1508,20 @@
libmemcached/util/$(DEPDIR)/$(am__dirstamp)
libmemcached/libmemcachedutil.la: $(libmemcached_libmemcachedutil_la_OBJECTS) $(libmemcached_libmemcachedutil_la_DEPENDENCIES) libmemcached/$(am__dirstamp)
$(AM_V_CCLD)$(libmemcached_libmemcachedutil_la_LINK) $(am_libmemcached_libmemcachedutil_la_rpath) $(libmemcached_libmemcachedutil_la_OBJECTS) $(libmemcached_libmemcachedutil_la_LIBADD) $(LIBS)
-tests/$(am__dirstamp):
- @$(MKDIR_P) tests
- @: > tests/$(am__dirstamp)
-tests/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) tests/$(DEPDIR)
- @: > tests/$(DEPDIR)/$(am__dirstamp)
-tests/server.lo: tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
-tests/libserver.la: $(tests_libserver_la_OBJECTS) $(tests_libserver_la_DEPENDENCIES) tests/$(am__dirstamp)
- $(AM_V_CCLD)$(LINK) $(tests_libserver_la_OBJECTS) $(tests_libserver_la_LIBADD) $(LIBS)
-tests/test.lo: tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
-tests/libtest.la: $(tests_libtest_la_OBJECTS) $(tests_libtest_la_DEPENDENCIES) tests/$(am__dirstamp)
- $(AM_V_CCLD)$(LINK) $(tests_libtest_la_OBJECTS) $(tests_libtest_la_LIBADD) $(LIBS)
+libtest/$(am__dirstamp):
+ @$(MKDIR_P) libtest
+ @: > libtest/$(am__dirstamp)
+libtest/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) libtest/$(DEPDIR)
+ @: > libtest/$(DEPDIR)/$(am__dirstamp)
+libtest/server.lo: libtest/$(am__dirstamp) \
+ libtest/$(DEPDIR)/$(am__dirstamp)
+libtest/libserver.la: $(libtest_libserver_la_OBJECTS) $(libtest_libserver_la_DEPENDENCIES) libtest/$(am__dirstamp)
+ $(AM_V_CCLD)$(LINK) $(libtest_libserver_la_OBJECTS) $(libtest_libserver_la_LIBADD) $(LIBS)
+libtest/test.lo: libtest/$(am__dirstamp) \
+ libtest/$(DEPDIR)/$(am__dirstamp)
+libtest/libtest.la: $(libtest_libtest_la_OBJECTS) $(libtest_libtest_la_DEPENDENCIES) libtest/$(am__dirstamp)
+ $(AM_V_CCLD)$(LINK) $(libtest_libtest_la_OBJECTS) $(libtest_libtest_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@@ -1643,6 +1659,12 @@
example/memcached_light$(EXEEXT): $(example_memcached_light_OBJECTS) $(example_memcached_light_DEPENDENCIES) example/$(am__dirstamp)
@rm -f example/memcached_light$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(example_memcached_light_OBJECTS) $(example_memcached_light_LDADD) $(LIBS)
+tests/$(am__dirstamp):
+ @$(MKDIR_P) tests
+ @: > tests/$(am__dirstamp)
+tests/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tests/$(DEPDIR)
+ @: > tests/$(DEPDIR)/$(am__dirstamp)
tests/atomsmasher.$(OBJEXT): tests/$(am__dirstamp) \
tests/$(DEPDIR)/$(am__dirstamp)
tests/atomsmasher$(EXEEXT): $(tests_atomsmasher_OBJECTS) $(tests_atomsmasher_DEPENDENCIES) tests/$(am__dirstamp)
@@ -1863,15 +1885,15 @@
-rm -f libmemcached/util/libmemcached_libmemcachedutil_la-pool.lo
-rm -f libmemcached/util/libmemcached_libmemcachedutil_la-version.$(OBJEXT)
-rm -f libmemcached/util/libmemcached_libmemcachedutil_la-version.lo
+ -rm -f libtest/server.$(OBJEXT)
+ -rm -f libtest/server.lo
+ -rm -f libtest/test.$(OBJEXT)
+ -rm -f libtest/test.lo
-rm -f poll/libmemcached_libmemcached_la-poll.$(OBJEXT)
-rm -f poll/libmemcached_libmemcached_la-poll.lo
-rm -f tests/atomsmasher.$(OBJEXT)
-rm -f tests/hashkit_functions.$(OBJEXT)
- -rm -f tests/server.$(OBJEXT)
- -rm -f tests/server.lo
-rm -f tests/start.$(OBJEXT)
- -rm -f tests/test.$(OBJEXT)
- -rm -f tests/test.lo
-rm -f tests/tests_hashplus-hash_plus.$(OBJEXT)
-rm -f tests/tests_memplus-mem_plus.$(OBJEXT)
-rm -f tests/tests_testapp-mem_functions.$(OBJEXT)
@@ -1975,12 +1997,12 @@
@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-ping.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-pool.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-version.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/server.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/test.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@poll/$(DEPDIR)/libmemcached_libmemcached_la-poll.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/atomsmasher.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/hashkit_functions.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/server.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/start.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_hashplus-hash_plus.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memplus-mem_plus.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_testapp-mem_functions.Po@am__quote@
@@ -2096,14 +2118,6 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-md5.lo `test -f 'libhashkit/md5.c' || echo '$(srcdir)/'`libhashkit/md5.c
-libhashkit/libhashkit_libhashkit_la-murmur.lo: libhashkit/murmur.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -MT libhashkit/libhashkit_libhashkit_la-murmur.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Tpo -c -o libhashkit/libhashkit_libhashkit_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhashkit/murmur.c' object='libhashkit/libhashkit_libhashkit_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
-
libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo: libhashkit/one_at_a_time.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -MT libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-one_at_a_time.Tpo -c -o libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.c' || echo '$(srcdir)/'`libhashkit/one_at_a_time.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-one_at_a_time.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-one_at_a_time.Plo
@@ -2128,6 +2142,14 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-hsieh.lo `test -f 'libhashkit/hsieh.c' || echo '$(srcdir)/'`libhashkit/hsieh.c
+libhashkit/libhashkit_libhashkit_la-murmur.lo: libhashkit/murmur.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -MT libhashkit/libhashkit_libhashkit_la-murmur.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Tpo -c -o libhashkit/libhashkit_libhashkit_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhashkit/murmur.c' object='libhashkit/libhashkit_libhashkit_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
+
libhashkit/libhashkit_libhashkitinc_la-algorithm.lo: libhashkit/algorithm.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-algorithm.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-algorithm.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-algorithm.lo `test -f 'libhashkit/algorithm.c' || echo '$(srcdir)/'`libhashkit/algorithm.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-algorithm.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-algorithm.Plo
@@ -2208,14 +2230,6 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-md5.lo `test -f 'libhashkit/md5.c' || echo '$(srcdir)/'`libhashkit/md5.c
-libhashkit/libhashkit_libhashkitinc_la-murmur.lo: libhashkit/murmur.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-murmur.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhashkit/murmur.c' object='libhashkit/libhashkit_libhashkitinc_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
-
libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo: libhashkit/one_at_a_time.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-one_at_a_time.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.c' || echo '$(srcdir)/'`libhashkit/one_at_a_time.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-one_at_a_time.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-one_at_a_time.Plo
@@ -2240,6 +2254,14 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-hsieh.lo `test -f 'libhashkit/hsieh.c' || echo '$(srcdir)/'`libhashkit/hsieh.c
+libhashkit/libhashkit_libhashkitinc_la-murmur.lo: libhashkit/murmur.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-murmur.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libhashkit/murmur.c' object='libhashkit/libhashkit_libhashkitinc_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
+
libmemcached/libmemcached_libmemcached_la-allocators.lo: libmemcached/allocators.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CFLAGS) $(CFLAGS) -MT libmemcached/libmemcached_libmemcached_la-allocators.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Tpo -c -o libmemcached/libmemcached_libmemcached_la-allocators.lo `test -f 'libmemcached/allocators.c' || echo '$(srcdir)/'`libmemcached/allocators.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Plo
@@ -2737,6 +2759,7 @@
-rm -rf libmemcached/.libs libmemcached/_libs
-rm -rf libmemcached/protocol/.libs libmemcached/protocol/_libs
-rm -rf libmemcached/util/.libs libmemcached/util/_libs
+ -rm -rf libtest/.libs libtest/_libs
-rm -rf poll/.libs poll/_libs
-rm -rf tests/.libs tests/_libs
-rm -rf unittests/.libs unittests/_libs
@@ -3258,6 +3281,8 @@
-rm -f libmemcached/protocol/$(am__dirstamp)
-rm -f libmemcached/util/$(DEPDIR)/$(am__dirstamp)
-rm -f libmemcached/util/$(am__dirstamp)
+ -rm -f libtest/$(DEPDIR)/$(am__dirstamp)
+ -rm -f libtest/$(am__dirstamp)
-rm -f poll/$(DEPDIR)/$(am__dirstamp)
-rm -f poll/$(am__dirstamp)
-rm -f tests/$(DEPDIR)/$(am__dirstamp)
@@ -3277,7 +3302,7 @@
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf clients/$(DEPDIR) example/$(DEPDIR) libhashkit/$(DEPDIR) libmemcached/$(DEPDIR) libmemcached/protocol/$(DEPDIR) libmemcached/util/$(DEPDIR) poll/$(DEPDIR) tests/$(DEPDIR) unittests/$(DEPDIR)
+ -rm -rf clients/$(DEPDIR) example/$(DEPDIR) libhashkit/$(DEPDIR) libmemcached/$(DEPDIR) libmemcached/protocol/$(DEPDIR) libmemcached/util/$(DEPDIR) libtest/$(DEPDIR) poll/$(DEPDIR) tests/$(DEPDIR) unittests/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
@@ -3326,7 +3351,7 @@
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf clients/$(DEPDIR) example/$(DEPDIR) libhashkit/$(DEPDIR) libmemcached/$(DEPDIR) libmemcached/protocol/$(DEPDIR) libmemcached/util/$(DEPDIR) poll/$(DEPDIR) tests/$(DEPDIR) unittests/$(DEPDIR)
+ -rm -rf clients/$(DEPDIR) example/$(DEPDIR) libhashkit/$(DEPDIR) libmemcached/$(DEPDIR) libmemcached/protocol/$(DEPDIR) libmemcached/util/$(DEPDIR) libtest/$(DEPDIR) poll/$(DEPDIR) tests/$(DEPDIR) unittests/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/README.win32
^
|
@@ -0,0 +1,25 @@
+Hi,
+
+So you want to know how to build libmemcached on Windows? In order to
+have a single build environment you need to install mingw to get a
+"unix environment" to run the configure script.
+
+An easy way to get started is to install the msysgit fullinstall
+package from: http://code.google.com/p/msysgit/downloads/list
+
+msysgit does not contain the "autotools" needed to generate a
+configure script, so you need to generate that on another box (this
+should not be a problem if you're trying to build from a tar archive).
+
+msysgit does not contain the tools to build the documentation, so you
+need to add --without-docs to configure.
+
+I'm normally building libmemcached with:
+
+Ex:
+$ ./configure --without-docs --with-memcached=../memcached/memcached.exe
+$ make all install
+
+Happy hacking,
+
+Trond Norbye
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/aclocal.m4
^
|
@@ -1043,6 +1043,7 @@
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
m4_include([m4/memcached.m4])
+m4_include([m4/murmur.m4])
m4_include([m4/pandora_64bit.m4])
m4_include([m4/pandora_canonical.m4])
m4_include([m4/pandora_check_compiler_version.m4])
@@ -1075,3 +1076,4 @@
m4_include([m4/podchecker.m4])
m4_include([m4/protocol_binary.m4])
m4_include([m4/setsockopt.m4])
+m4_include([m4/socket_send_flags.m4])
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/clients/memcapable.c
^
|
@@ -1937,9 +1937,19 @@
{ NULL, NULL}
};
+const int ascii_tests = 1;
+const int binary_tests = 2;
+
+struct test_type_st
+{
+ bool ascii;
+ bool binary;
+};
+
int main(int argc, char **argv)
{
static const char * const status_msg[]= {"[skip]", "[pass]", "[pass]", "[FAIL]"};
+ struct test_type_st tests= { true, true };
int total= 0;
int failed= 0;
const char *hostname= "localhost";
@@ -1948,9 +1958,19 @@
bool prompt= false;
const char *testname= NULL;
- while ((cmd= getopt(argc, argv, "t:vch:p:PT:?")) != EOF)
+
+
+ while ((cmd= getopt(argc, argv, "t:vch:p:PT:?ab")) != EOF)
{
switch (cmd) {
+ case 'a':
+ tests.ascii= true;
+ tests.binary= false;
+ break;
+ case 'b':
+ tests.ascii= false;
+ tests.binary= true;
+ break;
case 't':
timeout= atoi(optarg);
if (timeout == 0)
@@ -1972,8 +1992,7 @@
case 'T': testname= optarg;
break;
default:
- fprintf(stderr, "Usage: %s [-h hostname] [-p port] [-c] [-v] [-t n]"
- " [-P] [-T testname]'\n"
+ fprintf(stderr, "Usage: %s [-h hostname] [-p port] [-c] [-v] [-t n] [-P] [-T testname]'\n"
"\t-c\tGenerate coredump if a test fails\n"
"\t-v\tVerbose test output (print out the assertion)\n"
"\t-t n\tSet the timeout for io-operations to n seconds\n"
@@ -1981,7 +2000,9 @@
"\t\t\t\"skip\" will skip the test\n"
"\t\t\t\"quit\" will terminate memcapable\n"
"\t\t\tEverything else will start the test\n"
- "\t-T n\tJust run the test named n\n",
+ "\t-T n\tJust run the test named n\n"
+ "\t-a\tOnly test the ascii protocol\n"
+ "\t-b\tOnly test the binary protocol\n",
argv[0]);
return 1;
}
@@ -2001,6 +2022,11 @@
if (testname != NULL && strcmp(testcases[ii].description, testname) != 0)
continue;
+ if ((testcases[ii].description[0] == 'a' && (tests.ascii) == 0) ||
+ (testcases[ii].description[0] == 'b' && (tests.binary) == 0))
+ {
+ continue;
+ }
++total;
fprintf(stdout, "%-40s", testcases[ii].description);
fflush(stdout);
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/clients/memdump.c
^
|
@@ -43,10 +43,11 @@
static char *opt_passwd;
/* Print the keys and counter how many were found */
-static memcached_return_t key_printer(const memcached_st *ptr __attribute__((unused)),
+static memcached_return_t key_printer(const memcached_st *ptr,
const char *key, size_t key_length,
- void *context __attribute__((unused)))
+ void *context)
{
+ (void)ptr;(void)context;
printf("%.*s\n", (uint32_t)key_length, key);
return MEMCACHED_SUCCESS;
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/clients/ms_conn.c
^
|
@@ -18,6 +18,7 @@
#include <event.h>
#include <fcntl.h>
#include <netinet/tcp.h>
+#include <netinet/in.h>
#include <arpa/inet.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/clients/utilities.c
^
|
@@ -71,9 +71,10 @@
void help_command(const char *command_name, const char *description,
const struct option *long_options,
- memcached_programs_help_st *options __attribute__((unused)))
+ memcached_programs_help_st *options)
{
unsigned int x;
+ (void)options;
printf("%s v%u.%u\n\n", command_name, 1U, 0U);
printf("\t%s\n\n", description);
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/config.h.in
^
|
@@ -146,6 +146,15 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have a MSG_DONTWAIT */
+#undef HAVE_MSG_DONTWAIT
+
+/* Define to 1 if you have a MSG_NOSIGNAL */
+#undef HAVE_MSG_NOSIGNAL
+
+/* Enables murmur hashing support */
+#undef HAVE_MURMUR_HASH
+
/* For some non posix threads */
#undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC
@@ -582,6 +591,14 @@
#define get_socket_errno() errno
#endif
+#ifndef HAVE_MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+
+#ifndef HAVE_MSG_DONTWAIT
+#define MSG_DONTWAIT 0
+#endif
+
#endif
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/configure
^
|
@@ -1,7 +1,7 @@
#! /bin/sh
# Grabbing changelog and version information from bzr
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.66 for libmemcached 0.46.
+# Generated by GNU Autoconf 2.66 for libmemcached 0.48.
#
# Report bugs to <http://libmemcached.org/>.
#
@@ -563,8 +563,8 @@
# Identity of this package.
PACKAGE_NAME='libmemcached'
PACKAGE_TARNAME='libmemcached'
-PACKAGE_VERSION='0.46'
-PACKAGE_STRING='libmemcached 0.46'
+PACKAGE_VERSION='0.48'
+PACKAGE_STRING='libmemcached 0.48'
PACKAGE_BUGREPORT='http://libmemcached.org/'
PACKAGE_URL=''
@@ -641,6 +641,8 @@
HAVE_LIBINNODB
DEPRECATED
MEMC_BINARY
+INCLUDE_MURMUR_SRC_FALSE
+INCLUDE_MURMUR_SRC_TRUE
INCLUDE_HSIEH_SRC_FALSE
INCLUDE_HSIEH_SRC_TRUE
BUILD_LIBMEMCACHEDUTIL_FALSE
@@ -874,6 +876,7 @@
with_libevent_prefix
enable_utils
enable_hsieh_hash
+enable_murmur_hash
with_memcached
enable_deprecated
enable_libinnodb
@@ -1437,7 +1440,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libmemcached 0.46 to adapt to many kinds of systems.
+\`configure' configures libmemcached 0.48 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1508,7 +1511,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libmemcached 0.46:";;
+ short | recursive ) echo "Configuration of libmemcached 0.48:";;
esac
cat <<\_ACEOF
@@ -1541,8 +1544,8 @@
--disable-rpath do not hardcode runtime library paths
--disable-libevent Build with libevent support [default=on]
--disable-utils Disable libmemcachedutils [default=on]
- --enable-hsieh_hash build with support for hsieh hashing.
- @<:default=off]
+ --enable-hsieh_hash build with support for hsieh hashing. [default=off]
+ --disable-murmur_hash build with support for murmur hashing. [default=on]
--enable-deprecated Enable deprecated interface [default=off]
--disable-libinnodb Build with libinnodb support [default=on]
--disable-sasl Build with sasl support [default=on]
@@ -1650,7 +1653,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libmemcached configure 0.46
+libmemcached configure 0.48
generated by GNU Autoconf 2.66
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2555,7 +2558,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libmemcached $as_me 0.46, which was
+It was created by libmemcached $as_me 0.48, which was
generated by GNU Autoconf 2.66. Invocation command line was
$ $0 $@
@@ -4982,7 +4985,7 @@
isainfo_b="x"
fi
- if test "$isainfo_b" != "x"; then :
+ if test "$isainfo_b" != "x" -a "$isainfo_b" != "32"; then :
isainfo_k=`${ISAINFO} -k`
@@ -15190,7 +15193,7 @@
# Define the identity of the package.
PACKAGE='libmemcached'
- VERSION='0.46'
+ VERSION='0.48'
cat >>confdefs.h <<_ACEOF
@@ -17577,7 +17580,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_Wextra_" >&5
$as_echo "$ac_cv_safe_to_use_Wextra_" >&6; }
- BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
+ BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wswitch-enum -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
if test "$ac_cv_safe_to_use_Wextra_" = "yes"; then :
BASE_WARNINGS="${BASE_WARNINGS} -Wextra"
else
@@ -21710,6 +21713,29 @@
fi
+# Check whether --enable-murmur_hash was given.
+if test "${enable_murmur_hash+set}" = set; then :
+ enableval=$enable_murmur_hash; ac_cv_enable_murmur_hash=no
+else
+ ac_cv_enable_murmur_hash=yes
+fi
+
+
+ if test "$ac_cv_enable_murmur_hash" = "yes"; then :
+
+$as_echo "#define HAVE_MURMUR_HASH 1" >>confdefs.h
+
+fi
+
+ if test "$ac_cv_enable_murmur_hash" = "yes"; then
+ INCLUDE_MURMUR_SRC_TRUE=
+ INCLUDE_MURMUR_SRC_FALSE='#'
+else
+ INCLUDE_MURMUR_SRC_TRUE='#'
+ INCLUDE_MURMUR_SRC_FALSE=
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported struct padding" >&5
$as_echo_n "checking for supported struct padding... " >&6; }
@@ -24025,6 +24051,116 @@
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL" >&5
+$as_echo_n "checking for MSG_NOSIGNAL... " >&6; }
+if test "${ac_cv_msg_nosignal+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -I${srcdir}"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/socket.h>
+
+int
+main ()
+{
+
+int flags= MSG_NOSIGNAL;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_msg_nosignal=yes
+else
+ ac_cv_msg_nosignal=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$save_CFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_msg_nosignal" >&5
+$as_echo "$ac_cv_msg_nosignal" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_DONTWAIT" >&5
+$as_echo_n "checking for MSG_DONTWAIT... " >&6; }
+if test "${ac_cv_msg_dontwait+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -I${srcdir}"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/socket.h>
+
+int
+main ()
+{
+
+int flags= MSG_DONTWAIT;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_msg_dontwait=yes
+else
+ ac_cv_msg_dontwait=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$save_CFLAGS"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_msg_dontwait" >&5
+$as_echo "$ac_cv_msg_dontwait" >&6; }
+
+ if test "x$ac_cv_msg_nosignal" = "xyes"; then :
+
+
+$as_echo "#define HAVE_MSG_NOSIGNAL 1" >>confdefs.h
+
+fi
+ if test "x$ac_cv_msg_dontwait" = "xyes"; then :
+
+
+$as_echo "#define HAVE_MSG_DONTWAIT 1" >>confdefs.h
+
+fi
+
+
ac_config_files="$ac_config_files Makefile docs/Makefile libhashkit/configure.h libmemcached/configure.h support/libmemcached.pc support/libmemcached.spec support/libmemcached-fc.spec"
cat >confcache <<\_ACEOF
@@ -24194,6 +24330,10 @@
as_fn_error $? "conditional \"INCLUDE_HSIEH_SRC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${INCLUDE_MURMUR_SRC_TRUE}" && test -z "${INCLUDE_MURMUR_SRC_FALSE}"; then
+ as_fn_error $? "conditional \"INCLUDE_MURMUR_SRC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_LIBINNODB_TRUE}" && test -z "${HAVE_LIBINNODB_FALSE}"; then
as_fn_error $? "conditional \"HAVE_LIBINNODB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -24630,7 +24770,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libmemcached $as_me 0.46, which was
+This file was extended by libmemcached $as_me 0.48, which was
generated by GNU Autoconf 2.66. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -24696,7 +24836,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libmemcached config.status 0.46
+libmemcached config.status 0.48
configured by $0, generated by GNU Autoconf 2.66,
with options \\"\$ac_cs_config\\"
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/configure.ac
^
|
@@ -7,7 +7,7 @@
# the COPYING file in this directory for full text.
AC_PREREQ(2.59)
-AC_INIT([libmemcached],[0.46],[http://libmemcached.org/])
+AC_INIT([libmemcached],[0.48],[http://libmemcached.org/])
AC_CONFIG_SRCDIR([libmemcached/memcached.c])
AC_CONFIG_AUX_DIR(config)
@@ -80,6 +80,14 @@
#define get_socket_errno() errno
#endif
+#ifndef HAVE_MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+
+#ifndef HAVE_MSG_DONTWAIT
+#define MSG_DONTWAIT 0
+#endif
+
#endif
])
@@ -101,6 +109,7 @@
ENABLE_UTILLIB
SETSOCKOPT_SANITY
ENABLE_HSIEH_HASH
+ENABLE_MURMUR_HASH
PROTOCOL_BINARY_TEST
WITH_MEMCACHED
ENABLE_DEPRECATED
@@ -144,6 +153,7 @@
AM_CXXFLAGS="$AM_CXXFLAGS $NO_WERROR"
])
DETECT_EAGAIN
+SOCKET_SEND_FLAGS
AC_CONFIG_FILES([
Makefile
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/docs/Makefile.in
^
|
@@ -68,7 +68,7 @@
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/memcached.m4 \
- $(top_srcdir)/m4/pandora_64bit.m4 \
+ $(top_srcdir)/m4/murmur.m4 $(top_srcdir)/m4/pandora_64bit.m4 \
$(top_srcdir)/m4/pandora_canonical.m4 \
$(top_srcdir)/m4/pandora_check_compiler_version.m4 \
$(top_srcdir)/m4/pandora_check_cxx_standard.m4 \
@@ -98,7 +98,9 @@
$(top_srcdir)/m4/pandora_warnings.m4 \
$(top_srcdir)/m4/pod2man.m4 $(top_srcdir)/m4/podchecker.m4 \
$(top_srcdir)/m4/protocol_binary.m4 \
- $(top_srcdir)/m4/setsockopt.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/setsockopt.m4 \
+ $(top_srcdir)/m4/socket_send_flags.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/docs/memcached_behavior.pod
^
|
@@ -239,13 +239,13 @@
Find the current size of SO_SNDBUF. A value of 0 means either an error
occured or no hosts were available. It is safe to assume system default
-if this occurs.
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
=item MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
Find the current size of SO_RCVBUF. A value of 0 means either an error
occured or no hosts were available. It is safe to assume system default
-if this occurs.
+if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
=item MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/docs/memcached_callback.pod
^
|
@@ -56,6 +56,8 @@
not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case
of a key which is too long MEMCACHED_BAD_KEY_PROVIDED will be returned.
+If you set a value with the value being NULL then the prefix key is disabled.
+
=item MEMCACHED_CALLBACK_USER_DATA
This allows you to store a pointer to a specifc piece of data. This can be
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/example/memcached_light.c
^
|
@@ -287,8 +287,8 @@
/**
* Print out the command we are about to execute
*/
-static void pre_execute(const void *cookie __attribute__((unused)),
- protocol_binary_request_header *header __attribute__((unused)))
+static void pre_execute(const void *cookie,
+ protocol_binary_request_header *header)
{
if (verbose)
{
@@ -303,8 +303,8 @@
/**
* Print out the command we just executed
*/
-static void post_execute(const void *cookie __attribute__((unused)),
- protocol_binary_request_header *header __attribute__((unused)))
+static void post_execute(const void *cookie,
+ protocol_binary_request_header *header)
{
if (verbose)
{
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/example/storage.c
^
|
@@ -165,7 +165,8 @@
item->cas= ++cas;
}
-void release_item(struct item* item __attribute__((unused)))
+void release_item(struct item* item)
{
+ (void)item;
/* EMPTY */
}
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/algorithm.c
^
|
@@ -45,10 +45,12 @@
}
#endif
+#ifdef HAVE_MURMUR_HASH
uint32_t libhashkit_murmur(const char *key, size_t key_length)
{
return hashkit_murmur(key, key_length, NULL);
}
+#endif
uint32_t libhashkit_jenkins(const char *key, size_t key_length)
{
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/algorithm.h
^
|
@@ -41,8 +41,10 @@
uint32_t libhashkit_hsieh(const char *key, size_t key_length);
#endif
+#ifdef HAVE_MURMUR_HASH
HASHKIT_API
uint32_t libhashkit_murmur(const char *key, size_t key_length);
+#endif
HASHKIT_API
uint32_t libhashkit_jenkins(const char *key, size_t key_length);
@@ -73,8 +75,10 @@
uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context);
#endif
+#ifdef HAVE_MURMUR_HASH
HASHKIT_LOCAL
uint32_t hashkit_murmur(const char *key, size_t key_length, void *context);
+#endif
HASHKIT_LOCAL
uint32_t hashkit_jenkins(const char *key, size_t key_length, void *context);
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/crc32.c
^
|
@@ -73,10 +73,11 @@
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
};
-uint32_t hashkit_crc32(const char *key, size_t key_length, void *context __attribute__((unused)))
+uint32_t hashkit_crc32(const char *key, size_t key_length, void *context)
{
uint64_t x;
uint32_t crc= UINT32_MAX;
+ (void)context;
for (x= 0; x < key_length; x++)
crc= (crc >> 8) ^ crc32tab[(crc ^ (uint64_t)key[x]) & 0xff];
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/digest.c
^
|
@@ -38,7 +38,11 @@
return 1;
#endif
case HASHKIT_HASH_MURMUR:
+#ifdef HAVE_MURMUR_HASH
return libhashkit_murmur(key, key_length);
+#else
+ return 1;
+#endif
case HASHKIT_HASH_JENKINS:
return libhashkit_jenkins(key, key_length);
case HASHKIT_HASH_CUSTOM:
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/fnv.c
^
|
@@ -14,10 +14,11 @@
static uint32_t FNV_32_INIT= 2166136261UL;
static uint32_t FNV_32_PRIME= 16777619;
-uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __attribute__((unused)))
+uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context)
{
/* Thanks to pierre@demartines.com for the pointer */
uint64_t hash= FNV_64_INIT;
+ (void)context;
for (size_t x= 0; x < key_length; x++)
{
@@ -28,9 +29,10 @@
return (uint32_t)hash;
}
-uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context __attribute__((unused)))
+uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context)
{
uint32_t hash= (uint32_t) FNV_64_INIT;
+ (void)context;
for (size_t x= 0; x < key_length; x++)
{
@@ -42,9 +44,10 @@
return hash;
}
-uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __attribute__((unused)))
+uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context)
{
uint32_t hash= FNV_32_INIT;
+ (void)context;
for (size_t x= 0; x < key_length; x++)
{
@@ -56,9 +59,10 @@
return hash;
}
-uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context __attribute__((unused)))
+uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context)
{
uint32_t hash= FNV_32_INIT;
+ (void)context;
for (size_t x= 0; x < key_length; x++)
{
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/function.c
^
|
@@ -41,8 +41,12 @@
return HASHKIT_FAILURE;
#endif
case HASHKIT_HASH_MURMUR:
+#ifdef HAVE_MURMUR_HASH
self->function= hashkit_murmur;
break;
+#else
+ return HASHKIT_FAILURE;
+#endif
case HASHKIT_HASH_JENKINS:
self->function= hashkit_jenkins;
break;
@@ -126,10 +130,12 @@
return HASHKIT_HASH_HSIEH;
}
#endif
+#ifdef HAVE_MURMUR_HASH
else if (function == hashkit_murmur)
{
return HASHKIT_HASH_MURMUR;
}
+#endif
else if (function == hashkit_jenkins)
{
return HASHKIT_HASH_JENKINS;
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/include.am
^
|
@@ -40,7 +40,6 @@
libhashkit/jenkins.c \
libhashkit/ketama.c \
libhashkit/md5.c \
- libhashkit/murmur.c \
libhashkit/one_at_a_time.c \
libhashkit/strerror.c
@@ -48,6 +47,10 @@
libhashkit_libhashkit_la_SOURCES+= libhashkit/hsieh.c
endif
+if INCLUDE_MURMUR_SRC
+libhashkit_libhashkit_la_SOURCES+= libhashkit/murmur.c
+endif
+
libhashkit_libhashkit_la_CFLAGS= \
${AM_CFLAGS} \
-DBUILDING_HASHKIT
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/jenkins.c
^
|
@@ -56,10 +56,11 @@
In which case, the hash table should have hashsize(10) elements.
*/
-uint32_t hashkit_jenkins(const char *key, size_t length, void *context __attribute__((unused)))
+uint32_t hashkit_jenkins(const char *key, size_t length, void *context)
{
uint32_t a,b,c; /* internal state */
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
+ (void)context;
/* Set up the internal state */
a = b = c = 0xdeadbeef + ((uint32_t)length) + JENKINS_INITVAL;
@@ -82,7 +83,7 @@
}
/*----------------------------- handle the last (probably partial) block */
- /*
+ /*
* "k[2]&0xffffff" actually reads beyond the end of the string, but
* then masks off the part it's not allowed to read. Because the
* string is aligned, the masked-off tail is in the same word as the
@@ -109,7 +110,7 @@
default: return c;
}
- }
+ }
else if ((u.i & 0x1) == 0)
{
const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */
@@ -159,7 +160,7 @@
default: return c;
}
- }
+ }
else
{ /* need to read the key one byte at a time */
#endif /* little endian */
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/md5.c
^
|
@@ -1,5 +1,5 @@
/*
- This Library has been modified from its original form by
+ This Library has been modified from its original form by
Brian Aker (brian@tangent.org)
See below for original Copyright.
@@ -125,7 +125,7 @@
}
-/*
+/*
Just a simple method for getting the signature
result must be == 16
*/
@@ -352,9 +352,10 @@
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
}
-uint32_t hashkit_md5(const char *key, size_t key_length, void *context __attribute__((unused)))
+uint32_t hashkit_md5(const char *key, size_t key_length, void *context)
{
unsigned char results[16];
+ (void)context;
md5_signature((unsigned char*)key, (unsigned int)key_length, results);
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/murmur.c
^
|
@@ -1,4 +1,4 @@
-/*
+/*
"Murmur" hash provided by Austin, tanjent@gmail.com
http://murmurhash.googlepages.com/
@@ -17,9 +17,9 @@
#include "common.h"
-uint32_t hashkit_murmur(const char *key, size_t length, void *context __attribute__((unused)))
+uint32_t hashkit_murmur(const char *key, size_t length, void *context)
{
- /*
+ /*
'm' and 'r' are mixing constants generated offline. They're not
really 'magic', they just happen to work well.
*/
@@ -36,16 +36,17 @@
// Mix 4 bytes at a time into the hash
const unsigned char * data= (const unsigned char *)key;
+ (void)context;
while(length >= 4)
{
unsigned int k = *(unsigned int *)data;
- k *= m;
- k ^= k >> r;
- k *= m;
+ k *= m;
+ k ^= k >> r;
+ k *= m;
- h *= m;
+ h *= m;
h ^= k;
data += 4;
@@ -63,9 +64,9 @@
default: break;
};
- /*
+ /*
Do a few final mixes of the hash to ensure the last few bytes are
- well-incorporated.
+ well-incorporated.
*/
h ^= h >> 13;
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/one_at_a_time.c
^
|
@@ -13,10 +13,11 @@
#include "common.h"
-uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context __attribute__((unused)))
+uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context)
{
const char *ptr= key;
uint32_t value= 0;
+ (void)context;
while (key_length--)
{
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libhashkit/strerror.c
^
|
@@ -8,8 +8,9 @@
#include "common.h"
-const char *hashkit_strerror(hashkit_st *ptr __attribute__((unused)), hashkit_return_t rc)
+const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc)
{
+ (void)ptr;
switch (rc)
{
case HASHKIT_SUCCESS:
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/behavior.c
^
|
@@ -313,11 +313,20 @@
/* REFACTOR */
/* We just try the first host, and if it is down we return zero */
if ((memcached_connect(instance)) != MEMCACHED_SUCCESS)
+ {
return 0;
+ }
- if (getsockopt(instance->fd, SOL_SOCKET,
- SO_SNDBUF, &sock_size, &sock_length))
+ if (memcached_io_wait_for_write(instance) != MEMCACHED_SUCCESS)
+ {
+ return 0;
+ }
+
+ if (getsockopt(instance->fd, SOL_SOCKET, SO_SNDBUF, &sock_size, &sock_length) < 0)
+ {
+ ptr->cached_errno= errno;
return 0; /* Zero means error */
+ }
}
return (uint64_t) sock_size;
@@ -340,11 +349,20 @@
{
/* We just try the first host, and if it is down we return zero */
if ((memcached_connect(instance)) != MEMCACHED_SUCCESS)
+ {
+ return 0;
+ }
+
+ if (memcached_io_wait_for_write(instance) != MEMCACHED_SUCCESS)
+ {
return 0;
+ }
- if (getsockopt(instance->fd, SOL_SOCKET,
- SO_RCVBUF, &sock_size, &sock_length))
+ if (getsockopt(instance->fd, SOL_SOCKET, SO_RCVBUF, &sock_size, &sock_length) < 0)
+ {
+ ptr->cached_errno= errno;
return 0; /* Zero means error */
+ }
}
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/configure.h
^
|
@@ -19,8 +19,8 @@
#define LIBMEMCACHED_WITH_SASL_SUPPORT 1
-#define LIBMEMCACHED_VERSION_STRING "0.46"
-#define LIBMEMCACHED_VERSION_HEX 0x00046000
+#define LIBMEMCACHED_VERSION_STRING "0.48"
+#define LIBMEMCACHED_VERSION_HEX 0x00048000
#ifdef __cplusplus
}
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/hosts.c
^
|
@@ -337,7 +337,9 @@
if ((ptr->flags.use_udp && list[x].type != MEMCACHED_CONNECTION_UDP)
|| ((list[x].type == MEMCACHED_CONNECTION_UDP)
&& ! (ptr->flags.use_udp)) )
+ {
return MEMCACHED_INVALID_HOST_PROTOCOL;
+ }
WATCHPOINT_ASSERT(list[x].hostname[0] != 0);
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/include.am
^
|
@@ -149,7 +149,7 @@
endif
if HAVE_SASL
-libmemcached_libmemcached_la_LDFLAGS+= $(LIBSASL)
+libmemcached_libmemcached_la_LDFLAGS+= $(LTLIBSASL) $(LTLIBSASL2)
libmemcached_libmemcached_la_SOURCES += libmemcached/sasl.c
endif
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/io.c
^
|
@@ -105,6 +105,11 @@
return MEMCACHED_FAILURE;
}
+memcached_return_t memcached_io_wait_for_write(memcached_server_write_instance_st ptr)
+{
+ return io_wait(ptr, MEM_WRITE);
+}
+
/**
* Try to fill the input buffer for a server with as much
* data as possible.
@@ -614,7 +619,7 @@
increment_udp_message_id(ptr);
WATCHPOINT_ASSERT(ptr->fd != -1);
- sent_length= send(ptr->fd, local_write_ptr, write_length, 0);
+ sent_length= send(ptr->fd, local_write_ptr, write_length, MSG_NOSIGNAL|MSG_DONTWAIT);
if (sent_length == SOCKET_ERROR)
{
ptr->cached_errno= get_socket_errno();
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/io.h
^
|
@@ -47,6 +47,9 @@
};
LIBMEMCACHED_LOCAL
+memcached_return_t memcached_io_wait_for_write(memcached_server_write_instance_st ptr);
+
+LIBMEMCACHED_LOCAL
ssize_t memcached_io_writev(memcached_server_write_instance_st ptr,
const struct libmemcached_io_vector_st *vector,
size_t number_of, bool with_flush);
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/platform.h
^
|
@@ -20,11 +20,11 @@
#else
typedef int memcached_socket_t;
#include <sys/socket.h>
+#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/un.h>
#include <netinet/tcp.h>
-#include <netinet/in.h>
#endif /* WIN32 */
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/result.c
^
|
@@ -92,7 +92,14 @@
const char *value,
size_t length)
{
- return memcached_string_append(&ptr->value, value, length);
+ memcached_return_t rc= memcached_string_append(&ptr->value, value, length);
+
+ if (rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE)
+ {
+ ((memcached_st *)ptr->root)->cached_errno= errno;
+ }
+
+ return rc;
}
const char *memcached_result_key_value(const memcached_result_st *self)
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/server.c
^
|
@@ -115,7 +115,14 @@
if (memcached_is_allocated(self))
{
- libmemcached_free(self->root, self);
+ if (self->root)
+ {
+ libmemcached_free(self->root, self);
+ }
+ else
+ {
+ free(self);
+ }
}
else
{
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/server_list.c
^
|
@@ -37,13 +37,17 @@
new_host_list= (memcached_server_write_instance_st)realloc(ptr, sizeof(memcached_server_st) * count);
if (!new_host_list)
{
+ ptr->cached_errno= errno;
*error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
return NULL;
}
- /* TODO: Check return type */
+ /* @todo Check return type */
memcached_server_create_with(NULL, &new_host_list[count-1], hostname, port, weight, MEMCACHED_CONNECTION_TCP);
+ // Handset allocated since
+ new_host_list->options.is_allocated= true;
+
/* Backwards compatibility hack */
memcached_servers_set_count(new_host_list, count);
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/stats.c
^
|
@@ -162,7 +162,8 @@
strcmp("reclaimed", key) == 0))
{
WATCHPOINT_STRING(key);
- return MEMCACHED_UNKNOWN_STAT_KEY;
+ /* return MEMCACHED_UNKNOWN_STAT_KEY; */
+ return MEMCACHED_SUCCESS;
}
return MEMCACHED_SUCCESS;
@@ -404,9 +405,20 @@
memcached_return_t rc;
memcached_stat_st *stats;
+ if (! ptr)
+ {
+ WATCHPOINT_ASSERT(memc_ptr);
+ return NULL;
+ }
+
+ WATCHPOINT_ASSERT(error);
+
+
unlikely (ptr->flags.use_udp)
{
- *error= MEMCACHED_NOT_SUPPORTED;
+ if (error)
+ *error= MEMCACHED_NOT_SUPPORTED;
+
return NULL;
}
@@ -414,7 +426,9 @@
if (! stats)
{
- *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+ if (error)
+ *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+
return NULL;
}
@@ -444,7 +458,9 @@
rc= MEMCACHED_SOME_ERRORS;
}
- *error= rc;
+ if (error)
+ *error= rc;
+
return stats;
}
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/storage.c
^
|
@@ -310,8 +310,8 @@
}
memcached_return_t memcached_set_by_key(memcached_st *ptr,
- const char *master_key __attribute__((unused)),
- size_t master_key_length __attribute__((unused)),
+ const char *master_key,
+ size_t master_key_length,
const char *key, size_t key_length,
const char *value, size_t value_length,
time_t expiration,
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/strerror.c
^
|
@@ -1,7 +1,8 @@
#include "common.h"
-const char *memcached_strerror(memcached_st *ptr __attribute__((unused)), memcached_return_t rc)
+const char *memcached_strerror(memcached_st *ptr, memcached_return_t rc)
{
+ (void)ptr;
switch (rc)
{
case MEMCACHED_SUCCESS:
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/string.c
^
|
@@ -32,7 +32,9 @@
new_value= libmemcached_realloc(string->root, string->string, new_size);
if (new_value == NULL)
+ {
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+ }
string->string= new_value;
string->end= string->string + current_offset;
@@ -80,7 +82,12 @@
rc= _string_check(self, initial_size);
if (rc != MEMCACHED_SUCCESS)
{
+ if (rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE)
+ {
+ ((memcached_st *)memc)->cached_errno= errno;
+ }
libmemcached_free(memc, self);
+
return NULL;
}
@@ -99,7 +106,9 @@
rc= _string_check(string, 1);
if (rc != MEMCACHED_SUCCESS)
+ {
return rc;
+ }
*string->end= character;
string->end++;
@@ -115,7 +124,9 @@
rc= _string_check(string, length);
if (rc != MEMCACHED_SUCCESS)
+ {
return rc;
+ }
WATCHPOINT_ASSERT(length <= string->current_size);
WATCHPOINT_ASSERT(string->string);
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/util/version.c
^
|
@@ -22,12 +22,13 @@
bool truth;
};
-static memcached_return_t check_server_version(const memcached_st *ptr __attribute__((unused)),
+static memcached_return_t check_server_version(const memcached_st *ptr,
const memcached_server_st *instance,
void *context)
{
/* Do Nothing */
struct local_context *check= (struct local_context *)context;
+ (void)ptr;
if (instance->major_version != UINT8_MAX &&
instance->major_version >= check->major_version &&
@@ -42,7 +43,7 @@
return MEMCACHED_FAILURE;
}
-bool libmemcached_util_version_check(memcached_st *memc,
+bool libmemcached_util_version_check(memcached_st *memc,
uint8_t major_version,
uint8_t minor_version,
uint8_t micro_version)
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libmemcached/verbosity.c
^
|
@@ -1,12 +1,12 @@
#include "common.h"
-struct context_st
+struct context_st
{
size_t length;
const char *buffer;
};
-static memcached_return_t _set_verbosity(const memcached_st *ptr __attribute__((unused)),
+static memcached_return_t _set_verbosity(const memcached_st *ptr,
const memcached_server_st *server,
void *context)
{
@@ -16,6 +16,7 @@
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
struct context_st *execute= (struct context_st *)context;
+ (void)ptr;
memc_ptr= memcached_create(&local_memc);
@@ -46,7 +47,7 @@
char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
- send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
+ send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
"verbosity %u\r\n", verbosity);
if (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE || send_length < 0)
return MEMCACHED_WRITE_FAILURE;
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/libtest
^
|
+(directory)
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/libtest/include.am
^
|
@@ -0,0 +1,20 @@
+# vim:ft=automake
+# Copyright (C) 2011 Data Differential (http://datadifferential.com/)
+# 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+= \
+ libtest/server.h \
+ libtest/test.h
+
+noinst_LTLIBRARIES+= libtest/libserver.la
+libtest_libserver_la_SOURCES= libtest/server.c
+
+noinst_LTLIBRARIES+= libtest/libtest.la
+libtest_libtest_la_SOURCES= libtest/test.c
+
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/libtest/server.c
^
|
@@ -0,0 +1,246 @@
+/* LibMemcached
+ * Copyright (C) 2006-2009 Brian Aker
+ * All rights reserved.
+ *
+ * Use and distribution licensed under the BSD license. See
+ * the COPYING file in the parent directory for full text.
+ *
+ * Summary:
+ *
+ */
+
+/*
+ Startup, and shutdown the memcached servers.
+*/
+
+#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT+10
+
+#define PID_FILE_BASE "/tmp/%ulibmemcached_memc.pid"
+
+#include "config.h"
+
+#include <assert.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+
+#include <libmemcached/memcached.h>
+#include <libmemcached/util.h>
+
+#include <libtest/server.h>
+
+static struct timespec global_sleep_value= { .tv_sec= 0, .tv_nsec= 50000 };
+
+static void global_sleep(void)
+{
+#ifdef WIN32
+ sleep(1);
+#else
+ nanosleep(&global_sleep_value, NULL);
+#endif
+}
+
+static void kill_file(const char *file_buffer)
+{
+ FILE *fp= fopen(file_buffer, "r");
+
+ while ((fp= fopen(file_buffer, "r")))
+ {
+ char pid_buffer[1024];
+
+ if (fgets(pid_buffer, sizeof(pid_buffer), fp) != NULL)
+ {
+ pid_t pid= (pid_t)atoi(pid_buffer);
+ if (pid != 0)
+ {
+ if (kill(pid, SIGTERM) == -1)
+ {
+ remove(file_buffer); // If this happens we may be dealing with a dead server that left its pid file.
+ }
+ else
+ {
+ uint32_t counter= 3;
+ while ((kill(pid, 0) == 0) && --counter)
+ {
+ global_sleep();
+ }
+ }
+ }
+ }
+
+ global_sleep();
+
+ fclose(fp);
+ }
+}
+
+void server_startup(server_startup_st *construct)
+{
+ if ((construct->server_list= getenv("MEMCACHED_SERVERS")))
+ {
+ printf("servers %s\n", construct->server_list);
+ construct->servers= memcached_servers_parse(construct->server_list);
+ construct->server_list= NULL;
+ construct->count= 0;
+ }
+ else
+ {
+ {
+ char server_string_buffer[8096];
+ char *end_ptr;
+ end_ptr= server_string_buffer;
+
+ for (uint32_t x= 0; x < construct->count; x++)
+ {
+ int status;
+ in_port_t port;
+
+ {
+ char *var;
+ char variable_buffer[1024];
+
+ snprintf(variable_buffer, sizeof(variable_buffer), "LIBMEMCACHED_PORT_%u", x);
+
+ if ((var= getenv(variable_buffer)))
+ {
+ port= (in_port_t)atoi(var);
+ }
+ else
+ {
+ port= (in_port_t)(x + TEST_PORT_BASE);
+ }
+ }
+
+ char buffer[PATH_MAX];
+ snprintf(buffer, sizeof(buffer), PID_FILE_BASE, x);
+ kill_file(buffer);
+
+ if (x == 0)
+ {
+ snprintf(buffer, sizeof(buffer), "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u -m 128",
+ MEMCACHED_BINARY, x, port, port);
+ }
+ else
+ {
+ snprintf(buffer, sizeof(buffer), "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u",
+ MEMCACHED_BINARY, x, port, port);
+ }
+ if (libmemcached_util_ping("localhost", port, NULL))
+ {
+ fprintf(stderr, "Server on port %u already exists\n", port);
+ }
+ else
+ {
+ status= system(buffer);
+ fprintf(stderr, "STARTING SERVER: %s status:%d\n", buffer, status);
+ }
+ int count;
+ size_t remaining_length= sizeof(server_string_buffer) - (size_t)(end_ptr -server_string_buffer);
+ count= snprintf(end_ptr, remaining_length, "localhost:%u,", port);
+
+ if ((size_t)count >= remaining_length || count < 0)
+ {
+ fprintf(stderr, "server names grew to be larger then buffer allowed\n");
+ abort();
+ }
+ end_ptr+= count;
+ }
+ *end_ptr= 0;
+
+
+ int *pids= calloc(construct->count, sizeof(int));
+ for (uint32_t x= 0; x < construct->count; x++)
+ {
+ char buffer[PATH_MAX]; /* Nothing special for number */
+
+ snprintf(buffer, sizeof(buffer), PID_FILE_BASE, x);
+
+ uint32_t counter= 3000; // Absurd, just to catch run away process
+ while (pids[x] <= 0 && --counter)
+ {
+ FILE *file= fopen(buffer, "r");
+ if (file)
+ {
+ char pid_buffer[1024];
+ char *found= fgets(pid_buffer, sizeof(pid_buffer), file);
+
+ if (found)
+ {
+ pids[x]= atoi(pid_buffer);
+ fclose(file);
+
+ if (pids[x] > 0)
+ break;
+ }
+ fclose(file);
+ }
+ global_sleep();
+ }
+
+ bool was_started= false;
+ if (pids[x] > 0)
+ {
+ counter= 30;
+ while (--counter)
+ {
+ if (kill(pids[x], 0) == 0)
+ {
+ was_started= true;
+ break;
+ }
+ global_sleep();
+ }
+ }
+
+ if (was_started == false)
+ {
+ fprintf(stderr, "Failed to open buffer %s(%d)\n", buffer, pids[x]);
+ for (uint32_t y= 0; y < construct->count; y++)
+ {
+ if (pids[y] > 0)
+ kill(pids[y], SIGTERM);
+ }
+ abort();
+ }
+ }
+ free(pids);
+
+ construct->server_list= strdup(server_string_buffer);
+ }
+ printf("servers %s\n", construct->server_list);
+ construct->servers= memcached_servers_parse(construct->server_list);
+ }
+
+ assert(construct->servers);
+
+ srandom((unsigned int)time(NULL));
+
+ for (uint32_t x= 0; x < memcached_server_list_count(construct->servers); x++)
+ {
+ printf("\t%s : %d\n", memcached_server_name(&construct->servers[x]), memcached_server_port(&construct->servers[x]));
+ assert(construct->servers[x].fd == -1);
+ assert(construct->servers[x].cursor_active == 0);
+ }
+
+ printf("\n");
+}
+
+void server_shutdown(server_startup_st *construct)
+{
+ if (construct->server_list)
+ {
+ for (uint32_t x= 0; x < construct->count; x++)
+ {
+ char file_buffer[PATH_MAX]; /* Nothing special for number */
+ snprintf(file_buffer, sizeof(file_buffer), PID_FILE_BASE, x);
+ kill_file(file_buffer);
+ }
+
+ free(construct->server_list);
+ }
+}
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/libtest/server.h
^
|
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ * Copyright (C) 2006-2009 Brian Aker
+ * All rights reserved.
+ *
+ * Use and distribution licensed under the BSD license. See
+ * the COPYING file in the parent directory for full text.
+ */
+
+#pragma once
+
+/*
+ Server startup and shutdown functions.
+*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <libmemcached/memcached.h>
+
+typedef struct server_startup_st server_startup_st;
+
+struct server_startup_st
+{
+ uint8_t count;
+ uint8_t udp;
+ memcached_server_st *servers;
+ char *server_list;
+};
+
+void server_startup(server_startup_st *construct);
+void server_shutdown(server_startup_st *construct);
+
+#ifdef __cplusplus
+}
+#endif
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/libtest/test.c
^
|
@@ -0,0 +1,371 @@
+/* uTest
+ * Copyright (C) 2006-2009 Brian Aker
+ * All rights reserved.
+ *
+ * Use and distribution licensed under the BSD license. See
+ * the COPYING file in the parent directory for full text.
+ */
+
+/*
+ Sample test application.
+*/
+
+#include "config.h"
+
+#include <unistd.h>
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <time.h>
+#include <stdint.h>
+
+#include <libmemcached/memcached.h>
+
+#include <libtest/test.h>
+
+static void world_stats_print(world_stats_st *stats)
+{
+ fputc('\n', stderr);
+ fprintf(stderr, "Total Collections\t\t\t\t%u\n", stats->collection_total);
+ fprintf(stderr, "\tFailed Collections\t\t\t%u\n", stats->collection_failed);
+ fprintf(stderr, "\tSkipped Collections\t\t\t%u\n", stats->collection_skipped);
+ fprintf(stderr, "\tSucceeded Collections\t\t%u\n", stats->collection_success);
+ fputc('\n', stderr);
+ fprintf(stderr, "Total\t\t\t\t%u\n", stats->total);
+ fprintf(stderr, "\tFailed\t\t\t%u\n", stats->failed);
+ fprintf(stderr, "\tSkipped\t\t\t%u\n", stats->skipped);
+ fprintf(stderr, "\tSucceeded\t\t%u\n", stats->success);
+}
+
+long int timedif(struct timeval a, struct timeval b)
+{
+ long us, s;
+
+ us = (int)(a.tv_usec - b.tv_usec);
+ us /= 1000;
+ s = (int)(a.tv_sec - b.tv_sec);
+ s *= 1000;
+ return s + us;
+}
+
+const char *test_strerror(test_return_t code)
+{
+ switch (code) {
+ case TEST_SUCCESS:
+ return "ok";
+ case TEST_FAILURE:
+ return "failed";
+ case TEST_MEMORY_ALLOCATION_FAILURE:
+ return "memory allocation";
+ case TEST_SKIPPED:
+ return "skipped";
+ case TEST_MAXIMUM_RETURN:
+ default:
+ fprintf(stderr, "Unknown return value\n");
+ abort();
+ }
+}
+
+void create_core(void)
+{
+ if (getenv("LIBMEMCACHED_NO_COREDUMP") == NULL)
+ {
+ pid_t pid= fork();
+
+ if (pid == 0)
+ {
+ abort();
+ }
+ else
+ {
+ while (waitpid(pid, NULL, 0) != pid)
+ {
+ ;
+ }
+ }
+ }
+}
+
+
+static test_return_t _runner_default(test_callback_fn func, void *p)
+{
+ if (func)
+ {
+ return func(p);
+ }
+ else
+ {
+ return TEST_SUCCESS;
+ }
+}
+
+static world_runner_st defualt_runners= {
+ _runner_default,
+ _runner_default,
+ _runner_default
+};
+
+static test_return_t _default_callback(void *p)
+{
+ (void)p;
+
+ return TEST_SUCCESS;
+}
+
+static inline void set_default_fn(test_callback_fn *fn)
+{
+ if (*fn == NULL)
+ {
+ *fn= _default_callback;
+ }
+}
+
+static collection_st *init_world(world_st *world)
+{
+ if (! world->runner)
+ {
+ world->runner= &defualt_runners;
+ }
+
+ set_default_fn(&world->collection.startup);
+ set_default_fn(&world->collection.shutdown);
+
+ return world->collections;
+}
+
+
+int main(int argc, char *argv[])
+{
+ test_return_t return_code;
+ unsigned int x;
+ char *collection_to_run= NULL;
+ char *wildcard= NULL;
+ world_st world;
+ collection_st *collection;
+ collection_st *next;
+ void *world_ptr;
+
+ world_stats_st stats;
+
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+ if (sasl_client_init(NULL) != SASL_OK)
+ {
+ fprintf(stderr, "Failed to initialize sasl library!\n");
+ return 1;
+ }
+#endif
+
+ memset(&stats, 0, sizeof(stats));
+ memset(&world, 0, sizeof(world));
+ get_world(&world);
+
+ collection= init_world(&world);
+
+ if (world.create)
+ {
+ test_return_t error;
+ world_ptr= world.create(&error);
+ if (error != TEST_SUCCESS)
+ exit(1);
+ }
+ else
+ {
+ world_ptr= NULL;
+ }
+
+ if (argc > 1)
+ collection_to_run= argv[1];
+
+ if (argc == 3)
+ wildcard= argv[2];
+
+ for (next= collection; next->name; next++)
+ {
+ test_return_t collection_rc= TEST_SUCCESS;
+ test_st *run;
+ bool failed= false;
+ bool skipped= false;
+
+ run= next->tests;
+ if (collection_to_run && fnmatch(collection_to_run, next->name, 0))
+ continue;
+
+ stats.collection_total++;
+
+ collection_rc= world.collection.startup(world_ptr);
+
+ if (collection_rc != TEST_SUCCESS)
+ goto skip_pre;
+
+ if (next->pre)
+ {
+ collection_rc= world.runner->pre(next->pre, world_ptr);
+ }
+
+skip_pre:
+ switch (collection_rc)
+ {
+ case TEST_SUCCESS:
+ fprintf(stderr, "\n%s\n\n", next->name);
+ break;
+ case TEST_FAILURE:
+ fprintf(stderr, "\n%s [ failed ]\n\n", next->name);
+ stats.collection_failed++;
+ goto cleanup;
+ case TEST_SKIPPED:
+ fprintf(stderr, "\n%s [ skipping ]\n\n", next->name);
+ stats.collection_skipped++;
+ goto cleanup;
+ case TEST_MEMORY_ALLOCATION_FAILURE:
+ case TEST_MAXIMUM_RETURN:
+ default:
+ assert(0);
+ break;
+ }
+
+
+ for (x= 0; run->name; run++)
+ {
+ struct timeval start_time, end_time;
+ long int load_time= 0;
+
+ if (wildcard && fnmatch(wildcard, run->name, 0))
+ continue;
+
+ fprintf(stderr, "Testing %s", run->name);
+
+ if (world.test.startup)
+ {
+ world.test.startup(world_ptr);
+ }
+
+ if (run->requires_flush && world.test.flush)
+ {
+ world.test.flush(world_ptr);
+ }
+
+ if (world.test.pre_run)
+ {
+ world.test.pre_run(world_ptr);
+ }
+
+
+ // Runner code
+ {
+#if 0
+ if (next->pre && world.runner->pre)
+ {
+ return_code= world.runner->pre(next->pre, world_ptr);
+
+ if (return_code != TEST_SUCCESS)
+ {
+ goto error;
+ }
+ }
+#endif
+
+ gettimeofday(&start_time, NULL);
+ return_code= world.runner->run(run->test_fn, world_ptr);
+ gettimeofday(&end_time, NULL);
+ load_time= timedif(end_time, start_time);
+
+#if 0
+ if (next->post && world.runner->post)
+ {
+ (void) world.runner->post(next->post, world_ptr);
+ }
+#endif
+ }
+
+ if (world.test.post_run)
+ {
+ world.test.post_run(world_ptr);
+ }
+
+ stats.total++;
+
+ fprintf(stderr, "\t\t\t\t\t");
+
+ switch (return_code)
+ {
+ case TEST_SUCCESS:
+ fprintf(stderr, "%ld.%03ld ", load_time / 1000, load_time % 1000);
+ stats.success++;
+ break;
+ case TEST_FAILURE:
+ stats.failed++;
+ failed= true;
+ break;
+ case TEST_SKIPPED:
+ stats.skipped++;
+ skipped= true;
+ break;
+ case TEST_MEMORY_ALLOCATION_FAILURE:
+ fprintf(stderr, "Exhausted memory, quitting\n");
+ abort();
+ case TEST_MAXIMUM_RETURN:
+ default:
+ assert(0); // Coding error.
+ break;
+ }
+
+ fprintf(stderr, "[ %s ]\n", test_strerror(return_code));
+
+ if (world.test.on_error)
+ {
+ test_return_t rc;
+ rc= world.test.on_error(return_code, world_ptr);
+
+ if (rc != TEST_SUCCESS)
+ break;
+ }
+ }
+
+ if (next->post && world.runner->post)
+ {
+ (void) world.runner->post(next->post, world_ptr);
+ }
+
+ if (! failed && ! skipped)
+ {
+ stats.collection_success++;
+ }
+cleanup:
+
+ world.collection.shutdown(world_ptr);
+ }
+
+ if (stats.collection_failed || stats.collection_skipped)
+ {
+ fprintf(stderr, "Some test failures and/or skipped test occurred.\n\n");
+ }
+ else
+ {
+ fprintf(stderr, "All tests completed successfully\n\n");
+ }
+
+ if (world.destroy)
+ {
+ test_return_t error;
+ error= world.destroy(world_ptr);
+
+ if (error != TEST_SUCCESS)
+ {
+ fprintf(stderr, "Failure during shutdown.\n");
+ stats.failed++; // We do this to make our exit code return 1
+ }
+ }
+
+ world_stats_print(&stats);
+
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+ sasl_done();
+#endif
+
+ return stats.failed == 0 ? 0 : 1;
+}
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libtest/test.h
^
|
(renamed to libtest/test.h)
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/libtest/test.h
^
|
(renamed to libtest/test.h)
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/m4/hsieh.m4
^
|
@@ -4,7 +4,7 @@
AC_DEFUN([ENABLE_HSIEH_HASH],
[AC_ARG_ENABLE([hsieh_hash],
[AS_HELP_STRING([--enable-hsieh_hash],
- [build with support for hsieh hashing. @<:default=off@:>@])],
+ [build with support for hsieh hashing. @<:@default=off@:>@])],
[ac_cv_enable_hsieh_hash=yes],
[ac_cv_enable_hsieh_hash=no])
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/m4/murmur.m4
^
|
@@ -0,0 +1,18 @@
+dnl ---------------------------------------------------------------------------
+dnl Macro: ENABLE_MURMUR_HASH
+dnl ---------------------------------------------------------------------------
+AC_DEFUN([ENABLE_MURMUR_HASH],
+ [AC_ARG_ENABLE([murmur_hash],
+ [AS_HELP_STRING([--disable-murmur_hash],
+ [build with support for murmur hashing. @<:@default=on@:>@])],
+ [ac_cv_enable_murmur_hash=no],
+ [ac_cv_enable_murmur_hash=yes])
+
+ AS_IF([test "$ac_cv_enable_murmur_hash" = "yes"],
+ [AC_DEFINE([HAVE_MURMUR_HASH], [1], [Enables murmur hashing support])])
+
+ AM_CONDITIONAL([INCLUDE_MURMUR_SRC], [test "$ac_cv_enable_murmur_hash" = "yes"])
+])
+dnl ---------------------------------------------------------------------------
+dnl End Macro: ENABLE_MURMUR_HASH
+dnl ---------------------------------------------------------------------------
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/m4/pandora_64bit.m4
^
|
@@ -20,9 +20,9 @@
[isainfo_b=`${ISAINFO} -b`],
[isainfo_b="x"])
- AS_IF([test "$isainfo_b" != "x"],[
+ AS_IF([test "$isainfo_b" != "x" -a "$isainfo_b" != "32"],[
- isainfo_k=`${ISAINFO} -k`
+ isainfo_k=`${ISAINFO} -k`
DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}"
AS_IF([test "x$ac_enable_64bit" = "xyes"],[
@@ -32,7 +32,7 @@
])
AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[
- dnl The user hasn't overridden the default libdir, so we'll
+ dnl The user hasn't overridden the default libdir, so we'll
dnl the dir suffix to match solaris 32/64-bit policy
libdir="${libdir}/${isainfo_k}"
])
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/m4/pandora_warnings.m4
^
|
@@ -153,7 +153,7 @@
[ac_cv_safe_to_use_Wextra_=no])
CFLAGS="$save_CFLAGS"])
- BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
+ BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wswitch-enum -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
[BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
[BASE_WARNINGS="${BASE_WARNINGS} -W"])
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/m4/socket_send_flags.m4
^
|
@@ -0,0 +1,49 @@
+dnl Copyright (C) 2011 Trond Norbye
+dnl This file is free software; Trond Norbye
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl ---------------------------------------------------------------------------
+dnl Macro: SOCKET_SEND_FLAGS
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([SOCKET_SEND_FLAGS],
+[
+ AC_CACHE_CHECK([for MSG_NOSIGNAL], [ac_cv_msg_nosignal], [
+ AC_LANG_PUSH([C])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -I${srcdir}"
+ AC_TRY_LINK([
+#include <sys/socket.h>
+ ], [
+int flags= MSG_NOSIGNAL;
+ ],
+ [ ac_cv_msg_nosignal=yes ],
+ [ ac_cv_msg_nosignal=no ])
+ CFLAGS="$save_CFLAGS"
+ AC_LANG_POP
+ ])
+
+ AC_CACHE_CHECK([for MSG_DONTWAIT], [ac_cv_msg_dontwait], [
+ AC_LANG_PUSH([C])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -I${srcdir}"
+ AC_TRY_LINK([
+#include <sys/socket.h>
+ ], [
+int flags= MSG_DONTWAIT;
+ ],
+ [ ac_cv_msg_dontwait=yes ],
+ [ ac_cv_msg_dontwait=no ])
+ CFLAGS="$save_CFLAGS"
+ AC_LANG_POP
+ ])
+
+ AS_IF([test "x$ac_cv_msg_nosignal" = "xyes"],[
+ AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Define to 1 if you have a MSG_NOSIGNAL])])
+ AS_IF([test "x$ac_cv_msg_dontwait" = "xyes"],[
+ AC_DEFINE(HAVE_MSG_DONTWAIT, 1, [Define to 1 if you have a MSG_DONTWAIT])])
+])
+
+dnl ---------------------------------------------------------------------------
+dnl End Macro: SOCKET_SEND_FLAGS
+dnl ---------------------------------------------------------------------------
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/support/libmemcached.pc.in
^
|
@@ -6,5 +6,5 @@
Name: libmemcached
Description: libmemcached C library.
Version: @VERSION@
-Libs: -L${libdir} -lmemcached
+Libs: @LTLIBSASL@ @LTLIBSASL2@ -L${libdir} -lmemcached
Cflags: -I${includedir}
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/support/libmemcached.spec
^
|
@@ -1,6 +1,6 @@
Name: libmemcached
Summary: memcached C library and command line tools
-Version: 0.46
+Version: 0.48
Release: 1
License: BSD
Group: System Environment/Libraries
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/atomsmasher.c
^
|
@@ -26,11 +26,11 @@
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
-#include "server.h"
#include "../clients/generator.h"
#include "../clients/execute.h"
-#include "test.h"
+#include <libtest/server.h>
+#include <libtest/test.h>
/* Number of items generated for tests */
#define GLOBAL_COUNT 100000
@@ -43,21 +43,23 @@
static char *global_keys[GLOBAL_COUNT];
static size_t global_keys_length[GLOBAL_COUNT];
-static test_return_t cleanup_pairs(memcached_st *memc __attribute__((unused)))
+static test_return_t cleanup_pairs(memcached_st *memc)
{
+ (void)memc;
pairs_free(global_pairs);
return 0;
}
-static test_return_t generate_pairs(memcached_st *memc __attribute__((unused)))
+static test_return_t generate_pairs(memcached_st *memc)
{
+ (void)memc;
global_pairs= pairs_generate(GLOBAL_COUNT, 400);
global_count= GLOBAL_COUNT;
for (size_t x= 0; x < global_count; x++)
{
- global_keys[x]= global_pairs[x].key;
+ global_keys[x]= global_pairs[x].key;
global_keys_length[x]= global_pairs[x].key_length;
}
@@ -97,12 +99,12 @@
WATCHPOINT_ERROR(rc);
WATCHPOINT_ASSERT(rc);
}
- }
+ }
else
{
- rc= memcached_set(memc, global_pairs[test_bit].key,
+ rc= memcached_set(memc, global_pairs[test_bit].key,
global_pairs[test_bit].key_length,
- global_pairs[test_bit].value,
+ global_pairs[test_bit].value,
global_pairs[test_bit].value_length,
0, 0);
if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_BUFFERED)
@@ -126,7 +128,7 @@
return TEST_SUCCESS;
}
-/*
+/*
Set the value, then quit to make sure it is flushed.
Come back in and test that add fails.
*/
@@ -139,12 +141,12 @@
setting_value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK);
- rc= memcached_set(memc, key, strlen(key),
+ rc= memcached_set(memc, key, strlen(key),
value, strlen(value),
(time_t)0, (uint32_t)0);
test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
memcached_quit(memc);
- rc= memcached_add(memc, key, strlen(key),
+ rc= memcached_add(memc, key, strlen(key),
value, strlen(value),
(time_t)0, (uint32_t)0);
@@ -192,8 +194,9 @@
memcached_st *clone;
} benchmark_state;
-static test_return_t memcached_create_benchmark(memcached_st *memc __attribute__((unused)))
+static test_return_t memcached_create_benchmark(memcached_st *memc)
{
+ (void)memc;
benchmark_state.create_init= true;
for (size_t x= 0; x < BENCHMARK_TEST_LOOP; x++)
@@ -222,8 +225,9 @@
return TEST_SUCCESS;
}
-static test_return_t pre_allocate(memcached_st *memc __attribute__((unused)))
+static test_return_t pre_allocate(memcached_st *memc)
{
+ (void)memc;
memset(&benchmark_state, 0, sizeof(benchmark_state));
benchmark_state.create= (memcached_st *)calloc(BENCHMARK_TEST_LOOP, sizeof(memcached_st));
@@ -234,8 +238,9 @@
return TEST_SUCCESS;
}
-static test_return_t post_allocate(memcached_st *memc __attribute__((unused)))
+static test_return_t post_allocate(memcached_st *memc)
{
+ (void)memc;
for (size_t x= 0; x < BENCHMARK_TEST_LOOP; x++)
{
if (benchmark_state.create_init)
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/tests/cpp_example.cc
^
|
@@ -0,0 +1,194 @@
+/*
+ * An example file showing the usage of the C++ libmemcached interface.
+ */
+
+#include <vector>
+#include <string>
+#include <iostream>
+#include <algorithm>
+#include <map>
+
+#include <string.h>
+
+#include <libmemcached/memcached.hpp>
+
+using namespace std;
+using namespace memcache;
+
+class DeletePtrs
+{
+public:
+ template<typename T>
+ inline void operator()(const T *ptr) const
+ {
+ delete ptr;
+ }
+};
+
+class MyCache
+{
+public:
+
+ static const uint32_t num_of_clients= 10;
+
+ static MyCache &singleton()
+ {
+ static MyCache instance;
+ return instance;
+ }
+
+ void set(const string &key,
+ const vector<char> &value)
+ {
+ time_t expiry= 0;
+ uint32_t flags= 0;
+ getCache()->set(key, value, expiry, flags);
+ }
+
+ vector<char> get(const string &key)
+ {
+ vector<char> ret_value;
+ getCache()->get(key, ret_value);
+ return ret_value;
+ }
+
+ void remove(const string &key)
+ {
+ getCache()->remove(key);
+ }
+
+ Memcache *getCache()
+ {
+ /*
+ * pick a random element from the vector of clients. Obviously, this is
+ * not very random but suffices as an example!
+ */
+ uint32_t index= rand() % num_of_clients;
+ return clients[index];
+ }
+
+private:
+
+ /*
+ * A vector of clients.
+ */
+ std::vector<Memcache *> clients;
+
+ MyCache()
+ :
+ clients()
+ {
+ /* create clients and add them to the vector */
+ for (uint32_t i= 0; i < num_of_clients; i++)
+ {
+ Memcache *client= new Memcache("127.0.0.1:11211");
+ clients.push_back(client);
+ }
+ }
+
+ ~MyCache()
+ {
+ for_each(clients.begin(), clients.end(), DeletePtrs());
+ clients.clear();
+ }
+
+ MyCache(const MyCache&);
+
+};
+
+class Product
+{
+public:
+
+ Product(int in_id, double in_price)
+ :
+ id(in_id),
+ price(in_price)
+ {}
+
+ Product()
+ :
+ id(0),
+ price(0.0)
+ {}
+
+ int getId() const
+ {
+ return id;
+ }
+
+ double getPrice() const
+ {
+ return price;
+ }
+
+private:
+
+ int id;
+ double price;
+
+};
+
+void setAllProducts(vector<Product> &products)
+{
+ vector<char> raw_products(products.size() * sizeof(Product));
+ memcpy(&raw_products[0], &products[0], products.size() * sizeof(Product));
+ MyCache::singleton().set("AllProducts", raw_products);
+}
+
+vector<Product> getAllProducts()
+{
+ vector<char> raw_products = MyCache::singleton().get("AllProducts");
+ vector<Product> products(raw_products.size() / sizeof(Product));
+ memcpy(&products[0], &raw_products[0], raw_products.size());
+ return products;
+}
+
+Product getProduct(const string &key)
+{
+ vector<char> raw_product= MyCache::singleton().get(key);
+ Product ret;
+ if (! raw_product.empty())
+ {
+ memcpy(&ret, &raw_product[0], sizeof(Product));
+ }
+ else
+ {
+ /* retrieve it from the persistent store */
+ }
+ return ret;
+}
+
+void setProduct(const string &key, const Product &product)
+{
+ vector<char> raw_product(sizeof(Product));
+ memcpy(&raw_product[0], &product, sizeof(Product));
+ MyCache::singleton().set(key, raw_product);
+}
+
+int main()
+{
+ Memcache first_client("127.0.0.1:19191");
+ map< string, map<string, string> > my_stats;
+ first_client.getStats(my_stats);
+
+ /*
+ * Iterate through the retrieved stats.
+ */
+ map< string, map<string, string> >::iterator it=
+ my_stats.begin();
+ while (it != my_stats.end())
+ {
+ cout << "working with server: " << (*it).first << endl;
+ map<string, string> serv_stats= (*it).second;
+ map<string, string>::iterator iter= serv_stats.begin();
+ while (iter != serv_stats.end())
+ {
+ cout << (*iter).first << ":" << (*iter).second << endl;
+ ++iter;
+ }
+ ++it;
+ }
+
+ return 0;
+}
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/hash_plus.cc
^
|
@@ -1,7 +1,8 @@
/*
C++ to libhashkit
*/
-#include "test.h"
+#include <libtest/test.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/hash_results.h
^
|
@@ -105,6 +105,7 @@
static uint32_t hsieh_values[]= { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
#endif
+#ifdef HAVE_MURMUR_HASH
static uint32_t murmur_values[]= { 4142305122U, 734504955U, 3802834688U, 4076891445U,
387802650U, 560515427U, 3274673488U, 3150339524U,
1527441970U, 2728642900U, 3613992239U, 2938419259U,
@@ -112,6 +113,9 @@
264013145U, 3995512858U, 2400956718U, 2346666219U,
926327338U, 442757446U, 1770805201U, 560483147U,
3902279934U };
+#else
+static uint32_t murmur_values[]= { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+#endif
static uint32_t jenkins_values[]= { 1442444624U, 4253821186U, 1885058256U, 2120131735U,
3261968576U, 3515188778U, 4232909173U, 4288625128U,
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/hashkit_functions.c
^
|
@@ -15,7 +15,7 @@
#include <libhashkit/hashkit.h>
-#include "test.h"
+#include <libtest/test.h>
#include "hash_results.h"
@@ -31,10 +31,11 @@
bool _unused;
};
-static test_return_t init_test(void *not_used __attribute__((unused)))
+static test_return_t init_test(void *not_used)
{
hashkit_st hashk;
hashkit_st *hashk_ptr;
+ (void)not_used;
hashk_ptr= hashkit_create(&hashk);
test_true(hashk_ptr);
@@ -46,9 +47,10 @@
return TEST_SUCCESS;
}
-static test_return_t allocation_test(void *not_used __attribute__((unused)))
+static test_return_t allocation_test(void *not_used)
{
hashkit_st *hashk_ptr;
+ (void)not_used;
hashk_ptr= hashkit_create(NULL);
test_true(hashk_ptr);
@@ -115,10 +117,11 @@
return TEST_SUCCESS;
}
-static test_return_t one_at_a_time_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t one_at_a_time_run (hashkit_st *hashk)
{
uint32_t x;
const char **ptr;
+ (void)hashk;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -131,10 +134,11 @@
return TEST_SUCCESS;
}
-static test_return_t md5_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t md5_run (hashkit_st *hashk)
{
uint32_t x;
const char **ptr;
+ (void)hashk;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -147,10 +151,11 @@
return TEST_SUCCESS;
}
-static test_return_t crc_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t crc_run (hashkit_st *hashk)
{
uint32_t x;
const char **ptr;
+ (void)hashk;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -163,10 +168,11 @@
return TEST_SUCCESS;
}
-static test_return_t fnv1_64_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t fnv1_64_run (hashkit_st *hashk)
{
uint32_t x;
const char **ptr;
+ (void)hashk;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -179,10 +185,11 @@
return TEST_SUCCESS;
}
-static test_return_t fnv1a_64_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t fnv1a_64_run (hashkit_st *hashk)
{
uint32_t x;
const char **ptr;
+ (void)hashk;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -195,11 +202,11 @@
return TEST_SUCCESS;
}
-static test_return_t fnv1_32_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t fnv1_32_run (hashkit_st *hashk)
{
uint32_t x;
const char **ptr;
-
+ (void)hashk;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -212,10 +219,11 @@
return TEST_SUCCESS;
}
-static test_return_t fnv1a_32_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t fnv1a_32_run (hashkit_st *hashk)
{
uint32_t x;
const char **ptr;
+ (void)hashk;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -228,10 +236,11 @@
return TEST_SUCCESS;
}
-static test_return_t hsieh_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t hsieh_run (hashkit_st *hashk)
{
uint32_t x;
const char **ptr;
+ (void)hashk;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -248,9 +257,12 @@
return TEST_SUCCESS;
}
-static test_return_t murmur_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t murmur_run (hashkit_st *hashk)
{
+ (void)hashk;
+
#ifdef WORDS_BIGENDIAN
+ (void)murmur_values;
return TEST_SKIPPED;
#else
uint32_t x;
@@ -260,7 +272,11 @@
{
uint32_t hash_val;
+#ifdef HAVE_MURMUR_HASH
hash_val= libhashkit_murmur(*ptr, strlen(*ptr));
+#else
+ hash_val= 1;
+#endif
assert(murmur_values[x] == hash_val);
}
@@ -268,11 +284,11 @@
#endif
}
-static test_return_t jenkins_run (hashkit_st *hashk __attribute__((unused)))
+static test_return_t jenkins_run (hashkit_st *hashk)
{
uint32_t x;
const char **ptr;
-
+ (void)hashk;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -309,7 +325,7 @@
static test_return_t hashkit_set_function_test(hashkit_st *hashk)
{
- for (hashkit_hash_algorithm_t algo = HASHKIT_HASH_DEFAULT; algo < HASHKIT_HASH_MAX; algo++)
+ for (hashkit_hash_algorithm_t algo = HASHKIT_HASH_DEFAULT; algo < HASHKIT_HASH_MAX; algo++)
{
hashkit_return_t rc;
uint32_t x;
@@ -319,8 +335,15 @@
rc= hashkit_set_function(hashk, algo);
/* Hsieh is disabled most of the time for patent issues */
+#ifndef HAVE_HSIEH_HASH
if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_HSIEH)
continue;
+#endif
+
+#ifndef HAVE_MURMUR_HASH
+ if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_MURMUR)
+ continue;
+#endif
if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_CUSTOM)
continue;
@@ -415,7 +438,7 @@
static test_return_t hashkit_set_distribution_function_test(hashkit_st *hashk)
{
- for (hashkit_hash_algorithm_t algo = HASHKIT_HASH_DEFAULT; algo < HASHKIT_HASH_MAX; algo++)
+ for (hashkit_hash_algorithm_t algo = HASHKIT_HASH_DEFAULT; algo < HASHKIT_HASH_MAX; algo++)
{
hashkit_return_t rc;
@@ -447,7 +470,7 @@
static test_return_t hashkit_get_function_test(hashkit_st *hashk)
{
- for (hashkit_hash_algorithm_t algo = HASHKIT_HASH_DEFAULT; algo < HASHKIT_HASH_MAX; algo++)
+ for (hashkit_hash_algorithm_t algo = HASHKIT_HASH_DEFAULT; algo < HASHKIT_HASH_MAX; algo++)
{
hashkit_return_t rc;
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/include.am
^
|
@@ -1,8 +1,17 @@
# vim:ft=automake
+# Copyright (C) 2011 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
-TESTS_LDADDS = libmemcached/libmemcached.la
+TESTS_LDADDS= \
+ libmemcached/libmemcached.la \
+ libtest/libserver.la \
+ libtest/libtest.la
VALGRIND_COMMAND= $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --track-fds=yes
@@ -14,13 +23,15 @@
TESTS_LDADDS+= libmemcached/libmemcachedutil.la
endif
+EXTRA_DIST+= \
+ tests/cpp_example.cc \
+ tests/output_plus.res
+
noinst_HEADERS+= \
tests/hash_results.h \
tests/ketama_test_cases.h \
tests/ketama_test_cases_spy.h \
- tests/libmemcached_world.h \
- tests/server.h \
- tests/test.h
+ tests/libmemcached_world.h
noinst_PROGRAMS+= \
tests/atomsmasher \
@@ -32,55 +43,44 @@
tests/testplus \
tests/testudp
-noinst_LTLIBRARIES+= tests/libserver.la
-tests_libserver_la_SOURCES= tests/server.c
-
-noinst_LTLIBRARIES+= tests/libtest.la
-tests_libtest_la_SOURCES= tests/test.c
-
tests_testapp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
tests_testapp_SOURCES= tests/mem_functions.c
tests_testapp_DEPENDENCIES= \
$(BUILT_SOURCES) \
clients/libgenexec.la \
- tests/libserver.la \
- tests/libtest.la \
libmemcached/libmemcachedinternal.la \
$(TESTS_LDADDS)
+
tests_testapp_LDADD= clients/libgenexec.la \
- tests/libserver.la \
- tests/libtest.la \
libmemcached/libmemcachedinternal.la \
$(TESTS_LDADDS) $(LIBSASL)
tests_testplus_SOURCES= tests/plus.cpp
tests_testplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_testplus_DEPENDENCIES= tests/libtest.la tests/libserver.la $(TESTS_LDADDS)
+tests_testplus_DEPENDENCIES= $(TESTS_LDADDS)
tests_testplus_LDADD= $(tests_testplus_DEPENDENCIES) $(LIBSASL)
tests_atomsmasher_SOURCES= tests/atomsmasher.c
tests_atomsmasher_DEPENDENCIES= \
clients/libgenexec.la \
- tests/libserver.la \
- tests/libtest.la \
$(TESTS_LDADDS)
+
tests_atomsmasher_LDADD= $(tests_atomsmasher_DEPENDENCIES) $(LIBSASL)
tests_testudp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
tests_testudp_SOURCES= tests/mem_udp.c
tests_testudp_DEPENDENCIES= \
clients/libgenexec.la \
- tests/libserver.la \
- tests/libtest.la \
$(TESTS_LDADDS)
+
tests_testudp_LDADD= $(tests_testudp_DEPENDENCIES) $(LIBSASL)
tests_startservers_SOURCES= tests/start.c
-tests_startservers_DEPENDENCIES= tests/libserver.la $(TESTS_LDADDS)
+tests_startservers_DEPENDENCIES= $(TESTS_LDADDS)
tests_startservers_LDADD= $(tests_startservers_DEPENDENCIES) $(LIBSASL)
tests_testhashkit_SOURCES = tests/hashkit_functions.c
-tests_testhashkit_DEPENDENCIES = tests/libtest.la libhashkit/libhashkit.la
+tests_testhashkit_DEPENDENCIES = libtest/libtest.la libhashkit/libhashkit.la
tests_testhashkit_LDADD = $(tests_testhashkit_DEPENDENCIES) $(LIBSASL)
tests_hashplus_SOURCES = tests/hash_plus.cc
@@ -90,7 +90,7 @@
tests_memplus_SOURCES = tests/mem_plus.cc
tests_memplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memplus_DEPENDENCIES = tests/libtest.la tests/libserver.la libmemcached/libmemcached.la
+tests_memplus_DEPENDENCIES = $(TESTS_LDADDS)
tests_memplus_LDADD = $(tests_memplus_DEPENDENCIES) $(LIBSASL)
test: check
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/mem_functions.c
^
|
@@ -26,13 +26,14 @@
#include "libmemcached/common.h"
-#include "server.h"
+#include <libtest/server.h>
+
#include "clients/generator.h"
#include "clients/execute.h"
#define SMALL_STRING_LEN 1024
-#include "test.h"
+#include <libtest/test.h>
#ifdef HAVE_LIBMEMCACHEDUTIL
@@ -55,9 +56,10 @@
static test_return_t pre_binary(memcached_st *memc);
-static test_return_t init_test(memcached_st *not_used __attribute__((unused)))
+static test_return_t init_test(memcached_st *not_used)
{
memcached_st memc;
+ (void)not_used;
(void)memcached_create(&memc);
memcached_free(&memc);
@@ -65,10 +67,11 @@
return TEST_SUCCESS;
}
-static test_return_t server_list_null_test(memcached_st *ptr __attribute__((unused)))
+static test_return_t server_list_null_test(memcached_st *ptr)
{
memcached_server_st *server_list;
memcached_return_t rc;
+ (void)ptr;
server_list= memcached_server_list_append_with_weight(NULL, NULL, 0, 0, NULL);
test_true(server_list == NULL);
@@ -85,26 +88,28 @@
#define TEST_PORT_COUNT 7
in_port_t test_ports[TEST_PORT_COUNT];
-static memcached_return_t server_display_function(const memcached_st *ptr __attribute__((unused)),
+static memcached_return_t server_display_function(const memcached_st *ptr,
const memcached_server_st *server,
void *context)
{
/* Do Nothing */
size_t bigger= *((size_t *)(context));
+ (void)ptr;
assert(bigger <= memcached_server_port(server));
*((size_t *)(context))= memcached_server_port(server);
return MEMCACHED_SUCCESS;
}
-static memcached_return_t dump_server_information(const memcached_st *ptr __attribute__((unused)),
+static memcached_return_t dump_server_information(const memcached_st *ptr,
const memcached_server_st *instance,
void *context)
{
/* Do Nothing */
FILE *stream= (FILE *)context;
+ (void)ptr;
- fprintf(stream, "Memcached Server: %s %u Version %u.%u.%u\n",
+ fprintf(stream, "Memcached Server: %s %u Version %u.%u.%u\n",
memcached_server_name(instance),
memcached_server_port(instance),
instance->major_version,
@@ -114,13 +119,14 @@
return MEMCACHED_SUCCESS;
}
-static test_return_t server_sort_test(memcached_st *ptr __attribute__((unused)))
+static test_return_t server_sort_test(memcached_st *ptr)
{
size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
memcached_return_t rc;
memcached_server_fn callbacks[1];
memcached_st *local_memc;
+ (void)ptr;
local_memc= memcached_create(NULL);
test_true(local_memc);
@@ -146,13 +152,14 @@
return TEST_SUCCESS;
}
-static test_return_t server_sort2_test(memcached_st *ptr __attribute__((unused)))
+static test_return_t server_sort2_test(memcached_st *ptr)
{
size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
memcached_return_t rc;
memcached_server_fn callbacks[1];
memcached_st *local_memc;
memcached_server_instance_st instance;
+ (void)ptr;
local_memc= memcached_create(NULL);
test_true(local_memc);
@@ -182,11 +189,13 @@
return TEST_SUCCESS;
}
-static memcached_return_t server_print_callback(const memcached_st *ptr __attribute__((unused)),
+static memcached_return_t server_print_callback(const memcached_st *ptr,
const memcached_server_st *server,
- void *context __attribute__((unused)))
+ void *context)
{
(void)server; // Just in case we aren't printing.
+ (void)ptr;
+ (void)context;
#if 0
fprintf(stderr, "%s(%d)", memcached_server_name(server), memcached_server_port(server));
@@ -195,7 +204,7 @@
return MEMCACHED_SUCCESS;
}
-static test_return_t memcached_server_remove_test(memcached_st *ptr __attribute__((unused)))
+static test_return_t memcached_server_remove_test(memcached_st *ptr)
{
memcached_return_t rc;
memcached_st local_memc;
@@ -204,6 +213,7 @@
memcached_server_fn callbacks[1];
const char *server_string= "localhost:4444, localhost:4445, localhost:4446, localhost:4447, localhost, memcache1.memcache.bk.sapo.pt:11211, memcache1.memcache.bk.sapo.pt:11212, memcache1.memcache.bk.sapo.pt:11213, memcache1.memcache.bk.sapo.pt:11214, memcache2.memcache.bk.sapo.pt:11211, memcache2.memcache.bk.sapo.pt:11212, memcache2.memcache.bk.sapo.pt:11213, memcache2.memcache.bk.sapo.pt:11214";
+ (void)ptr;
memc= memcached_create(&local_memc);
@@ -220,12 +230,13 @@
return TEST_SUCCESS;
}
-static memcached_return_t server_display_unsort_function(const memcached_st *ptr __attribute__((unused)),
+static memcached_return_t server_display_unsort_function(const memcached_st *ptr,
const memcached_server_st *server,
void *context)
{
/* Do Nothing */
uint32_t x= *((uint32_t *)(context));
+ (void)ptr;
assert(test_ports[x] == server->port);
*((uint32_t *)(context))= ++x;
@@ -233,13 +244,14 @@
return MEMCACHED_SUCCESS;
}
-static test_return_t server_unsort_test(memcached_st *ptr __attribute__((unused)))
+static test_return_t server_unsort_test(memcached_st *ptr)
{
size_t counter= 0; /* Prime the value for the test_true in server_display_function */
size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
memcached_return_t rc;
memcached_server_fn callbacks[1];
memcached_st *local_memc;
+ (void)ptr;
local_memc= memcached_create(NULL);
test_true(local_memc);
@@ -269,8 +281,9 @@
return TEST_SUCCESS;
}
-static test_return_t allocation_test(memcached_st *not_used __attribute__((unused)))
+static test_return_t allocation_test(memcached_st *not_used)
{
+ (void)not_used;
memcached_st *memc;
memc= memcached_create(NULL);
test_true(memc);
@@ -759,10 +772,11 @@
return TEST_SUCCESS;
}
-static memcached_return_t server_function(const memcached_st *ptr __attribute__((unused)),
- const memcached_server_st *server __attribute__((unused)),
- void *context __attribute__((unused)))
+static memcached_return_t server_function(const memcached_st *ptr,
+ const memcached_server_st *server,
+ void *context)
{
+ (void)ptr; (void)server; (void)context;
/* Do Nothing */
return MEMCACHED_SUCCESS;
@@ -876,12 +890,12 @@
}
#define READ_THROUGH_VALUE "set for me"
-static memcached_return_t read_through_trigger(memcached_st *memc __attribute__((unused)),
- char *key __attribute__((unused)),
- size_t key_length __attribute__((unused)),
+static memcached_return_t read_through_trigger(memcached_st *memc,
+ char *key,
+ size_t key_length,
memcached_result_st *result)
{
-
+ (void)memc;(void)key;(void)key_length;
return memcached_result_set_value(result, READ_THROUGH_VALUE, strlen(READ_THROUGH_VALUE));
}
@@ -924,10 +938,11 @@
return TEST_SUCCESS;
}
-static memcached_return_t delete_trigger(memcached_st *ptr __attribute__((unused)),
+static memcached_return_t delete_trigger(memcached_st *ptr,
const char *key,
- size_t key_length __attribute__((unused)))
+ size_t key_length)
{
+ (void)ptr;(void)key_length;
assert(key);
return MEMCACHED_SUCCESS;
@@ -1575,10 +1590,11 @@
}
/* Count the results */
-static memcached_return_t callback_counter(const memcached_st *ptr __attribute__((unused)),
- memcached_result_st *result __attribute__((unused)),
+static memcached_return_t callback_counter(const memcached_st *ptr,
+ memcached_result_st *result,
void *context)
{
+ (void)ptr; (void)result;
size_t *counter= (size_t *)context;
*counter= *counter + 1;
@@ -1805,9 +1821,10 @@
return TEST_SUCCESS;
}
-static test_return_t version_string_test(memcached_st *memc __attribute__((unused)))
+static test_return_t version_string_test(memcached_st *memc)
{
const char *version_string;
+ (void)memc;
version_string= memcached_lib_version();
@@ -1875,13 +1892,15 @@
return TEST_SUCCESS;
}
-static memcached_return_t clone_test_callback(memcached_st *parent __attribute__((unused)), memcached_st *memc_clone __attribute__((unused)))
+static memcached_return_t clone_test_callback(memcached_st *parent, memcached_st *memc_clone)
{
+ (void)parent;(void)memc_clone;
return MEMCACHED_SUCCESS;
}
-static memcached_return_t cleanup_test_callback(memcached_st *ptr __attribute__((unused)))
+static memcached_return_t cleanup_test_callback(memcached_st *ptr)
{
+ (void)ptr;
return MEMCACHED_SUCCESS;
}
@@ -2407,7 +2426,7 @@
return TEST_SUCCESS;
}
-static test_return_t user_supplied_bug8(memcached_st *memc __attribute__((unused)))
+static test_return_t user_supplied_bug8(memcached_st *memc)
{
memcached_return_t rc;
memcached_st *mine;
@@ -2416,6 +2435,7 @@
memcached_server_st *servers;
const char *server_list= "memcache1.memcache.bk.sapo.pt:11211, memcache1.memcache.bk.sapo.pt:11212, memcache1.memcache.bk.sapo.pt:11213, memcache1.memcache.bk.sapo.pt:11214, memcache2.memcache.bk.sapo.pt:11211, memcache2.memcache.bk.sapo.pt:11212, memcache2.memcache.bk.sapo.pt:11213, memcache2.memcache.bk.sapo.pt:11214";
+ (void)memc;
servers= memcached_servers_parse(server_list);
test_true(servers);
@@ -2960,8 +2980,9 @@
*/
/* sighandler_t function that always asserts false */
-static void fail(int unused __attribute__((unused)))
+static void fail(int unused)
{
+ (void)unused;
assert(0);
}
@@ -3329,15 +3350,17 @@
return TEST_SUCCESS;
}
-static test_return_t cleanup_pairs(memcached_st *memc __attribute__((unused)))
+static test_return_t cleanup_pairs(memcached_st *memc)
{
+ (void)memc;
pairs_free(global_pairs);
return TEST_SUCCESS;
}
-static test_return_t generate_pairs(memcached_st *memc __attribute__((unused)))
+static test_return_t generate_pairs(memcached_st *memc)
{
+ (void)memc;
global_pairs= pairs_generate(GLOBAL_COUNT, 400);
global_count= GLOBAL_COUNT;
@@ -3350,8 +3373,9 @@
return TEST_SUCCESS;
}
-static test_return_t generate_large_pairs(memcached_st *memc __attribute__((unused)))
+static test_return_t generate_large_pairs(memcached_st *memc)
{
+ (void)memc;
global_pairs= pairs_generate(GLOBAL2_COUNT, MEMCACHED_MAX_BUFFER+10);
global_count= GLOBAL2_COUNT;
@@ -3672,9 +3696,13 @@
static test_return_t pre_murmur(memcached_st *memc)
{
+#ifdef HAVE_MURMUR_HASH
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MURMUR);
-
return TEST_SUCCESS;
+#else
+ (void) memc;
+ return TEST_SKIPPED;
+#endif
}
static test_return_t pre_jenkins(memcached_st *memc)
@@ -3851,9 +3879,10 @@
}
-static void my_free(const memcached_st *ptr __attribute__((unused)), void *mem, void *context)
+static void my_free(const memcached_st *ptr, void *mem, void *context)
{
- (void) context;
+ (void)context;
+ (void)ptr;
#ifdef HARD_MALLOC_TESTS
void *real_ptr= (mem == NULL) ? mem : (void*)((caddr_t)mem - 8);
free(real_ptr);
@@ -3863,9 +3892,10 @@
}
-static void *my_malloc(const memcached_st *ptr __attribute__((unused)), const size_t size, void *context)
+static void *my_malloc(const memcached_st *ptr, const size_t size, void *context)
{
(void)context;
+ (void)ptr;
#ifdef HARD_MALLOC_TESTS
void *ret= malloc(size + 8);
if (ret != NULL)
@@ -3885,7 +3915,7 @@
}
-static void *my_realloc(const memcached_st *ptr __attribute__((unused)), void *mem, const size_t size, void *context)
+static void *my_realloc(const memcached_st *ptr, void *mem, const size_t size, void *context)
{
(void)context;
#ifdef HARD_MALLOC_TESTS
@@ -3900,12 +3930,13 @@
return ret;
#else
+ (void)ptr;
return realloc(mem, size);
#endif
}
-static void *my_calloc(const memcached_st *ptr __attribute__((unused)), size_t nelem, const size_t size, void *context)
+static void *my_calloc(const memcached_st *ptr, size_t nelem, const size_t size, void *context)
{
(void)context;
#ifdef HARD_MALLOC_TESTS
@@ -3917,6 +3948,7 @@
return mem;
#else
+ (void)ptr;
return calloc(nelem, size);
#endif
}
@@ -4343,11 +4375,12 @@
}
/* Count the objects */
-static memcached_return_t callback_dump_counter(const memcached_st *ptr __attribute__((unused)),
- const char *key __attribute__((unused)),
- size_t key_length __attribute__((unused)),
+static memcached_return_t callback_dump_counter(const memcached_st *ptr,
+ const char *key,
+ size_t key_length,
void *context)
{
+ (void)ptr; (void)key; (void)key_length;
size_t *counter= (size_t *)context;
*counter= *counter + 1;
@@ -4831,10 +4864,24 @@
return TEST_SUCCESS;
}
-static test_return_t one_at_a_time_run (memcached_st *memc __attribute__((unused)))
+static test_return_t murmur_avaibility_test (memcached_st *memc)
+{
+ memcached_return_t expected_rc= MEMCACHED_FAILURE;
+#ifdef HAVE_MURMUR_HASH
+ expected_rc= MEMCACHED_SUCCESS;
+#endif
+ memcached_return_t rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH,
+ (uint64_t)MEMCACHED_HASH_MURMUR);
+ test_true(rc == expected_rc);
+
+ return TEST_SUCCESS;
+}
+
+static test_return_t one_at_a_time_run (memcached_st *memc)
{
uint32_t x;
const char **ptr;
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -4847,10 +4894,11 @@
return TEST_SUCCESS;
}
-static test_return_t md5_run (memcached_st *memc __attribute__((unused)))
+static test_return_t md5_run (memcached_st *memc)
{
uint32_t x;
const char **ptr;
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -4863,10 +4911,11 @@
return TEST_SUCCESS;
}
-static test_return_t crc_run (memcached_st *memc __attribute__((unused)))
+static test_return_t crc_run (memcached_st *memc)
{
uint32_t x;
const char **ptr;
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -4879,10 +4928,11 @@
return TEST_SUCCESS;
}
-static test_return_t fnv1_64_run (memcached_st *memc __attribute__((unused)))
+static test_return_t fnv1_64_run (memcached_st *memc)
{
uint32_t x;
const char **ptr;
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -4895,10 +4945,11 @@
return TEST_SUCCESS;
}
-static test_return_t fnv1a_64_run (memcached_st *memc __attribute__((unused)))
+static test_return_t fnv1a_64_run (memcached_st *memc)
{
uint32_t x;
const char **ptr;
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -4911,11 +4962,11 @@
return TEST_SUCCESS;
}
-static test_return_t fnv1_32_run (memcached_st *memc __attribute__((unused)))
+static test_return_t fnv1_32_run (memcached_st *memc)
{
uint32_t x;
const char **ptr;
-
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -4928,10 +4979,11 @@
return TEST_SUCCESS;
}
-static test_return_t fnv1a_32_run (memcached_st *memc __attribute__((unused)))
+static test_return_t fnv1a_32_run (memcached_st *memc)
{
uint32_t x;
const char **ptr;
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -4944,10 +4996,11 @@
return TEST_SUCCESS;
}
-static test_return_t hsieh_run (memcached_st *memc __attribute__((unused)))
+static test_return_t hsieh_run (memcached_st *memc)
{
uint32_t x;
const char **ptr;
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -4960,13 +5013,15 @@
return TEST_SUCCESS;
}
-static test_return_t murmur_run (memcached_st *memc __attribute__((unused)))
+static test_return_t murmur_run (memcached_st *memc)
{
#ifdef WORDS_BIGENDIAN
+ (void)murmur_values;
return TEST_SKIPPED;
#else
uint32_t x;
const char **ptr;
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -4980,11 +5035,11 @@
#endif
}
-static test_return_t jenkins_run (memcached_st *memc __attribute__((unused)))
+static test_return_t jenkins_run (memcached_st *memc)
{
uint32_t x;
const char **ptr;
-
+ (void)memc;
for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
{
@@ -5079,9 +5134,9 @@
}
/*
- Test case adapted from John Gorman <johngorman2@gmail.com>
+ Test case adapted from John Gorman <johngorman2@gmail.com>
- We are testing the error condition when we connect to a server via memcached_get()
+ We are testing the error condition when we connect to a server via memcached_get()
but find that the server is not available.
*/
static test_return_t memcached_get_MEMCACHED_ERRNO(memcached_st *memc)
@@ -5114,7 +5169,7 @@
return TEST_SUCCESS;
}
-/*
+/*
We connect to a server which exists, but search for a key that does not exist.
*/
static test_return_t memcached_get_MEMCACHED_NOTFOUND(memcached_st *memc)
@@ -5136,9 +5191,9 @@
}
/*
- Test case adapted from John Gorman <johngorman2@gmail.com>
+ Test case adapted from John Gorman <johngorman2@gmail.com>
- We are testing the error condition when we connect to a server via memcached_get_by_key()
+ We are testing the error condition when we connect to a server via memcached_get_by_key()
but find that the server is not available.
*/
static test_return_t memcached_get_by_key_MEMCACHED_ERRNO(memcached_st *memc)
@@ -5171,7 +5226,7 @@
return TEST_SUCCESS;
}
-/*
+/*
We connect to a server which exists, but search for a key that does not exist.
*/
static test_return_t memcached_get_by_key_MEMCACHED_NOTFOUND(memcached_st *memc)
@@ -5625,16 +5680,16 @@
static test_return_t regression_bug_463297(memcached_st *memc)
{
- memcached_st *memc_clone= memcached_clone(NULL, memc);
- test_true(memc_clone != NULL);
- test_true(memcached_version(memc_clone) == MEMCACHED_SUCCESS);
-
- memcached_server_instance_st instance=
- memcached_server_instance_by_position(memc_clone, 0);
-
- if (instance->major_version > 1 ||
- (instance->major_version == 1 &&
- instance->minor_version > 2))
+ memcached_st *memc_clone= memcached_clone(NULL, memc);
+ test_true(memc_clone != NULL);
+ test_true(memcached_version(memc_clone) == MEMCACHED_SUCCESS);
+
+ memcached_server_instance_st instance=
+ memcached_server_instance_by_position(memc_clone, 0);
+
+ if (instance->major_version > 1 ||
+ (instance->major_version == 1 &&
+ instance->minor_version > 2))
{
/* Binary protocol doesn't support deferred delete */
memcached_st *bin_clone= memcached_clone(NULL, memc);
@@ -5653,7 +5708,7 @@
memcached_return_t rc= memcached_delete(memc, "foo", 3, 1);
/* but there is a bug in some of the memcached servers (1.4) that treats
- * the counter as noreply so it doesn't send the proper error message
+ * the counter as noreply so it doesn't send the proper error message
*/
test_true_got(rc == MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_CLIENT_ERROR || rc == MEMCACHED_INVALID_ARGUMENTS, memcached_strerror(NULL, rc));
@@ -5884,6 +5939,53 @@
return TEST_SUCCESS;
}
+/*
+ * This tests ensures expected disconnections (for some behavior changes
+ * for instance) do not wrongly increase failure counter
+ */
+static test_return_t wrong_failure_counter_two_test(memcached_st *memc)
+{
+ memcached_return rc;
+
+ memcached_st *memc_clone;
+ memc_clone= memcached_clone(NULL, memc);
+ test_true(memc_clone);
+
+ /* Set value to force connection to the server */
+ const char *key= "marmotte";
+ const char *value= "milka";
+ char *string = NULL;
+ size_t string_length;
+ uint32_t flags;
+
+ rc= memcached_set(memc_clone, key, strlen(key),
+ value, strlen(value),
+ (time_t)0, (uint32_t)0);
+ test_true_got(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED, memcached_strerror(NULL, rc));
+
+
+ /* put failure limit to 1 */
+ rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 1);
+ assert(rc == MEMCACHED_SUCCESS);
+ /* Put a retry timeout to effectively activate failure_limit effect */
+ rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1);
+ assert(rc == MEMCACHED_SUCCESS);
+ /* change behavior that triggers memcached_quit()*/
+ rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1);
+ assert(rc == MEMCACHED_SUCCESS);
+
+
+ /* Check if we still are connected */
+ string= memcached_get(memc_clone, key, strlen(key),
+ &string_length, &flags, &rc);
+
+ test_true_got(rc == MEMCACHED_SUCCESS, memcached_strerror(NULL, rc));
+ test_true(string);
+ free(string);
+
+ return TEST_SUCCESS;
+}
+
@@ -6021,6 +6123,30 @@
return TEST_SUCCESS;
}
+// Look for memory leak
+static test_return_t regression_bug_728286(memcached_st *unused)
+{
+ (void)unused;
+ memcached_server_st *servers = memcached_servers_parse("1.2.3.4:99");
+ memcached_server_free(servers);
+
+ return TEST_SUCCESS;
+}
+
+static test_return_t regression_bug_581030(memcached_st *unused)
+{
+ (void)unused;
+
+#ifndef DEBUG
+ memcached_stat_st *local_stat= memcached_stat(NULL, NULL, NULL);
+ test_false(local_stat);
+
+ memcached_stat_free(NULL, NULL);
+#endif
+
+ return TEST_SUCCESS;
+}
+
static void memcached_die(memcached_st* mc, memcached_return error, const char* what, uint32_t it)
{
fprintf(stderr, "Iteration #%u: ", it);
@@ -6049,7 +6175,7 @@
return TEST_SKIPPED;
}
- for (uint32_t x= 0; x < TEST_CONSTANT_CREATION; x++)
+ for (uint32_t x= 0; x < TEST_CONSTANT_CREATION; x++)
{
memcached_st* mc= memcached_create(NULL);
memcached_return rc;
@@ -6079,7 +6205,7 @@
if (rc == MEMCACHED_SUCCESS)
{
- if (x > 0)
+ if (x > 0)
{
size_t get_value_len;
char *get_value;
@@ -6308,6 +6434,7 @@
{"user_supplied_bug20", 1, (test_callback_fn)user_supplied_bug20 },
{"user_supplied_bug21", 1, (test_callback_fn)user_supplied_bug21 },
{"wrong_failure_counter_test", 1, (test_callback_fn)wrong_failure_counter_test},
+ {"wrong_failure_counter_two_test", 1, (test_callback_fn)wrong_failure_counter_two_test},
{0, 0, (test_callback_fn)0}
};
@@ -6337,6 +6464,8 @@
{"lp:490486", 1, (test_callback_fn)regression_bug_490486 },
{"lp:583031", 1, (test_callback_fn)regression_bug_583031 },
{"lp:?", 1, (test_callback_fn)regression_bug_ },
+ {"lp:728286", 1, (test_callback_fn)regression_bug_728286 },
+ {"lp:581030", 1, (test_callback_fn)regression_bug_581030 },
{0, 0, (test_callback_fn)0}
};
@@ -6391,6 +6520,11 @@
{0, 0, (test_callback_fn)0}
};
+test_st murmur_availability[] ={
+ {"murmur_avaibility_test", 0, (test_callback_fn)murmur_avaibility_test},
+ {0, 0, (test_callback_fn)0}
+};
+
#if 0
test_st hash_sanity[] ={
{"hash sanity", 0, (test_callback_fn)hash_sanity_test},
@@ -6432,6 +6566,7 @@
{"hash_sanity", 0, 0, hash_sanity},
#endif
{"hsieh_availability", 0, 0, hsieh_availability},
+ {"murmur_availability", 0, 0, murmur_availability},
{"block", 0, 0, tests},
{"binary", (test_callback_fn)pre_binary, 0, tests},
{"nonblock", (test_callback_fn)pre_nonblock, 0, tests},
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/mem_plus.cc
^
|
@@ -1,7 +1,8 @@
/*
C++ to libmemcit
*/
-#include "test.h"
+#include <libtest/test.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/mem_udp.c
^
|
@@ -26,9 +26,8 @@
#include <unistd.h>
#include <time.h>
-#include "server.h"
-
-#include "test.h"
+#include <libtest/server.h>
+#include <libtest/test.h>
#define SERVERS_TO_CREATE 5
|
[-]
[+]
|
Added |
libmemcached-0.48.tar.bz2/tests/output_plus.res
^
|
@@ -0,0 +1,5 @@
+servers localhost:11221,
+ localhost : 11221
+
+
+retvalue 1
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/plus.cpp
^
|
@@ -12,9 +12,10 @@
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
-#include "server.h"
-#include "test.h"
+#include <libtest/server.h>
+
+#include <libtest/test.h>
#include <string>
#include <iostream>
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/tests/start.c
^
|
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <string.h>
-#include "server.h"
+#include <libtest/server.h>
int main(void)
{
|
[-]
[+]
|
Changed |
libmemcached-0.48.tar.bz2/unittests/include.am
^
|
@@ -12,7 +12,7 @@
unittests_unittests_CXXFLAGS= ${AM_CXXFLAGS} ${NO_WERROR} ${NO_EFF_CXX}
unittests_unittests_LDADD= \
- tests/libserver.la \
+ libtest/libserver.la \
libmemcached/libmemcachedinternal.la \
${TESTS_LDADDS} ${LTLIBGTEST}
# Shorthand
|