Commit b597abe6 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(DEFAULT_PREFIX): Expect that macro to be set when the file is compiled.

parent fb253938
/*
* $Id: server-config.c,v 0.26 1994/02/27 17:05:25 ceder Exp $
* $Id: server-config.c,v 0.27 1994/03/05 17:29:36 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -27,10 +27,11 @@
*
* This is in a .c file to make it possible to change a value without having
* to recompile the entire server (or, in fact, anything!)
*
*
* Compile with -DDEFAULT_PREFIX='"/usr/lyskom"' or something similar.
*/
static char *rcsid = "$Id: server-config.c,v 0.26 1994/02/27 17:05:25 ceder Exp $";
static char *rcsid = "$Id: server-config.c,v 0.27 1994/03/05 17:29:36 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -52,15 +53,14 @@ USE(rcsid);
#include "manipulate.h"
#include "lyskomd.h"
#ifndef DEFAULT_PREFIX
#error DEFAULT_PREFIX should have been defined by the Makefile.
#endif
static Success log_param(const char *val, const struct parameter *par);
static Success jubel(const char *val, const struct parameter *par);
static Success ident_param(const char *val, const struct parameter *par);
/* Default value for DEFAULT_DBASE_DIR. Since this is used in two
places in this file, use a define. */
/* FIXME: This should be set by autoconf. */
#define PREFIX "/usr/lyskom"
/* See lyskomd.8 for more info about the parameters.
Please remember to update lyskomd.8 if you add more parameters!
Try to keep this list and the list in lyskomd.8 in the same order. */
......@@ -69,7 +69,7 @@ static const struct parameter parameters[] = {
{"Locale",
assign_string, 0, 1, NULL, &param.use_locale},
{"Prefix",
assign_string, 0, 1, PREFIX, &param.dbase_dir},
assign_string, 0, 1, DEFAULT_PREFIX, &param.dbase_dir},
{"Send async",
assign_bool, 0, 1, "1", &param.send_async_messages},
{"Client port",
......@@ -200,7 +200,7 @@ static const struct parameter parameters[] = {
* DEFAULT_DBASE_DIR is overriden, of course).
*/
const char * DEFAULT_DBASE_DIR = PREFIX;
const char * DEFAULT_DBASE_DIR = DEFAULT_PREFIX;
const char *CONFIG_FILE = "etc/config";
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment