1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00

Fix build on 8.2/i386.

Submitted by:	paulbeard at gmail.com, dougb@
This commit is contained in:
Vanilla I. Shu 2011-08-05 01:34:25 +00:00
parent 2342faedbe
commit 7fe53e85cc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=278932
4 changed files with 115 additions and 0 deletions

View File

@ -0,0 +1,38 @@
--- tests/mem_functions.cc.orig 2011-08-05 09:20:08.000000000 +0800
+++ tests/mem_functions.cc 2011-08-05 09:29:52.000000000 +0800
@@ -3629,7 +3629,7 @@ static test_return_t pre_nonblock_binary
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
test_compare(MEMCACHED_SUCCESS,
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1));
- test_compare(1UL, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+ test_compare(1UL, (unsigned long)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
}
else
{
@@ -4401,7 +4401,7 @@ static test_return_t connection_pool_tes
uint64_t number_value;
test_compare(MEMCACHED_SUCCESS,
memcached_increment(mmc[x], key, keylen, 1, &number_value));
- test_compare(number_value, (x+1));
+ test_compare(number_value, (uint64_t)(x+1));
}
// Release them..
@@ -4951,7 +4951,7 @@ static test_return_t ketama_compatibilit
test_compare(MEMCACHED_SUCCESS,
memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1));
- test_compare(1UL, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED));
+ test_compare(1UL, (unsigned long)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED));
test_compare(MEMCACHED_SUCCESS, memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA));
test_compare(MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA, memcached_behavior_get_distribution(memc));
@@ -5882,7 +5882,7 @@ static test_return_t regression_bug_6554
test_compare(MEMCACHED_SUCCESS, rc);
test_true(value);
- test_compare(100UL, value_length);
+ test_compare(100UL, (unsigned long)value_length);
free(value);
}

View File

@ -0,0 +1,43 @@
--- tests/namespace.cc.orig 2011-08-05 09:20:13.000000000 +0800
+++ tests/namespace.cc 2011-08-05 09:21:03.000000000 +0800
@@ -58,13 +58,13 @@ test_return_t memcached_increment_namesp
memcached_increment(memc,
test_literal_param("number"),
1, &new_number));
- test_compare(1UL, new_number);
+ test_compare(1UL, (unsigned long)new_number);
test_compare(MEMCACHED_SUCCESS,
memcached_increment(memc,
test_literal_param("number"),
1, &new_number));
- test_compare(2UL, new_number);
+ test_compare(2UL, (unsigned long)new_number);
memcached_st *clone= memcached_clone(NULL, memc);
@@ -86,7 +86,7 @@ test_return_t memcached_increment_namesp
test_literal_param("number"),
0, 0, 0);
test_true(value);
- test_compare(2UL, strlen(value));
+ test_compare(2UL, (unsigned long)strlen(value));
test_strcmp("10", value);
free(value);
@@ -94,13 +94,13 @@ test_return_t memcached_increment_namesp
memcached_increment(clone,
test_literal_param("number"),
1, &new_number));
- test_compare(11UL, new_number);
+ test_compare(11UL, (unsigned long)new_number);
test_compare(MEMCACHED_SUCCESS,
memcached_increment(memc,
test_literal_param("number"),
1, &new_number));
- test_compare(3UL, new_number);
+ test_compare(3UL, (unsigned long)new_number);
memcached_free(clone);

View File

@ -0,0 +1,19 @@
--- tests/plus.cpp.orig 2011-08-05 09:23:49.000000000 +0800
+++ tests/plus.cpp 2011-08-05 09:25:22.000000000 +0800
@@ -128,13 +128,13 @@ test_return_t increment_test(memcached_s
test_compare(int_inc_value, int_ret_value);
test_true(mcach.increment(key, 1, &int_ret_value));
- test_compare(2UL, int_ret_value);
+ test_compare(2UL, (unsigned long)int_ret_value);
test_true(mcach.increment(key, 1, &int_ret_value));
- test_compare(3UL, int_ret_value);
+ test_compare(3UL, (unsigned long)int_ret_value);
test_true(mcach.increment(key, 5, &int_ret_value));
- test_compare(8UL, int_ret_value);
+ test_compare(8UL, (unsigned long)int_ret_value);
return TEST_SUCCESS;
}

View File

@ -0,0 +1,15 @@
--- tests/replication.cc.orig 2011-08-05 09:22:41.000000000 +0800
+++ tests/replication.cc 2011-08-05 09:23:16.000000000 +0800
@@ -249,10 +249,10 @@ test_return_t replication_delete_test(me
// Make one copy
test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc_replicated, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 1UL));
- test_compare(1UL, memcached_behavior_get(memc_replicated, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS));
+ test_compare(1UL, (unsigned long)memcached_behavior_get(memc_replicated, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS));
test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc_not_replicate, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 0UL));
- test_compare(0UL, memcached_behavior_get(memc_not_replicate, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS));
+ test_compare(0UL, (unsigned long)memcached_behavior_get(memc_not_replicate, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS));
for (size_t x= 0; x < test_array_length(keys); ++x)
{