Merge lp://staging/~mordred/libmemcached/write-strings into lp://staging/~tangent-org/libmemcached/trunk

Proposed by Monty Taylor
Status: Superseded
Proposed branch: lp://staging/~mordred/libmemcached/write-strings
Merge into: lp://staging/~tangent-org/libmemcached/trunk
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~mordred/libmemcached/write-strings
Reviewer Review Type Date Requested Status
Libmemcached-developers Pending
Review via email: mp+8482@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2009-07-11.

To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote :

Updated to latest pandora-build macros.
Fixed warnings related to -Wwrite-strings - which are treating string literals as char * instead of const char *.

557. By Monty Taylor

pandora-build v0.10

558. By Monty Taylor

Merged from myself.

559. By Monty Taylor

Merged from Padraig.

560. By Monty Taylor

Merged in a lost patch.

561. By Monty Taylor

pandora-build v0.20
Turned off inllargeuse warning in sun studio

562. By Monty Taylor

Added macro files I missed earlier...

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'clients/memcp.c'
--- clients/memcp.c 2009-06-15 13:03:47 +0000
+++ clients/memcp.c 2009-07-08 13:38:34 +0000
@@ -91,7 +91,7 @@
9191
92 if (opt_verbose) 92 if (opt_verbose)
93 {93 {
94 static char *opstr[] = { "set", "add", "replace" };94 static const char *opstr[] = { "set", "add", "replace" };
95 printf("op: %s\nsource file: %s\nlength: %zu\n"95 printf("op: %s\nsource file: %s\nlength: %zu\n"
96 "key: %s\nflags: %x\nexpires: %llu\n",96 "key: %s\nflags: %x\nexpires: %llu\n",
97 opstr[opt_method - OPT_SET], argv[optind], (size_t)sbuf.st_size,97 opstr[opt_method - OPT_SET], argv[optind], (size_t)sbuf.st_size,
9898
=== modified file 'clients/utilities.c'
--- clients/utilities.c 2009-06-15 13:03:47 +0000
+++ clients/utilities.c 2009-07-08 13:38:34 +0000
@@ -16,13 +16,13 @@
16 return s + us;16 return s + us;
17}17}
1818
19void version_command(char *command_name)19void version_command(const char *command_name)
20{20{
21 printf("%s v%u.%u\n", command_name, 1, 0);21 printf("%s v%u.%u\n", command_name, 1, 0);
22 exit(0);22 exit(0);
23}23}
2424
25static char *lookup_help(memcached_options option)25static const char *lookup_help(memcached_options option)
26{26{
27 switch (option)27 switch (option)
28 {28 {
@@ -54,7 +54,7 @@
54 return "forgot to document this function :)";54 return "forgot to document this function :)";
55}55}
5656
57void help_command(char *command_name, char *description,57void help_command(const char *command_name, const char *description,
58 const struct option *long_options,58 const struct option *long_options,
59 memcached_programs_help_st *options __attribute__((unused)))59 memcached_programs_help_st *options __attribute__((unused)))
60{60{
@@ -66,7 +66,7 @@
6666
67 for (x= 0; long_options[x].name; x++) 67 for (x= 0; long_options[x].name; x++)
68 {68 {
69 char *help_message;69 const char *help_message;
7070
71 printf("\t --%s%c\n", long_options[x].name, 71 printf("\t --%s%c\n", long_options[x].name,
72 long_options[x].has_arg ? '=' : ' '); 72 long_options[x].has_arg ? '=' : ' ');
7373
=== modified file 'clients/utilities.h'
--- clients/utilities.h 2008-04-20 22:49:37 +0000
+++ clients/utilities.h 2009-07-08 13:38:34 +0000
@@ -23,8 +23,8 @@
23char *strdup_cleanup(const char *str);23char *strdup_cleanup(const char *str);
24void cleanup(void);24void cleanup(void);
25long int timedif(struct timeval a, struct timeval b);25long int timedif(struct timeval a, struct timeval b);
26void version_command(char *command_name);26void version_command(const char *command_name);
27void help_command(char *command_name, char *description,27void help_command(const char *command_name, const char *description,
28 const struct option *long_options,28 const struct option *long_options,
29 memcached_programs_help_st *options);29 memcached_programs_help_st *options);
30void process_hash_option(memcached_st *memc, char *opt_hash);30void process_hash_option(memcached_st *memc, char *opt_hash);
3131
=== modified file 'libmemcached/common.h'
--- libmemcached/common.h 2009-07-06 17:20:04 +0000
+++ libmemcached/common.h 2009-07-08 13:38:34 +0000
@@ -135,7 +135,7 @@
135void server_list_free(memcached_st *ptr, memcached_server_st *servers);135void server_list_free(memcached_st *ptr, memcached_server_st *servers);
136136
137LIBMEMCACHED_LOCAL137LIBMEMCACHED_LOCAL
138memcached_return memcached_key_test(char **keys, size_t *key_length,138memcached_return memcached_key_test(const char **keys, size_t *key_length,
139 unsigned int number_of_keys);139 unsigned int number_of_keys);
140140
141141
142142
=== modified file 'libmemcached/memcached.h'
--- libmemcached/memcached.h 2009-07-06 17:20:04 +0000
+++ libmemcached/memcached.h 2009-07-08 13:38:34 +0000
@@ -172,7 +172,7 @@
172LIBMEMCACHED_API172LIBMEMCACHED_API
173void memcached_quit(memcached_st *ptr);173void memcached_quit(memcached_st *ptr);
174LIBMEMCACHED_API174LIBMEMCACHED_API
175char *memcached_strerror(memcached_st *ptr, memcached_return rc);175const char *memcached_strerror(memcached_st *ptr, memcached_return rc);
176LIBMEMCACHED_API176LIBMEMCACHED_API
177memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavior flag, uint64_t data);177memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavior flag, uint64_t data);
178LIBMEMCACHED_API178LIBMEMCACHED_API
179179
=== modified file 'libmemcached/memcached.hh'
--- libmemcached/memcached.hh 2009-07-07 21:57:24 +0000
+++ libmemcached/memcached.hh 2009-07-08 13:38:34 +0000
@@ -46,7 +46,7 @@
46 value_length, &flags, &rc);46 value_length, &flags, &rc);
47 }47 }
4848
49 memcached_return mget(char **keys, size_t *key_length, 49 memcached_return mget(const char **keys, size_t *key_length,
50 unsigned int number_of_keys)50 unsigned int number_of_keys)
51 {51 {
5252
5353
=== modified file 'libmemcached/memcached_auto.c'
--- libmemcached/memcached_auto.c 2009-06-15 13:03:47 +0000
+++ libmemcached/memcached_auto.c 2009-07-08 13:38:34 +0000
@@ -15,7 +15,7 @@
15 unlikely (ptr->hosts == NULL || ptr->number_of_hosts == 0)15 unlikely (ptr->hosts == NULL || ptr->number_of_hosts == 0)
16 return MEMCACHED_NO_SERVERS;16 return MEMCACHED_NO_SERVERS;
1717
18 if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))18 if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
19 return MEMCACHED_BAD_KEY_PROVIDED;19 return MEMCACHED_BAD_KEY_PROVIDED;
2020
21 server_key= memcached_generate_hash(ptr, key, key_length);21 server_key= memcached_generate_hash(ptr, key, key_length);
2222
=== modified file 'libmemcached/memcached_callback.c'
--- libmemcached/memcached_callback.c 2009-06-21 10:59:22 +0000
+++ libmemcached/memcached_callback.c 2009-07-08 13:38:34 +0000
@@ -21,7 +21,7 @@
21 {21 {
22 size_t key_length= strlen(key);22 size_t key_length= strlen(key);
2323
24 if (memcached_key_test((char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED)24 if (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED)
25 {25 {
26 return MEMCACHED_BAD_KEY_PROVIDED;26 return MEMCACHED_BAD_KEY_PROVIDED;
27 }27 }
2828
=== modified file 'libmemcached/memcached_get.c'
--- libmemcached/memcached_get.c 2009-06-21 15:51:17 +0000
+++ libmemcached/memcached_get.c 2009-07-08 13:38:34 +0000
@@ -37,7 +37,7 @@
37 *error= memcached_mget_by_key(ptr, 37 *error= memcached_mget_by_key(ptr,
38 master_key, 38 master_key,
39 master_key_length, 39 master_key_length,
40 (char **)&key, &key_length, 1);40 (const char **)&key, &key_length, 1);
4141
42 value= memcached_fetch(ptr, NULL, NULL, 42 value= memcached_fetch(ptr, NULL, NULL,
43 value_length, flags, error);43 value_length, flags, error);
@@ -102,7 +102,7 @@
102}102}
103103
104memcached_return memcached_mget(memcached_st *ptr, 104memcached_return memcached_mget(memcached_st *ptr,
105 char **keys, size_t *key_length, 105 const char **keys, size_t *key_length,
106 unsigned int number_of_keys)106 unsigned int number_of_keys)
107{107{
108 return memcached_mget_by_key(ptr, NULL, 0, keys, key_length, number_of_keys);108 return memcached_mget_by_key(ptr, NULL, 0, keys, key_length, number_of_keys);
@@ -111,19 +111,19 @@
111static memcached_return binary_mget_by_key(memcached_st *ptr,111static memcached_return binary_mget_by_key(memcached_st *ptr,
112 unsigned int master_server_key,112 unsigned int master_server_key,
113 bool is_master_key_set,113 bool is_master_key_set,
114 char **keys, size_t *key_length,114 const char **keys, size_t *key_length,
115 unsigned int number_of_keys);115 unsigned int number_of_keys);
116116
117memcached_return memcached_mget_by_key(memcached_st *ptr, 117memcached_return memcached_mget_by_key(memcached_st *ptr,
118 const char *master_key, 118 const char *master_key,
119 size_t master_key_length,119 size_t master_key_length,
120 char **keys, 120 const char **keys,
121 size_t *key_length, 121 size_t *key_length,
122 unsigned int number_of_keys)122 unsigned int number_of_keys)
123{123{
124 unsigned int x;124 unsigned int x;
125 memcached_return rc= MEMCACHED_NOTFOUND;125 memcached_return rc= MEMCACHED_NOTFOUND;
126 char *get_command= "get ";126 const char *get_command= "get ";
127 uint8_t get_command_length= 4;127 uint8_t get_command_length= 4;
128 unsigned int master_server_key= (unsigned int)-1; /* 0 is a valid server id! */128 unsigned int master_server_key= (unsigned int)-1; /* 0 is a valid server id! */
129 bool is_master_key_set= false;129 bool is_master_key_set= false;
@@ -145,7 +145,7 @@
145145
146 if (master_key && master_key_length)146 if (master_key && master_key_length)
147 {147 {
148 if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((char **)&master_key, &master_key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))148 if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((const char **)&master_key, &master_key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
149 return MEMCACHED_BAD_KEY_PROVIDED;149 return MEMCACHED_BAD_KEY_PROVIDED;
150 master_server_key= memcached_generate_hash(ptr, master_key, master_key_length);150 master_server_key= memcached_generate_hash(ptr, master_key, master_key_length);
151 is_master_key_set= true;151 is_master_key_set= true;
@@ -259,7 +259,7 @@
259static memcached_return simple_binary_mget(memcached_st *ptr,259static memcached_return simple_binary_mget(memcached_st *ptr,
260 unsigned int master_server_key,260 unsigned int master_server_key,
261 bool is_master_key_set,261 bool is_master_key_set,
262 char **keys, size_t *key_length, 262 const char **keys, size_t *key_length,
263 unsigned int number_of_keys)263 unsigned int number_of_keys)
264{264{
265 memcached_return rc= MEMCACHED_NOTFOUND;265 memcached_return rc= MEMCACHED_NOTFOUND;
@@ -360,7 +360,7 @@
360360
361static memcached_return replication_binary_mget(memcached_st *ptr,361static memcached_return replication_binary_mget(memcached_st *ptr,
362 uint32_t* hash, bool* dead_servers,362 uint32_t* hash, bool* dead_servers,
363 char **keys, size_t *key_length,363 const char **keys, size_t *key_length,
364 unsigned int number_of_keys)364 unsigned int number_of_keys)
365{365{
366 memcached_return rc= MEMCACHED_NOTFOUND;366 memcached_return rc= MEMCACHED_NOTFOUND;
@@ -459,7 +459,7 @@
459static memcached_return binary_mget_by_key(memcached_st *ptr,459static memcached_return binary_mget_by_key(memcached_st *ptr,
460 unsigned int master_server_key,460 unsigned int master_server_key,
461 bool is_master_key_set,461 bool is_master_key_set,
462 char **keys, size_t *key_length,462 const char **keys, size_t *key_length,
463 unsigned int number_of_keys)463 unsigned int number_of_keys)
464{464{
465 memcached_return rc;465 memcached_return rc;
466466
=== modified file 'libmemcached/memcached_get.h'
--- libmemcached/memcached_get.h 2009-07-06 17:20:04 +0000
+++ libmemcached/memcached_get.h 2009-07-08 13:38:34 +0000
@@ -23,7 +23,7 @@
2323
24LIBMEMCACHED_API24LIBMEMCACHED_API
25memcached_return memcached_mget(memcached_st *ptr, 25memcached_return memcached_mget(memcached_st *ptr,
26 char **keys, size_t *key_length, 26 const char **keys, size_t *key_length,
27 unsigned int number_of_keys);27 unsigned int number_of_keys);
2828
29LIBMEMCACHED_API29LIBMEMCACHED_API
@@ -38,7 +38,7 @@
38memcached_return memcached_mget_by_key(memcached_st *ptr, 38memcached_return memcached_mget_by_key(memcached_st *ptr,
39 const char *master_key, size_t 39 const char *master_key, size_t
40 master_key_length,40 master_key_length,
41 char **keys, 41 const char **keys,
42 size_t *key_length, 42 size_t *key_length,
43 unsigned int number_of_keys);43 unsigned int number_of_keys);
4444
4545
=== modified file 'libmemcached/memcached_key.c'
--- libmemcached/memcached_key.c 2009-03-21 13:09:45 +0000
+++ libmemcached/memcached_key.c 2009-07-08 13:38:34 +0000
@@ -1,6 +1,6 @@
1#include "common.h"1#include "common.h"
22
3memcached_return memcached_key_test(char **keys, size_t *key_length, 3memcached_return memcached_key_test(const char **keys, size_t *key_length,
4 unsigned int number_of_keys)4 unsigned int number_of_keys)
5{5{
6 uint32_t x;6 uint32_t x;
77
=== modified file 'libmemcached/memcached_result.c'
--- libmemcached/memcached_result.c 2009-06-10 10:29:06 +0000
+++ libmemcached/memcached_result.c 2009-07-08 13:38:34 +0000
@@ -40,7 +40,7 @@
40/*40/*
41 NOTE turn into macro41 NOTE turn into macro
42*/42*/
43memcached_return memcached_result_set_value(memcached_result_st *ptr, char *value, size_t length)43memcached_return memcached_result_set_value(memcached_result_st *ptr, const char *value, size_t length)
44{44{
45 return memcached_string_append(&ptr->value, value, length);45 return memcached_string_append(&ptr->value, value, length);
46}46}
4747
=== modified file 'libmemcached/memcached_result.h'
--- libmemcached/memcached_result.h 2009-07-06 17:20:04 +0000
+++ libmemcached/memcached_result.h 2009-07-08 13:38:34 +0000
@@ -48,7 +48,7 @@
48#define memcached_result_flags(A) (A)->flags48#define memcached_result_flags(A) (A)->flags
49#define memcached_result_cas(A) (A)->cas49#define memcached_result_cas(A) (A)->cas
50LIBMEMCACHED_API50LIBMEMCACHED_API
51memcached_return memcached_result_set_value(memcached_result_st *ptr, char *value, size_t length);51memcached_return memcached_result_set_value(memcached_result_st *ptr, const char *value, size_t length);
52#define memcached_result_set_flags(A,B) (A)->flags=(B)52#define memcached_result_set_flags(A,B) (A)->flags=(B)
53#define memcached_result_set_expiration(A,B) (A)->expiration=(B)53#define memcached_result_set_expiration(A,B) (A)->expiration=(B)
5454
5555
=== modified file 'libmemcached/memcached_server.c'
--- libmemcached/memcached_server.c 2009-06-10 10:29:06 +0000
+++ libmemcached/memcached_server.c 2009-07-08 13:38:34 +0000
@@ -120,7 +120,7 @@
120 return NULL;120 return NULL;
121 }121 }
122122
123 if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))123 if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
124 {124 {
125 *error= MEMCACHED_BAD_KEY_PROVIDED;125 *error= MEMCACHED_BAD_KEY_PROVIDED;
126 return NULL;126 return NULL;
127127
=== modified file 'libmemcached/memcached_stats.c'
--- libmemcached/memcached_stats.c 2009-06-14 21:24:48 +0000
+++ libmemcached/memcached_stats.c 2009-07-08 13:38:34 +0000
@@ -3,7 +3,7 @@
33
4#include "common.h"4#include "common.h"
55
6static char *memcached_stat_keys[] = {6static const char *memcached_stat_keys[] = {
7 "pid",7 "pid",
8 "uptime",8 "uptime",
9 "time",9 "time",
1010
=== modified file 'libmemcached/memcached_storage.c'
--- libmemcached/memcached_storage.c 2009-07-01 19:36:25 +0000
+++ libmemcached/memcached_storage.c 2009-07-08 13:38:34 +0000
@@ -19,7 +19,7 @@
19} memcached_storage_action;19} memcached_storage_action;
2020
21/* Inline this */21/* Inline this */
22static char *storage_op_string(memcached_storage_action verb)22static const char *storage_op_string(memcached_storage_action verb)
23{23{
24 switch (verb)24 switch (verb)
25 {25 {
@@ -79,7 +79,7 @@
79 unlikely (ptr->number_of_hosts == 0)79 unlikely (ptr->number_of_hosts == 0)
80 return MEMCACHED_NO_SERVERS;80 return MEMCACHED_NO_SERVERS;
8181
82 if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))82 if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
83 return MEMCACHED_BAD_KEY_PROVIDED;83 return MEMCACHED_BAD_KEY_PROVIDED;
8484
85 if (ptr->flags & MEM_BINARY_PROTOCOL)85 if (ptr->flags & MEM_BINARY_PROTOCOL)
8686
=== modified file 'libmemcached/memcached_strerror.c'
--- libmemcached/memcached_strerror.c 2009-06-21 00:33:44 +0000
+++ libmemcached/memcached_strerror.c 2009-07-08 13:38:34 +0000
@@ -1,6 +1,6 @@
1#include "common.h"1#include "common.h"
22
3char *memcached_strerror(memcached_st *ptr __attribute__((unused)), memcached_return rc)3const char *memcached_strerror(memcached_st *ptr __attribute__((unused)), memcached_return rc)
4{4{
5 switch (rc)5 switch (rc)
6 {6 {
77
=== modified file 'libmemcached/memcached_string.c'
--- libmemcached/memcached_string.c 2009-06-10 10:29:06 +0000
+++ libmemcached/memcached_string.c 2009-07-08 13:38:34 +0000
@@ -79,7 +79,7 @@
79}79}
8080
81memcached_return memcached_string_append(memcached_string_st *string,81memcached_return memcached_string_append(memcached_string_st *string,
82 char *value, size_t length)82 const char *value, size_t length)
83{83{
84 memcached_return rc;84 memcached_return rc;
8585
8686
=== modified file 'libmemcached/memcached_string.h'
--- libmemcached/memcached_string.h 2009-07-06 17:20:04 +0000
+++ libmemcached/memcached_string.h 2009-07-08 13:38:34 +0000
@@ -40,7 +40,7 @@
40 char character);40 char character);
41LIBMEMCACHED_API41LIBMEMCACHED_API
42memcached_return memcached_string_append(memcached_string_st *string,42memcached_return memcached_string_append(memcached_string_st *string,
43 char *value, size_t length);43 const char *value, size_t length);
44LIBMEMCACHED_API44LIBMEMCACHED_API
45memcached_return memcached_string_reset(memcached_string_st *string);45memcached_return memcached_string_reset(memcached_string_st *string);
46LIBMEMCACHED_API46LIBMEMCACHED_API
4747
=== modified file 'libmemcached/memcached_version.c'
--- libmemcached/memcached_version.c 2009-03-09 21:59:06 +0000
+++ libmemcached/memcached_version.c 2009-07-08 13:38:34 +0000
@@ -26,7 +26,7 @@
26 memcached_return rc;26 memcached_return rc;
27 char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];27 char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
28 char *response_ptr;28 char *response_ptr;
29 char *command= "version\r\n";29 const char *command= "version\r\n";
3030
31 send_length= strlen(command);31 send_length= strlen(command);
3232
3333
=== modified file 'm4/pandora_canonical.m4'
--- m4/pandora_canonical.m4 2009-07-08 23:05:36 +0000
+++ m4/pandora_canonical.m4 2009-07-09 18:33:08 +0000
@@ -4,7 +4,7 @@
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6dnl Which version of the canonical setup we're using6dnl Which version of the canonical setup we're using
7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.3])7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.9])
88
9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10 dnl Force dependency tracking on for Sun Studio builds10 dnl Force dependency tracking on for Sun Studio builds
@@ -22,7 +22,8 @@
22 m4_define([PCT_USE_GNULIB],[no])22 m4_define([PCT_USE_GNULIB],[no])
23 m4_define([PCT_REQUIRE_CXX],[no])23 m4_define([PCT_REQUIRE_CXX],[no])
24 m4_define([PCT_IGNORE_SHARED_PTR],[no])24 m4_define([PCT_IGNORE_SHARED_PTR],[no])
25 m4_foreach([pct_arg],$*,[25 m4_define([PCT_FORCE_GCC42],[no])
26 m4_foreach([pct_arg],[$*],[
26 m4_case(pct_arg,27 m4_case(pct_arg,
27 [use-gnulib], [28 [use-gnulib], [
28 m4_undefine([PCT_USE_GNULIB])29 m4_undefine([PCT_USE_GNULIB])
@@ -35,6 +36,10 @@
35 [ignore-shared-ptr], [36 [ignore-shared-ptr], [
36 m4_undefine([PCT_IGNORE_SHARED_PTR])37 m4_undefine([PCT_IGNORE_SHARED_PTR])
37 m4_define([PCT_IGNORE_SHARED_PTR],[yes])38 m4_define([PCT_IGNORE_SHARED_PTR],[yes])
39 ],
40 [force-gcc42], [
41 m4_undefine([PCT_FORCE_GCC42])
42 m4_define([PCT_FORCE_GCC42],[yes])
38 ])43 ])
39 ])44 ])
4045
@@ -53,6 +58,7 @@
53 m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ])58 m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ])
54 59
55 AC_REQUIRE([AC_PROG_CC])60 AC_REQUIRE([AC_PROG_CC])
61 AC_REQUIRE([PANDORA_MAC_GCC42])
5662
57 dnl Once we can use a modern autoconf, we can use this63 dnl Once we can use a modern autoconf, we can use this
58 dnl AC_PROG_CC_C9964 dnl AC_PROG_CC_C99
@@ -61,6 +67,9 @@
61 AM_PROG_CC_C_O67 AM_PROG_CC_C_O
6268
63 gl_USE_SYSTEM_EXTENSIONS69 gl_USE_SYSTEM_EXTENSIONS
70 m4_if(PCT_FORCE_GCC42, [yes], [
71 AS_IF([test "$GCC" = "yes"], PANDORA_ENSURE_GCC_VERSION)
72 ])
64 73
6574
66 PANDORA_LIBTOOL75 PANDORA_LIBTOOL
@@ -99,15 +108,17 @@
99108
100 AC_SYS_LARGEFILE109 AC_SYS_LARGEFILE
101110
111
102 PANDORA_CHECK_C_VERSION112 PANDORA_CHECK_C_VERSION
103 PANDORA_CHECK_CXX_VERSION113 PANDORA_CHECK_CXX_VERSION
104114
105 PANDORA_OPTIMIZE115 PANDORA_OPTIMIZE
106 PANDORA_64BIT116 PANDORA_64BIT
117
118 gl_VISIBILITY
119
107 PANDORA_WARNINGS(PCT_ALL_ARGS)120 PANDORA_WARNINGS(PCT_ALL_ARGS)
108121
109 gl_VISIBILITY
110
111 PANDORA_ENABLE_DTRACE122 PANDORA_ENABLE_DTRACE
112 PANDORA_HEADER_ASSERT123 PANDORA_HEADER_ASSERT
113124
114125
=== modified file 'm4/pandora_optimize.m4'
--- m4/pandora_optimize.m4 2009-07-08 07:37:38 +0000
+++ m4/pandora_optimize.m4 2009-07-09 18:33:08 +0000
@@ -39,12 +39,15 @@
39 CXX="${CXX} -xlang=c99"39 CXX="${CXX} -xlang=c99"
4040
41 AM_CFLAGS="-g -mt -xstrconst -Xa ${AM_CFLAGS}"41 AM_CFLAGS="-g -mt -xstrconst -Xa ${AM_CFLAGS}"
42 AM_CXXFLAGS="-g -mt -compat=5 -library=stlport4 -template=no%extdef ${AM_CXXFLAGS}"42 AM_CXXFLAGS="-mt -compat=5 -library=stlport4 -template=no%extdef ${AM_CXXFLAGS}"
43
44 DEBUG_CXXFLAGS="-g"
4345
44 dnl TODO: Make a test for -xO4 usability here46 dnl TODO: Make a test for -xO4 usability here
45 OPTIMIZE_FLAGS="-xO3 -xlibmil -xdepend -xbuiltin"47 OPTIMIZE_FLAGS="-xO3 -xlibmil -xdepend -xbuiltin"
46 OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS}"48 OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS}"
47 OPTIMIZE_CXXFLAGS="${OPTIMIZE_FLAGS}"49 OPTIMIZE_CXXFLAGS="-g0 ${OPTIMIZE_FLAGS}"
50
48 ])51 ])
4952
50 AC_ARG_WITH([debug],53 AC_ARG_WITH([debug],
5154
=== modified file 'm4/pandora_warnings.m4'
--- m4/pandora_warnings.m4 2009-07-08 19:28:20 +0000
+++ m4/pandora_warnings.m4 2009-07-09 05:34:19 +0000
@@ -15,7 +15,7 @@
15 m4_define([PW_WARN_ALWAYS_ON],[no])15 m4_define([PW_WARN_ALWAYS_ON],[no])
16 ifdef([m4_define],,[define([m4_define], defn([define]))])16 ifdef([m4_define],,[define([m4_define], defn([define]))])
17 ifdef([m4_undefine],,[define([m4_undefine], defn([undefine]))])17 ifdef([m4_undefine],,[define([m4_undefine], defn([undefine]))])
18 m4_foreach([pw_arg],$*,[18 m4_foreach([pw_arg],[$*],[
19 m4_case(pw_arg,19 m4_case(pw_arg,
20 [less-warnings],[20 [less-warnings],[
21 m4_undefine([PW_LESS_WARNINGS])21 m4_undefine([PW_LESS_WARNINGS])
@@ -129,13 +129,13 @@
129129
130 m4_if(PW_LESS_WARNINGS,[no],[130 m4_if(PW_LESS_WARNINGS,[no],[
131 BASE_WARNINGS_FULL="-Wformat=2 ${W_CONVERSION} -Wstrict-aliasing"131 BASE_WARNINGS_FULL="-Wformat=2 ${W_CONVERSION} -Wstrict-aliasing"
132 CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum"132 CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings"
133 CXX_WARNINGS_FULL="-Weffc++ -Wold-style-cast"133 CXX_WARNINGS_FULL="-Weffc++ -Wold-style-cast"
134 ],[134 ],[
135 BASE_WARNINGS_FULL="-Wformat ${NO_STRICT_ALIASING}"135 BASE_WARNINGS_FULL="-Wformat ${NO_STRICT_ALIASING}"
136 ])136 ])
137137
138 BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wextra -Wundef -Wshadow -Wstrict-aliasing ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"138 BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wextra -Wundef -Wshadow ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"
139 CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}"139 CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}"
140 CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}"140 CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}"
141141
142142
=== modified file 'tests/atomsmasher.c'
--- tests/atomsmasher.c 2009-07-07 21:57:24 +0000
+++ tests/atomsmasher.c 2009-07-08 13:38:34 +0000
@@ -156,8 +156,8 @@
156static test_return add_test(memcached_st *memc)156static test_return add_test(memcached_st *memc)
157{157{
158 memcached_return rc;158 memcached_return rc;
159 char *key= "foo";159 const char *key= "foo";
160 char *value= "when we sanitize";160 const char *value= "when we sanitize";
161 unsigned long long setting_value;161 unsigned long long setting_value;
162162
163 setting_value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK);163 setting_value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK);
164164
=== modified file 'tests/function.c'
--- tests/function.c 2009-07-06 17:20:04 +0000
+++ tests/function.c 2009-07-08 13:38:34 +0000
@@ -38,7 +38,7 @@
38static uint32_t global_count;38static uint32_t global_count;
3939
40static pairs_st *global_pairs;40static pairs_st *global_pairs;
41static char *global_keys[GLOBAL_COUNT];41static const char *global_keys[GLOBAL_COUNT];
42static size_t global_keys_length[GLOBAL_COUNT];42static size_t global_keys_length[GLOBAL_COUNT];
4343
44static test_return init_test(memcached_st *not_used __attribute__((unused)))44static test_return init_test(memcached_st *not_used __attribute__((unused)))
@@ -299,8 +299,8 @@
299static test_return set_test(memcached_st *memc)299static test_return set_test(memcached_st *memc)
300{300{
301 memcached_return rc;301 memcached_return rc;
302 char *key= "foo";302 const char *key= "foo";
303 char *value= "when we sanitize";303 const char *value= "when we sanitize";
304304
305 rc= memcached_set(memc, key, strlen(key), 305 rc= memcached_set(memc, key, strlen(key),
306 value, strlen(value),306 value, strlen(value),
@@ -313,8 +313,9 @@
313static test_return append_test(memcached_st *memc)313static test_return append_test(memcached_st *memc)
314{314{
315 memcached_return rc;315 memcached_return rc;
316 char *key= "fig";316 const char *key= "fig";
317 char *value= "we";317 const char *in_value= "we";
318 char *out_value= NULL;
318 size_t value_length;319 size_t value_length;
319 uint32_t flags;320 uint32_t flags;
320321
@@ -322,7 +323,7 @@
322 assert(rc == MEMCACHED_SUCCESS);323 assert(rc == MEMCACHED_SUCCESS);
323324
324 rc= memcached_set(memc, key, strlen(key), 325 rc= memcached_set(memc, key, strlen(key),
325 value, strlen(value),326 in_value, strlen(in_value),
326 (time_t)0, (uint32_t)0);327 (time_t)0, (uint32_t)0);
327 assert(rc == MEMCACHED_SUCCESS);328 assert(rc == MEMCACHED_SUCCESS);
328329
@@ -336,12 +337,12 @@
336 (time_t)0, (uint32_t)0);337 (time_t)0, (uint32_t)0);
337 assert(rc == MEMCACHED_SUCCESS);338 assert(rc == MEMCACHED_SUCCESS);
338339
339 value= memcached_get(memc, key, strlen(key),340 out_value= memcached_get(memc, key, strlen(key),
340 &value_length, &flags, &rc);341 &value_length, &flags, &rc);
341 assert(!memcmp(value, "we the people", strlen("we the people")));342 assert(!memcmp(out_value, "we the people", strlen("we the people")));
342 assert(strlen("we the people") == value_length);343 assert(strlen("we the people") == value_length);
343 assert(rc == MEMCACHED_SUCCESS);344 assert(rc == MEMCACHED_SUCCESS);
344 free(value);345 free(out_value);
345346
346 return 0;347 return 0;
347}348}
@@ -349,7 +350,7 @@
349static test_return append_binary_test(memcached_st *memc)350static test_return append_binary_test(memcached_st *memc)
350{351{
351 memcached_return rc;352 memcached_return rc;
352 char *key= "numbers";353 const char *key= "numbers";
353 unsigned int *store_ptr;354 unsigned int *store_ptr;
354 unsigned int store_list[] = { 23, 56, 499, 98, 32847, 0 };355 unsigned int store_list[] = { 23, 56, 499, 98, 32847, 0 };
355 char *value;356 char *value;
@@ -395,9 +396,9 @@
395static test_return cas2_test(memcached_st *memc)396static test_return cas2_test(memcached_st *memc)
396{397{
397 memcached_return rc;398 memcached_return rc;
398 char *keys[]= {"fudge", "son", "food"};399 const char *keys[]= {"fudge", "son", "food"};
399 size_t key_length[]= {5, 3, 4};400 size_t key_length[]= {5, 3, 4};
400 char *value= "we the people";401 const char *value= "we the people";
401 size_t value_length= strlen("we the people");402 size_t value_length= strlen("we the people");
402 unsigned int x;403 unsigned int x;
403 memcached_result_st results_obj;404 memcached_result_st results_obj;
@@ -442,7 +443,7 @@
442 const char *key= "fun";443 const char *key= "fun";
443 size_t key_length= strlen(key);444 size_t key_length= strlen(key);
444 const char *value= "we the people";445 const char *value= "we the people";
445 char* keys[2] = { (char*)key, NULL };446 const char* keys[2] = { key, NULL };
446 size_t keylengths[2] = { strlen(key), 0 };447 size_t keylengths[2] = { strlen(key), 0 };
447 size_t value_length= strlen(value);448 size_t value_length= strlen(value);
448 const char *value2= "change the value";449 const char *value2= "change the value";
@@ -499,8 +500,9 @@
499static test_return prepend_test(memcached_st *memc)500static test_return prepend_test(memcached_st *memc)
500{501{
501 memcached_return rc;502 memcached_return rc;
502 char *key= "fig";503 const char *key= "fig";
503 char *value= "people";504 const char *value= "people";
505 char *out_value= NULL;
504 size_t value_length;506 size_t value_length;
505 uint32_t flags;507 uint32_t flags;
506508
@@ -522,12 +524,12 @@
522 (time_t)0, (uint32_t)0);524 (time_t)0, (uint32_t)0);
523 assert(rc == MEMCACHED_SUCCESS);525 assert(rc == MEMCACHED_SUCCESS);
524526
525 value= memcached_get(memc, key, strlen(key),527 out_value= memcached_get(memc, key, strlen(key),
526 &value_length, &flags, &rc);528 &value_length, &flags, &rc);
527 assert(!memcmp(value, "we the people", strlen("we the people")));529 assert(!memcmp(out_value, "we the people", strlen("we the people")));
528 assert(strlen("we the people") == value_length);530 assert(strlen("we the people") == value_length);
529 assert(rc == MEMCACHED_SUCCESS);531 assert(rc == MEMCACHED_SUCCESS);
530 free(value);532 free(out_value);
531533
532 return 0;534 return 0;
533}535}
@@ -539,8 +541,8 @@
539static test_return add_test(memcached_st *memc)541static test_return add_test(memcached_st *memc)
540{542{
541 memcached_return rc;543 memcached_return rc;
542 char *key= "foo";544 const char *key= "foo";
543 char *value= "when we sanitize";545 const char *value= "when we sanitize";
544 unsigned long long setting_value;546 unsigned long long setting_value;
545547
546 setting_value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK);548 setting_value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK);
@@ -587,9 +589,9 @@
587static test_return replace_test(memcached_st *memc)589static test_return replace_test(memcached_st *memc)
588{590{
589 memcached_return rc;591 memcached_return rc;
590 char *key= "foo";592 const char *key= "foo";
591 char *value= "when we sanitize";593 const char *value= "when we sanitize";
592 char *original= "first we insert some data";594 const char *original= "first we insert some data";
593595
594 rc= memcached_set(memc, key, strlen(key), 596 rc= memcached_set(memc, key, strlen(key),
595 original, strlen(original),597 original, strlen(original),
@@ -607,8 +609,8 @@
607static test_return delete_test(memcached_st *memc)609static test_return delete_test(memcached_st *memc)
608{610{
609 memcached_return rc;611 memcached_return rc;
610 char *key= "foo";612 const char *key= "foo";
611 char *value= "when we sanitize";613 const char *value= "when we sanitize";
612614
613 rc= memcached_set(memc, key, strlen(key), 615 rc= memcached_set(memc, key, strlen(key),
614 value, strlen(value),616 value, strlen(value),
@@ -642,19 +644,19 @@
642644
643static test_return memcached_server_cursor_test(memcached_st *memc)645static test_return memcached_server_cursor_test(memcached_st *memc)
644{646{
645 char *context= "foo bad";647 char context[8];
648 strcpy(context, "foo bad");
646 memcached_server_function callbacks[1];649 memcached_server_function callbacks[1];
647650
648 callbacks[0]= server_function;651 callbacks[0]= server_function;
649 memcached_server_cursor(memc, callbacks, context, 1);652 memcached_server_cursor(memc, callbacks, context, 1);
650
651 return 0;653 return 0;
652}654}
653655
654static test_return bad_key_test(memcached_st *memc)656static test_return bad_key_test(memcached_st *memc)
655{657{
656 memcached_return rc;658 memcached_return rc;
657 char *key= "foo bad";659 const char *key= "foo bad";
658 char *string;660 char *string;
659 size_t string_length;661 size_t string_length;
660 uint32_t flags;662 uint32_t flags;
@@ -687,7 +689,7 @@
687 assert(!string);689 assert(!string);
688690
689 /* Test multi key for bad keys */691 /* Test multi key for bad keys */
690 char *keys[] = { "GoodKey", "Bad Key", "NotMine" };692 const char *keys[] = { "GoodKey", "Bad Key", "NotMine" };
691 size_t key_lengths[] = { 7, 7, 7 };693 size_t key_lengths[] = { 7, 7, 7 };
692 set= 1;694 set= 1;
693 rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);695 rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);
@@ -756,7 +758,7 @@
756static test_return read_through(memcached_st *memc)758static test_return read_through(memcached_st *memc)
757{759{
758 memcached_return rc;760 memcached_return rc;
759 char *key= "foo";761 const char *key= "foo";
760 char *string;762 char *string;
761 size_t string_length;763 size_t string_length;
762 uint32_t flags;764 uint32_t flags;
@@ -817,7 +819,7 @@
817static test_return get_test(memcached_st *memc)819static test_return get_test(memcached_st *memc)
818{820{
819 memcached_return rc;821 memcached_return rc;
820 char *key= "foo";822 const char *key= "foo";
821 char *string;823 char *string;
822 size_t string_length;824 size_t string_length;
823 uint32_t flags;825 uint32_t flags;
@@ -838,8 +840,8 @@
838static test_return get_test2(memcached_st *memc)840static test_return get_test2(memcached_st *memc)
839{841{
840 memcached_return rc;842 memcached_return rc;
841 char *key= "foo";843 const char *key= "foo";
842 char *value= "when we sanitize";844 const char *value= "when we sanitize";
843 char *string;845 char *string;
844 size_t string_length;846 size_t string_length;
845 uint32_t flags;847 uint32_t flags;
@@ -865,8 +867,8 @@
865static test_return set_test2(memcached_st *memc)867static test_return set_test2(memcached_st *memc)
866{868{
867 memcached_return rc;869 memcached_return rc;
868 char *key= "foo";870 const char *key= "foo";
869 char *value= "train in the brain";871 const char *value= "train in the brain";
870 size_t value_length= strlen(value);872 size_t value_length= strlen(value);
871 unsigned int x;873 unsigned int x;
872874
@@ -915,7 +917,7 @@
915static test_return get_test3(memcached_st *memc)917static test_return get_test3(memcached_st *memc)
916{918{
917 memcached_return rc;919 memcached_return rc;
918 char *key= "foo";920 const char *key= "foo";
919 char *value;921 char *value;
920 size_t value_length= 8191;922 size_t value_length= 8191;
921 char *string;923 char *string;
@@ -951,7 +953,7 @@
951static test_return get_test4(memcached_st *memc)953static test_return get_test4(memcached_st *memc)
952{954{
953 memcached_return rc;955 memcached_return rc;
954 char *key= "foo";956 const char *key= "foo";
955 char *value;957 char *value;
956 size_t value_length= 8191;958 size_t value_length= 8191;
957 char *string;959 char *string;
@@ -998,7 +1000,7 @@
998 ** Request the same key twice, to ensure that we hash to the same server1000 ** Request the same key twice, to ensure that we hash to the same server
999 ** (so that we have multiple response values queued up) ;-)1001 ** (so that we have multiple response values queued up) ;-)
1000 */1002 */
1001 char *keys[]= { "key", "key" };1003 const char *keys[]= { "key", "key" };
1002 size_t lengths[]= { 3, 3 };1004 size_t lengths[]= { 3, 3 };
1003 uint32_t flags;1005 uint32_t flags;
1004 size_t rlen;1006 size_t rlen;
@@ -1048,8 +1050,8 @@
1048{1050{
1049 uint64_t new_number;1051 uint64_t new_number;
1050 memcached_return rc;1052 memcached_return rc;
1051 char *key= "number";1053 const char *key= "number";
1052 char *value= "0";1054 const char *value= "0";
10531055
1054 rc= memcached_set(memc, key, strlen(key), 1056 rc= memcached_set(memc, key, strlen(key),
1055 value, strlen(value),1057 value, strlen(value),
@@ -1075,7 +1077,7 @@
1075 {1077 {
1076 uint64_t new_number;1078 uint64_t new_number;
1077 memcached_return rc;1079 memcached_return rc;
1078 char *key= "number";1080 const char *key= "number";
1079 uint64_t initial= 0;1081 uint64_t initial= 0;
10801082
1081 rc= memcached_increment_with_initial(memc, key, strlen(key),1083 rc= memcached_increment_with_initial(memc, key, strlen(key),
@@ -1095,8 +1097,8 @@
1095{1097{
1096 uint64_t new_number;1098 uint64_t new_number;
1097 memcached_return rc;1099 memcached_return rc;
1098 char *key= "number";1100 const char *key= "number";
1099 char *value= "3";1101 const char *value= "3";
11001102
1101 rc= memcached_set(memc, key, strlen(key), 1103 rc= memcached_set(memc, key, strlen(key),
1102 value, strlen(value),1104 value, strlen(value),
@@ -1122,7 +1124,7 @@
1122 {1124 {
1123 uint64_t new_number;1125 uint64_t new_number;
1124 memcached_return rc;1126 memcached_return rc;
1125 char *key= "number";1127 const char *key= "number";
1126 uint64_t initial= 3;1128 uint64_t initial= 3;
11271129
1128 rc= memcached_decrement_with_initial(memc, key, strlen(key),1130 rc= memcached_decrement_with_initial(memc, key, strlen(key),
@@ -1141,8 +1143,8 @@
1141static test_return quit_test(memcached_st *memc)1143static test_return quit_test(memcached_st *memc)
1142{1144{
1143 memcached_return rc;1145 memcached_return rc;
1144 char *key= "fudge";1146 const char *key= "fudge";
1145 char *value= "sanford and sun";1147 const char *value= "sanford and sun";
11461148
1147 rc= memcached_set(memc, key, strlen(key), 1149 rc= memcached_set(memc, key, strlen(key),
1148 value, strlen(value),1150 value, strlen(value),
@@ -1161,7 +1163,7 @@
1161static test_return mget_result_test(memcached_st *memc)1163static test_return mget_result_test(memcached_st *memc)
1162{1164{
1163 memcached_return rc;1165 memcached_return rc;
1164 char *keys[]= {"fudge", "son", "food"};1166 const char *keys[]= {"fudge", "son", "food"};
1165 size_t key_length[]= {5, 3, 4};1167 size_t key_length[]= {5, 3, 4};
1166 unsigned int x;1168 unsigned int x;
11671169
@@ -1218,7 +1220,7 @@
1218static test_return mget_result_alloc_test(memcached_st *memc)1220static test_return mget_result_alloc_test(memcached_st *memc)
1219{1221{
1220 memcached_return rc;1222 memcached_return rc;
1221 char *keys[]= {"fudge", "son", "food"};1223 const char *keys[]= {"fudge", "son", "food"};
1222 size_t key_length[]= {5, 3, 4};1224 size_t key_length[]= {5, 3, 4};
1223 unsigned int x;1225 unsigned int x;
12241226
@@ -1280,7 +1282,7 @@
1280static test_return mget_result_function(memcached_st *memc)1282static test_return mget_result_function(memcached_st *memc)
1281{1283{
1282 memcached_return rc;1284 memcached_return rc;
1283 char *keys[]= {"fudge", "son", "food"};1285 const char *keys[]= {"fudge", "son", "food"};
1284 size_t key_length[]= {5, 3, 4};1286 size_t key_length[]= {5, 3, 4};
1285 unsigned int x;1287 unsigned int x;
1286 unsigned int counter;1288 unsigned int counter;
@@ -1311,7 +1313,7 @@
1311static test_return mget_test(memcached_st *memc)1313static test_return mget_test(memcached_st *memc)
1312{1314{
1313 memcached_return rc;1315 memcached_return rc;
1314 char *keys[]= {"fudge", "son", "food"};1316 const char *keys[]= {"fudge", "son", "food"};
1315 size_t key_length[]= {5, 3, 4};1317 size_t key_length[]= {5, 3, 4};
1316 unsigned int x;1318 unsigned int x;
1317 uint32_t flags;1319 uint32_t flags;
@@ -1695,7 +1697,7 @@
1695 key_lengths[x]= strlen(keys[x]);1697 key_lengths[x]= strlen(keys[x]);
1696 }1698 }
16971699
1698 rc= memcached_mget(memc, keys, key_lengths, KEY_COUNT);1700 rc= memcached_mget(memc, (const char **)keys, key_lengths, KEY_COUNT);
1699 assert(rc == MEMCACHED_SUCCESS);1701 assert(rc == MEMCACHED_SUCCESS);
17001702
1701 /* Turn this into a help function */1703 /* Turn this into a help function */
@@ -1726,7 +1728,7 @@
1726static test_return user_supplied_bug4(memcached_st *memc)1728static test_return user_supplied_bug4(memcached_st *memc)
1727{1729{
1728 memcached_return rc;1730 memcached_return rc;
1729 char *keys[]= {"fudge", "son", "food"};1731 const char *keys[]= {"fudge", "son", "food"};
1730 size_t key_length[]= {5, 3, 4};1732 size_t key_length[]= {5, 3, 4};
1731 unsigned int x;1733 unsigned int x;
1732 uint32_t flags;1734 uint32_t flags;
@@ -1789,7 +1791,7 @@
1789static test_return user_supplied_bug5(memcached_st *memc)1791static test_return user_supplied_bug5(memcached_st *memc)
1790{1792{
1791 memcached_return rc;1793 memcached_return rc;
1792 char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};1794 const char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
1793 size_t key_length[]= {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};1795 size_t key_length[]= {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};
1794 char return_key[MEMCACHED_MAX_KEY];1796 char return_key[MEMCACHED_MAX_KEY];
1795 size_t return_key_length;1797 size_t return_key_length;
@@ -1847,7 +1849,7 @@
1847static test_return user_supplied_bug6(memcached_st *memc)1849static test_return user_supplied_bug6(memcached_st *memc)
1848{1850{
1849 memcached_return rc;1851 memcached_return rc;
1850 char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};1852 const char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
1851 size_t key_length[]= {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};1853 size_t key_length[]= {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};
1852 char return_key[MEMCACHED_MAX_KEY];1854 char return_key[MEMCACHED_MAX_KEY];
1853 size_t return_key_length;1855 size_t return_key_length;
@@ -1916,7 +1918,7 @@
1916 memcached_st *memc_clone;1918 memcached_st *memc_clone;
19171919
1918 memcached_server_st *servers;1920 memcached_server_st *servers;
1919 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";1921 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";
19201922
1921 servers= memcached_servers_parse(server_list);1923 servers= memcached_servers_parse(server_list);
1922 assert(servers);1924 assert(servers);
@@ -1943,8 +1945,8 @@
1943static test_return user_supplied_bug7(memcached_st *memc)1945static test_return user_supplied_bug7(memcached_st *memc)
1944{1946{
1945 memcached_return rc;1947 memcached_return rc;
1946 char *keys= "036790384900";1948 const char *keys= "036790384900";
1947 size_t key_length= strlen("036790384900");1949 size_t key_length= strlen(keys);
1948 char return_key[MEMCACHED_MAX_KEY];1950 char return_key[MEMCACHED_MAX_KEY];
1949 size_t return_key_length;1951 size_t return_key_length;
1950 char *value;1952 char *value;
@@ -1987,7 +1989,7 @@
1987static test_return user_supplied_bug9(memcached_st *memc)1989static test_return user_supplied_bug9(memcached_st *memc)
1988{1990{
1989 memcached_return rc;1991 memcached_return rc;
1990 char *keys[]= {"UDATA:edevil@sapo.pt", "fudge&*@#", "for^#@&$not"};1992 const char *keys[]= {"UDATA:edevil@sapo.pt", "fudge&*@#", "for^#@&$not"};
1991 size_t key_length[3];1993 size_t key_length[3];
1992 unsigned int x;1994 unsigned int x;
1993 uint32_t flags;1995 uint32_t flags;
@@ -2031,7 +2033,7 @@
2031/* We are testing with aggressive timeout to get failures */2033/* We are testing with aggressive timeout to get failures */
2032static test_return user_supplied_bug10(memcached_st *memc)2034static test_return user_supplied_bug10(memcached_st *memc)
2033{2035{
2034 char *key= "foo";2036 const char *key= "foo";
2035 char *value;2037 char *value;
2036 size_t value_length= 512;2038 size_t value_length= 512;
2037 unsigned int x;2039 unsigned int x;
@@ -2074,7 +2076,7 @@
2074*/2076*/
2075static test_return user_supplied_bug11(memcached_st *memc)2077static test_return user_supplied_bug11(memcached_st *memc)
2076{2078{
2077 char *key= "foo";2079 const char *key= "foo";
2078 char *value;2080 char *value;
2079 size_t value_length= 512;2081 size_t value_length= 512;
2080 unsigned int x;2082 unsigned int x;
@@ -2199,7 +2201,7 @@
2199 size_t setter= 1;2201 size_t setter= 1;
2200 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);2202 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);
2201 memcached_return rc;2203 memcached_return rc;
2202 char *key= "foo";2204 const char *key= "foo";
2203 char *value;2205 char *value;
2204 size_t value_length= 18000;2206 size_t value_length= 18000;
2205 char *string;2207 char *string;
@@ -2243,7 +2245,7 @@
2243{2245{
2244 uint32_t x;2246 uint32_t x;
2245 memcached_return rc;2247 memcached_return rc;
2246 char *key= "mykey";2248 const char *key= "mykey";
2247 char *value;2249 char *value;
2248 size_t length;2250 size_t length;
2249 uint32_t flags;2251 uint32_t flags;
@@ -2280,7 +2282,7 @@
2280static test_return user_supplied_bug16(memcached_st *memc)2282static test_return user_supplied_bug16(memcached_st *memc)
2281{2283{
2282 memcached_return rc;2284 memcached_return rc;
2283 char *key= "mykey";2285 const char *key= "mykey";
2284 char *value;2286 char *value;
2285 size_t length;2287 size_t length;
2286 uint32_t flags;2288 uint32_t flags;
@@ -2306,8 +2308,8 @@
2306static test_return user_supplied_bug17(memcached_st *memc)2308static test_return user_supplied_bug17(memcached_st *memc)
2307{2309{
2308 memcached_return rc;2310 memcached_return rc;
2309 char *key= "豆瓣";2311 const char *key= "豆瓣";
2310 char *value="我们在炎热抑郁的夏天无法停止豆瓣";2312 const char *value="我们在炎热抑郁的夏天无法停止豆瓣";
2311 char *value2;2313 char *value2;
2312 size_t length;2314 size_t length;
2313 uint32_t flags;2315 uint32_t flags;
@@ -2358,9 +2360,9 @@
2358{2360{
2359 memcached_return status;2361 memcached_return status;
2360 memcached_result_st *result, result_obj;2362 memcached_result_st *result, result_obj;
2361 char *key = "abc";2363 const char *key = "abc";
2362 size_t key_len = strlen("abc");2364 size_t key_len = strlen("abc");
2363 char *value = "foobar";2365 const char *value = "foobar";
2364 size_t value_len = strlen(value);2366 size_t value_len = strlen(value);
23652367
2366 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, 1);2368 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, 1);
@@ -3139,7 +3141,9 @@
31393141
3140 /* Set to Zero, and then Set to something too large */3142 /* Set to Zero, and then Set to something too large */
3141 {3143 {
3142 char *long_key;3144 char long_key[255];
3145 memset(long_key, 0, 255);
3146
3143 rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL);3147 rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL);
3144 assert(rc == MEMCACHED_SUCCESS);3148 assert(rc == MEMCACHED_SUCCESS);
31453149
@@ -3149,13 +3153,13 @@
31493153
3150 /* Test a long key for failure */3154 /* Test a long key for failure */
3151 /* TODO, extend test to determine based on setting, what result should be */3155 /* TODO, extend test to determine based on setting, what result should be */
3152 long_key= "Thisismorethentheallottednumberofcharacters";3156 strcpy(long_key, "Thisismorethentheallottednumberofcharacters");
3153 rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);3157 rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);
3154 //assert(rc == MEMCACHED_BAD_KEY_PROVIDED);3158 //assert(rc == MEMCACHED_BAD_KEY_PROVIDED);
3155 assert(rc == MEMCACHED_SUCCESS);3159 assert(rc == MEMCACHED_SUCCESS);
31563160
3157 /* Now test a key with spaces (which will fail from long key, since bad key is not set) */3161 /* Now test a key with spaces (which will fail from long key, since bad key is not set) */
3158 long_key= "This is more then the allotted number of characters";3162 strcpy(long_key, "This is more then the allotted number of characters");
3159 rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);3163 rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);
3160 assert(rc == MEMCACHED_BAD_KEY_PROVIDED);3164 assert(rc == MEMCACHED_BAD_KEY_PROVIDED);
31613165
@@ -3163,7 +3167,7 @@
3163 rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY, 1);3167 rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY, 1);
3164 assert(rc == MEMCACHED_SUCCESS);3168 assert(rc == MEMCACHED_SUCCESS);
31653169
3166 long_key= "dog cat";3170 strcpy(long_key, "dog cat");
3167 rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);3171 rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);
3168 assert(rc == MEMCACHED_BAD_KEY_PROVIDED);3172 assert(rc == MEMCACHED_BAD_KEY_PROVIDED);
3169 }3173 }
@@ -3429,7 +3433,7 @@
3429 /* Try setting an illegal cas value (should not return an error to3433 /* Try setting an illegal cas value (should not return an error to
3430 * the caller (because we don't expect a return message from the server)3434 * the caller (because we don't expect a return message from the server)
3431 */3435 */
3432 char* keys[]= {"0"};3436 const char* keys[]= {"0"};
3433 size_t lengths[]= {1};3437 size_t lengths[]= {1};
3434 size_t length;3438 size_t length;
3435 uint32_t flags;3439 uint32_t flags;
@@ -3668,7 +3672,7 @@
3668 memcached_st *memc_clone= memcached_clone(NULL, memc);3672 memcached_st *memc_clone= memcached_clone(NULL, memc);
3669 memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 0);3673 memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 0);
36703674
3671 char *keys[]= { "bubba", "key1", "key2", "key3" };3675 const char *keys[]= { "bubba", "key1", "key2", "key3" };
3672 size_t len[]= { 5, 4, 4, 4 };3676 size_t len[]= { 5, 4, 4, 4 };
36733677
3674 for (int x=0; x< 4; ++x)3678 for (int x=0; x< 4; ++x)
@@ -3705,7 +3709,7 @@
37053709
3706 for (int x= 'a'; x <= 'z'; ++x)3710 for (int x= 'a'; x <= 'z'; ++x)
3707 {3711 {
3708 char key[2]= { [0]= (char)x };3712 const char key[2]= { [0]= (const char)x };
37093713
3710 rc= memcached_mget_by_key(new_clone, key, 1, keys, len, 4);3714 rc= memcached_mget_by_key(new_clone, key, 1, keys, len, 4);
3711 assert(rc == MEMCACHED_SUCCESS);3715 assert(rc == MEMCACHED_SUCCESS);
@@ -3737,7 +3741,7 @@
3737 MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS);3741 MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS);
3738 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, --repl);3742 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, --repl);
37393743
3740 char *keys[]= { "bubba", "key1", "key2", "key3" };3744 const char *keys[]= { "bubba", "key1", "key2", "key3" };
3741 size_t len[]= { 5, 4, 4, 4 };3745 size_t len[]= { 5, 4, 4, 4 };
37423746
3743 for (int x=0; x< 4; ++x)3747 for (int x=0; x< 4; ++x)
@@ -3764,7 +3768,7 @@
3764 {3768 {
3765 for (int x= 'a'; x <= 'z'; ++x)3769 for (int x= 'a'; x <= 'z'; ++x)
3766 {3770 {
3767 char key[2]= { [0]= (char)x };3771 const char key[2]= { [0]= (const char)x };
37683772
3769 rc= memcached_mget_by_key(memc_clone, key, 1, keys, len, 4);3773 rc= memcached_mget_by_key(memc_clone, key, 1, keys, len, 4);
3770 assert(rc == MEMCACHED_SUCCESS);3774 assert(rc == MEMCACHED_SUCCESS);
@@ -3907,8 +3911,8 @@
3907 for (x= 0; x < num_iters;x++)3911 for (x= 0; x < num_iters;x++)
3908 {3912 {
3909 memcached_return rc;3913 memcached_return rc;
3910 char *key= "foo";3914 const char *key= "foo";
3911 char *value= "when we sanitize";3915 const char *value= "when we sanitize";
3912 uint16_t *expected_ids= get_udp_request_ids(memc);3916 uint16_t *expected_ids= get_udp_request_ids(memc);
3913 unsigned int server_key= memcached_generate_hash(memc,key,strlen(key));3917 unsigned int server_key= memcached_generate_hash(memc,key,strlen(key));
3914 size_t init_offset= memc->hosts[server_key].write_buffer_offset;3918 size_t init_offset= memc->hosts[server_key].write_buffer_offset;
@@ -3947,7 +3951,7 @@
3947static test_return udp_set_too_big_test(memcached_st *memc)3951static test_return udp_set_too_big_test(memcached_st *memc)
3948{3952{
3949 memcached_return rc;3953 memcached_return rc;
3950 char *key= "bar";3954 const char *key= "bar";
3951 char value[MAX_UDP_DATAGRAM_LENGTH];3955 char value[MAX_UDP_DATAGRAM_LENGTH];
3952 uint16_t *expected_ids= get_udp_request_ids(memc);3956 uint16_t *expected_ids= get_udp_request_ids(memc);
3953 rc= memcached_set(memc, key, strlen(key),3957 rc= memcached_set(memc, key, strlen(key),
@@ -3964,7 +3968,7 @@
3964 for (x= 0; x < num_iters;x++)3968 for (x= 0; x < num_iters;x++)
3965 {3969 {
3966 memcached_return rc;3970 memcached_return rc;
3967 char *key= "foo";3971 const char *key= "foo";
3968 uint16_t *expected_ids=get_udp_request_ids(memc);3972 uint16_t *expected_ids=get_udp_request_ids(memc);
3969 unsigned int server_key= memcached_generate_hash(memc, key, strlen(key));3973 unsigned int server_key= memcached_generate_hash(memc, key, strlen(key));
3970 size_t init_offset= memc->hosts[server_key].write_buffer_offset;3974 size_t init_offset= memc->hosts[server_key].write_buffer_offset;
@@ -4026,8 +4030,8 @@
4026static test_return udp_incr_test(memcached_st *memc)4030static test_return udp_incr_test(memcached_st *memc)
4027{4031{
4028 memcached_return rc;4032 memcached_return rc;
4029 char *key= "incr";4033 const char *key= "incr";
4030 char *value= "1";4034 const char *value= "1";
4031 rc= memcached_set(memc, key, strlen(key), 4035 rc= memcached_set(memc, key, strlen(key),
4032 value, strlen(value),4036 value, strlen(value),
4033 (time_t)0, (uint32_t)0);4037 (time_t)0, (uint32_t)0);
@@ -4045,8 +4049,8 @@
4045static test_return udp_decr_test(memcached_st *memc)4049static test_return udp_decr_test(memcached_st *memc)
4046{4050{
4047 memcached_return rc;4051 memcached_return rc;
4048 char *key= "decr";4052 const char *key= "decr";
4049 char *value= "1";4053 const char *value= "1";
4050 rc= memcached_set(memc, key, strlen(key), 4054 rc= memcached_set(memc, key, strlen(key),
4051 value, strlen(value),4055 value, strlen(value),
4052 (time_t)0, (uint32_t)0);4056 (time_t)0, (uint32_t)0);
@@ -4086,7 +4090,7 @@
4086static test_return udp_get_test(memcached_st *memc)4090static test_return udp_get_test(memcached_st *memc)
4087{4091{
4088 memcached_return rc;4092 memcached_return rc;
4089 char *key= "foo";4093 const char *key= "foo";
4090 size_t vlen;4094 size_t vlen;
4091 uint16_t *expected_ids = get_udp_request_ids(memc);4095 uint16_t *expected_ids = get_udp_request_ids(memc);
4092 char *val= memcached_get(memc, key, strlen(key), &vlen, (uint32_t)0, &rc);4096 char *val= memcached_get(memc, key, strlen(key), &vlen, (uint32_t)0, &rc);
@@ -4130,7 +4134,7 @@
4130 return TEST_SUCCESS;4134 return TEST_SUCCESS;
4131}4135}
41324136
4133static char *list[]=4137static const char *list[]=
4134{4138{
4135 "apple",4139 "apple",
4136 "beat",4140 "beat",
@@ -4163,7 +4167,7 @@
4163static test_return md5_run (memcached_st *memc __attribute__((unused)))4167static test_return md5_run (memcached_st *memc __attribute__((unused)))
4164{4168{
4165 uint32_t x;4169 uint32_t x;
4166 char **ptr;4170 const char **ptr;
4167 uint32_t values[]= { 3195025439U, 2556848621U, 3724893440U, 3332385401U,4171 uint32_t values[]= { 3195025439U, 2556848621U, 3724893440U, 3332385401U,
4168 245758794U, 2550894432U, 121710495U, 3053817768U,4172 245758794U, 2550894432U, 121710495U, 3053817768U,
4169 1250994555U, 1862072655U, 2631955953U, 2951528551U, 4173 1250994555U, 1862072655U, 2631955953U, 2951528551U,
@@ -4187,7 +4191,7 @@
4187static test_return crc_run (memcached_st *memc __attribute__((unused)))4191static test_return crc_run (memcached_st *memc __attribute__((unused)))
4188{4192{
4189 uint32_t x;4193 uint32_t x;
4190 char **ptr;4194 const char **ptr;
4191 uint32_t values[]= { 10542U, 22009U, 14526U, 19510U, 19432U, 10199U, 20634U,4195 uint32_t values[]= { 10542U, 22009U, 14526U, 19510U, 19432U, 10199U, 20634U,
4192 9369U, 11511U, 10362U, 7893U, 31289U, 11313U, 9354U,4196 9369U, 11511U, 10362U, 7893U, 31289U, 11313U, 9354U,
4193 7621U, 30628U, 15218U, 25967U, 2695U, 9380U, 4197 7621U, 30628U, 15218U, 25967U, 2695U, 9380U,
@@ -4207,7 +4211,7 @@
4207static test_return fnv1_64_run (memcached_st *memc __attribute__((unused)))4211static test_return fnv1_64_run (memcached_st *memc __attribute__((unused)))
4208{4212{
4209 uint32_t x;4213 uint32_t x;
4210 char **ptr;4214 const char **ptr;
4211 uint32_t values[]= { 473199127U, 4148981457U, 3971873300U, 3257986707U, 4215 uint32_t values[]= { 473199127U, 4148981457U, 3971873300U, 3257986707U,
4212 1722477987U, 2991193800U, 4147007314U, 3633179701U, 4216 1722477987U, 2991193800U, 4147007314U, 3633179701U,
4213 1805162104U, 3503289120U, 3395702895U, 3325073042U,4217 1805162104U, 3503289120U, 3395702895U, 3325073042U,
@@ -4230,7 +4234,7 @@
4230static test_return fnv1a_64_run (memcached_st *memc __attribute__((unused)))4234static test_return fnv1a_64_run (memcached_st *memc __attribute__((unused)))
4231{4235{
4232 uint32_t x;4236 uint32_t x;
4233 char **ptr;4237 const char **ptr;
4234 uint32_t values[]= { 1488911807U, 2500855813U, 1510099634U, 1390325195U, 4238 uint32_t values[]= { 1488911807U, 2500855813U, 1510099634U, 1390325195U,
4235 3647689787U, 3241528582U, 1669328060U, 2604311949U, 4239 3647689787U, 3241528582U, 1669328060U, 2604311949U,
4236 734810122U, 1516407546U, 560948863U, 1767346780U,4240 734810122U, 1516407546U, 560948863U, 1767346780U,
@@ -4253,7 +4257,7 @@
4253static test_return fnv1_32_run (memcached_st *memc __attribute__((unused)))4257static test_return fnv1_32_run (memcached_st *memc __attribute__((unused)))
4254{4258{
4255 uint32_t x;4259 uint32_t x;
4256 char **ptr;4260 const char **ptr;
4257 uint32_t values[]= { 67176023U, 1190179409U, 2043204404U, 3221866419U, 4261 uint32_t values[]= { 67176023U, 1190179409U, 2043204404U, 3221866419U,
4258 2567703427U, 3787535528U, 4147287986U, 3500475733U,4262 2567703427U, 3787535528U, 4147287986U, 3500475733U,
4259 344481048U, 3865235296U, 2181839183U, 119581266U, 4263 344481048U, 3865235296U, 2181839183U, 119581266U,
@@ -4277,7 +4281,7 @@
4277static test_return fnv1a_32_run (memcached_st *memc __attribute__((unused)))4281static test_return fnv1a_32_run (memcached_st *memc __attribute__((unused)))
4278{4282{
4279 uint32_t x;4283 uint32_t x;
4280 char **ptr;4284 const char **ptr;
4281 uint32_t values[]= { 280767167U, 2421315013U, 3072375666U, 855001899U,4285 uint32_t values[]= { 280767167U, 2421315013U, 3072375666U, 855001899U,
4282 459261019U, 3521085446U, 18738364U, 1625305005U,4286 459261019U, 3521085446U, 18738364U, 1625305005U,
4283 2162232970U, 777243802U, 3323728671U, 132336572U,4287 2162232970U, 777243802U, 3323728671U, 132336572U,
@@ -4300,7 +4304,7 @@
4300static test_return hsieh_run (memcached_st *memc __attribute__((unused)))4304static test_return hsieh_run (memcached_st *memc __attribute__((unused)))
4301{4305{
4302 uint32_t x;4306 uint32_t x;
4303 char **ptr;4307 const char **ptr;
4304#ifdef HAVE_HSIEH_HASH4308#ifdef HAVE_HSIEH_HASH
4305 uint32_t values[]= { 3738850110, 3636226060, 3821074029, 3489929160, 3485772682, 80540287,4309 uint32_t values[]= { 3738850110, 3636226060, 3821074029, 3489929160, 3485772682, 80540287,
4306 1805464076, 1895033657, 409795758, 979934958, 3634096985, 1284445480,4310 1805464076, 1895033657, 409795758, 979934958, 3634096985, 1284445480,
@@ -4325,7 +4329,7 @@
4325static test_return murmur_run (memcached_st *memc __attribute__((unused)))4329static test_return murmur_run (memcached_st *memc __attribute__((unused)))
4326{4330{
4327 uint32_t x;4331 uint32_t x;
4328 char **ptr;4332 const char **ptr;
4329 uint32_t values[]= { 473199127U, 4148981457U, 3971873300U, 3257986707U,4333 uint32_t values[]= { 473199127U, 4148981457U, 3971873300U, 3257986707U,
4330 1722477987U, 2991193800U, 4147007314U, 3633179701U,4334 1722477987U, 2991193800U, 4147007314U, 3633179701U,
4331 1805162104U, 3503289120U, 3395702895U, 3325073042U,4335 1805162104U, 3503289120U, 3395702895U, 3325073042U,
@@ -4348,7 +4352,7 @@
4348static test_return jenkins_run (memcached_st *memc __attribute__((unused)))4352static test_return jenkins_run (memcached_st *memc __attribute__((unused)))
4349{4353{
4350 uint32_t x;4354 uint32_t x;
4351 char **ptr;4355 const char **ptr;
4352 uint32_t values[]= { 1442444624U, 4253821186U, 1885058256U, 2120131735U,4356 uint32_t values[]= { 1442444624U, 4253821186U, 1885058256U, 2120131735U,
4353 3261968576U, 3515188778U, 4232909173U, 4288625128U,4357 3261968576U, 3515188778U, 4232909173U, 4288625128U,
4354 1812047395U, 3689182164U, 2502979932U, 1214050606U,4358 1812047395U, 3689182164U, 2502979932U, 1214050606U,
43554359
=== modified file 'tests/ketama_test_cases.h'
--- tests/ketama_test_cases.h 2008-11-03 22:20:00 +0000
+++ tests/ketama_test_cases.h 2009-07-08 13:38:34 +0000
@@ -1,8 +1,8 @@
1typedef struct {1typedef struct {
2 char *key;2 const char *key;
3 unsigned long hash1;3 unsigned long hash1;
4 unsigned long hash2;4 unsigned long hash2;
5 char *server;5 const char *server;
6} TestCase;6} TestCase;
77
8static TestCase test_cases[99] = {8static TestCase test_cases[99] = {
99
=== modified file 'tests/udp.c'
--- tests/udp.c 2008-08-19 18:07:14 +0000
+++ tests/udp.c 2009-07-08 13:38:34 +0000
@@ -22,8 +22,8 @@
22test_return set_test(memcached_st *memc)22test_return set_test(memcached_st *memc)
23{23{
24 memcached_return rc;24 memcached_return rc;
25 char *key= "foo";25 const char *key= "foo";
26 char *value= "when we sanitize";26 const char *value= "when we sanitize";
2727
28 rc= memcached_set(memc, key, strlen(key), 28 rc= memcached_set(memc, key, strlen(key),
29 value, strlen(value),29 value, strlen(value),

Subscribers

People subscribed via source and target branches

to all changes: