diff -burp memcached-1.1.12.orig/assoc.c memcached-1.1.12/assoc.c --- memcached-1.1.12.orig/assoc.c 2005-04-05 04:14:55.000000000 +0400 +++ memcached-1.1.12/assoc.c 2005-11-23 01:26:40.592871328 +0300 @@ -31,7 +31,7 @@ #include "memcached.h" -typedef unsigned long int ub4; /* unsigned 4-byte quantities */ +typedef unsigned int ub4; /* unsigned 4-byte quantities */ typedef unsigned char ub1; /* unsigned 1-byte quantities */ /* hard-code one million buckets, for now (2**20 == 4MB hash) */ diff -burp memcached-1.1.12.orig/memcached.c memcached-1.1.12/memcached.c --- memcached-1.1.12.orig/memcached.c 2005-04-05 04:10:26.000000000 +0400 +++ memcached-1.1.12/memcached.c 2005-11-23 01:09:20.620971088 +0300 @@ -350,7 +350,7 @@ void process_stat(conn *c, char *command pos += sprintf(pos, "STAT get_misses %u\r\n", stats.get_misses); pos += sprintf(pos, "STAT bytes_read %llu\r\n", stats.bytes_read); pos += sprintf(pos, "STAT bytes_written %llu\r\n", stats.bytes_written); - pos += sprintf(pos, "STAT limit_maxbytes %u\r\n", settings.maxbytes); + pos += sprintf(pos, "STAT limit_maxbytes %lu\r\n", settings.maxbytes); pos += sprintf(pos, "END"); out_string(c, temp); return; @@ -1360,7 +1360,7 @@ int main (int argc, char **argv) { settings.port = atoi(optarg); break; case 'm': - settings.maxbytes = atoi(optarg)*1024*1024; + settings.maxbytes = atol(optarg)*1024*1024; break; case 'M': settings.evict_to_free = 0; diff -burp memcached-1.1.12.orig/memcached.h memcached-1.1.12/memcached.h --- memcached-1.1.12.orig/memcached.h 2005-04-05 04:14:55.000000000 +0400 +++ memcached-1.1.12/memcached.h 2005-11-23 01:09:48.854678912 +0300 @@ -24,7 +24,7 @@ struct stats { }; struct settings { - unsigned int maxbytes; + unsigned long maxbytes; int maxconns; int port; struct in_addr interface; @@ -148,7 +148,7 @@ time_t realtime(time_t exptime); /* slabs memory allocation */ /* Init the subsystem. The argument is the limit on no. of bytes to allocate, 0 if no limit */ -void slabs_init(unsigned int limit); +void slabs_init(unsigned long limit); /* Given object size, return id to use when allocating/freeing memory for object */ /* 0 means error: can't store such a large object */ diff -burp memcached-1.1.12.orig/slabs.c memcached-1.1.12/slabs.c --- memcached-1.1.12.orig/slabs.c 2004-04-27 01:26:48.000000000 +0400 +++ memcached-1.1.12/slabs.c 2005-11-23 01:11:37.352184784 +0300 @@ -49,8 +49,8 @@ typedef struct { } slabclass_t; static slabclass_t slabclass[POWER_LARGEST+1]; -static unsigned int mem_limit = 0; -static unsigned int mem_malloced = 0; +static unsigned long mem_limit = 0; +static unsigned long mem_malloced = 0; unsigned int slabs_clsid(unsigned int size) { int res = 1; @@ -67,7 +67,7 @@ unsigned int slabs_clsid(unsigned int si return res; } -void slabs_init(unsigned int limit) { +void slabs_init(unsigned long limit) { int i; int size=1; @@ -216,7 +216,7 @@ char* slabs_stats(int *buflen) { total++; } } - bufcurr += sprintf(bufcurr, "STAT active_slabs %d\r\nSTAT total_malloced %u\r\n", total, mem_malloced); + bufcurr += sprintf(bufcurr, "STAT active_slabs %d\r\nSTAT total_malloced %lu\r\n", total, mem_malloced); bufcurr += sprintf(bufcurr, "END\r\n"); *buflen = bufcurr - buf; return buf;