From: Art Cancro Date: Thu, 11 Feb 2010 23:22:57 +0000 (+0000) Subject: * Eliminate HAVE_FLOCK from the build system. Instead, test for the presence of... X-Git-Tag: v7.86~438 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=e033e54c987c0fdfd58ef6ad0b2e0c1ac3a2cf4b * Eliminate HAVE_FLOCK from the build system. Instead, test for the presence of LOCK_EX + LOCK_NB right where we need them. --- diff --git a/citadel/control.c b/citadel/control.c index 8b57b698c..e9725e3fa 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -77,12 +77,7 @@ long control_highest_user = 0; */ void lock_control(void) { -#ifdef HAVE_FLOCK -/* - * TODO: solaris manpages describe this function, but the headers - * don't show it! - */ - +#if defined(LOCK_EX) && defined(LOCK_NB) if (flock(fileno(control_fp), (LOCK_EX | LOCK_NB))) { CtdlLogPrintf(CTDL_EMERG, "citserver: unable to lock %s.\n", file_citadel_control); CtdlLogPrintf(CTDL_EMERG, "Is another citserver already running?\n"); @@ -720,7 +715,7 @@ void cmd_conf(char *argbuf) CTDL_MODULE_INIT(control) { if (!threading) { - CtdlRegisterProtoHook(cmd_conf, "CONF", "Autoconverted. TODO: document me."); + CtdlRegisterProtoHook(cmd_conf, "CONF", "get/set system configuration"); } /* return our Subversion id for the Log */ return "$Id$";