From 4a8ed0428e174544015e23215103bc2383cb73c3 Mon Sep 17 00:00:00 2001 From: Dave West Date: Thu, 5 Nov 2009 15:11:18 +0000 Subject: [PATCH] Fix the build problems revolving around CitContext and context.h Must have missed a make clean before I comitted. Header file ordering and dependancies are a nightmare in modules. Sooner I get that cleaned up to only need ctdl_module.h the better. --- citadel/include/ctdl_module.h | 2 ++ citadel/modules/chat/serv_chat.c | 4 ++-- citadel/modules/chat/serv_chat.h | 4 +++- citadel/modules/migrate/serv_migrate.c | 4 ++-- citadel/modules/newuser/serv_newuser.c | 6 +++--- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index 71fa15534..3300596fc 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -45,6 +45,8 @@ #include "msgbase.h" #include "threads.h" #include "citadel_dirs.h" +#include "context.h" + /* * define macros for module init stuff */ diff --git a/citadel/modules/chat/serv_chat.c b/citadel/modules/chat/serv_chat.c index 6b479b06a..66dcf5577 100644 --- a/citadel/modules/chat/serv_chat.c +++ b/citadel/modules/chat/serv_chat.c @@ -230,9 +230,9 @@ void allwrite(char *cmdbuf, int flag, char *username) } -t_context *find_context(char **unstr) +CitContext *find_context(char **unstr) { - t_context *t_cc, *found_cc = NULL; + CitContext *t_cc, *found_cc = NULL; char *name, *tptr; if ((!*unstr) || (!unstr)) diff --git a/citadel/modules/chat/serv_chat.h b/citadel/modules/chat/serv_chat.h index 9ea923547..6ceba2682 100644 --- a/citadel/modules/chat/serv_chat.h +++ b/citadel/modules/chat/serv_chat.h @@ -1,7 +1,9 @@ /* $Id$ */ +#include "ctdl_module.h" + void ChatUnloadingTest(void); void allwrite (char *cmdbuf, int flag, char *username); -t_context *find_context (char **unstr); +CitContext *find_context (char **unstr); void do_chat_listing (int allflag); void cmd_chat (char *argbuf); void cmd_pexp (char *argbuf); /* arg unused */ diff --git a/citadel/modules/migrate/serv_migrate.c b/citadel/modules/migrate/serv_migrate.c index cf3395d50..0e85bbc42 100644 --- a/citadel/modules/migrate/serv_migrate.c +++ b/citadel/modules/migrate/serv_migrate.c @@ -339,7 +339,7 @@ void migr_export_messages(void) { char buf[SIZ]; long msgnum; int count = 0; - t_context *Ctx; + CitContext *Ctx; Ctx = CC; migr_global_message_list = fopen(migr_tempfilename1, "r"); @@ -368,7 +368,7 @@ void migr_export_messages(void) { void migr_do_export(void) { struct config *buf; buf = &config; - t_context *Ctx; + CitContext *Ctx; Ctx = CC; cprintf("%d Exporting all Citadel databases.\n", LISTING_FOLLOWS); diff --git a/citadel/modules/newuser/serv_newuser.c b/citadel/modules/newuser/serv_newuser.c index 08cf48d7e..06a029a85 100644 --- a/citadel/modules/newuser/serv_newuser.c +++ b/citadel/modules/newuser/serv_newuser.c @@ -51,6 +51,9 @@ #include #include #include + +#include "ctdl_module.h" + #include "citadel.h" #include "server.h" #include "citserver.h" @@ -62,11 +65,8 @@ #include "msgbase.h" -#include "ctdl_module.h" - -extern struct CitContext *ContextList; /* -- 2.30.2