From: Monty Taylor Date: Wed, 2 Dec 2009 02:31:27 +0000 (-0600) Subject: Made the new memslap code build. Moved config.h include to the beginning of each... X-Git-Tag: 0.37~83^2~8 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=e926cd518e3605dd3fa050734061a5fabf5460bd;p=m6w6%2Flibmemcached Made the new memslap code build. Moved config.h include to the beginning of each .c file (where it should be). Renamed ms_settings_t to ms_settings_st. --- diff --git a/clients/Makefile.am b/clients/Makefile.am index e5a1f0c0..26b08e64 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -33,7 +33,14 @@ memflush_LDADD = $(LDADDS) memerror_SOURCES = memerror.c memerror_LDADD = $(LDADDS) -memslap_SOURCES = memslap.c +memslap_SOURCES = \ + memslap.c \ + ms_conn.c \ + ms_setting.c \ + ms_sigsegv.c \ + ms_stats.c \ + ms_task.c \ + ms_thread.c memslap_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) memslap_LDADD = $(PTHREAD_LIBS) libgenexec.la $(LDADDS) diff --git a/clients/ms_conn.c b/clients/ms_conn.c index f4c7347d..ad12a113 100644 --- a/clients/ms_conn.c +++ b/clients/ms_conn.c @@ -8,6 +8,9 @@ * http://www.schoonerinfotech.com/ * */ + +#include "config.h" + #include #include #include diff --git a/clients/ms_memslap.h b/clients/ms_memslap.h index a2f6254d..94b53a78 100644 --- a/clients/ms_memslap.h +++ b/clients/ms_memslap.h @@ -21,7 +21,6 @@ #include #include #include -#include "../config.h" #include "ms_stats.h" diff --git a/clients/ms_setting.c b/clients/ms_setting.c index 8bcb4db5..51f89714 100644 --- a/clients/ms_setting.c +++ b/clients/ms_setting.c @@ -8,6 +8,9 @@ * http://www.schoonerinfotech.com/ * */ + +#include "config.h" + #include #include "ms_setting.h" #include "ms_conn.h" @@ -32,7 +35,7 @@ const char ALPHANUMBERICS[]= "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-"; -ms_setting_t ms_setting; /* store the settings specified by user */ +ms_setting_st ms_setting; /* store the settings specified by user */ /* read setting from configuration file */ @@ -818,7 +821,7 @@ static void ms_setting_slapmode_init_pre() */ void ms_setting_init_pre() { - memset(&ms_setting, 0, sizeof(ms_setting_t)); + memset(&ms_setting, 0, sizeof(ms_setting)); /* common initialize */ ms_setting.ncpu= ms_get_cpu_count(); diff --git a/clients/ms_setting.h b/clients/ms_setting.h index d08998c6..3cccc6ba 100644 --- a/clients/ms_setting.h +++ b/clients/ms_setting.h @@ -156,9 +156,9 @@ typedef struct setting bool binary_prot; /* whether it use binary protocol */ int expected_tps; /* expected throughput */ int rep_write_srv; /* which servers are used to do replication writing */ -} ms_setting_t; +} ms_setting_st; -extern ms_setting_t ms_setting; +extern ms_setting_st ms_setting; /* previous part of initialization of setting structure */ void ms_setting_init_pre(void); diff --git a/clients/ms_sigsegv.c b/clients/ms_sigsegv.c index 69f038f9..a91acc96 100644 --- a/clients/ms_sigsegv.c +++ b/clients/ms_sigsegv.c @@ -8,6 +8,9 @@ * http://www.schoonerinfotech.com/ * */ + +#include "config.h" + #include #include #include diff --git a/clients/ms_stats.c b/clients/ms_stats.c index 960467fd..7fad7fb8 100644 --- a/clients/ms_stats.c +++ b/clients/ms_stats.c @@ -8,6 +8,9 @@ * http://www.schoonerinfotech.com/ * */ + +#include "config.h" + #include "ms_stats.h" #define array_size(x) (sizeof(x) / sizeof((x)[0])) diff --git a/clients/ms_task.c b/clients/ms_task.c index 21dabe01..aadc419e 100644 --- a/clients/ms_task.c +++ b/clients/ms_task.c @@ -8,6 +8,9 @@ * http://www.schoonerinfotech.com/ * */ + +#include "config.h" + #include "ms_thread.h" #include "ms_setting.h" diff --git a/clients/ms_thread.c b/clients/ms_thread.c index f8dc1b01..9af3a10b 100644 --- a/clients/ms_thread.c +++ b/clients/ms_thread.c @@ -8,6 +8,9 @@ * http://www.schoonerinfotech.com/ * */ + +#include "config.h" + #include "ms_thread.h" #include "ms_setting.h"