cmdline: renamed options.stderr to options.log_stderr

On FreeBSD, "stderr" is a macro, and using this name for a struct
member breaks the build.

[mk: renamed _stderr to log_stderr]
This commit is contained in:
Eugeny N Dzhurinsky 2009-07-22 13:40:19 +02:00 committed by Max Kellermann
parent c9d43b4d71
commit bdb1965b50
3 changed files with 6 additions and 6 deletions

View File

@ -96,9 +96,9 @@ void parse_cmdline(int argc, char **argv, struct options *options)
"don't create database, even if it doesn't exist", NULL }, "don't create database, even if it doesn't exist", NULL },
{ "no-daemon", 0, 0, G_OPTION_ARG_NONE, &option_no_daemon, { "no-daemon", 0, 0, G_OPTION_ARG_NONE, &option_no_daemon,
"don't detach from console", NULL }, "don't detach from console", NULL },
{ "stdout", 0, 0, G_OPTION_ARG_NONE, &options->stderr, { "stdout", 0, 0, G_OPTION_ARG_NONE, &options->log_stderr,
NULL, NULL }, NULL, NULL },
{ "stderr", 0, 0, G_OPTION_ARG_NONE, &options->stderr, { "stderr", 0, 0, G_OPTION_ARG_NONE, &options->log_stderr,
"print messages to stderr", NULL }, "print messages to stderr", NULL },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &options->verbose, { "verbose", 'v', 0, G_OPTION_ARG_NONE, &options->verbose,
"verbose logging", NULL }, "verbose logging", NULL },
@ -109,7 +109,7 @@ void parse_cmdline(int argc, char **argv, struct options *options)
options->kill = false; options->kill = false;
options->daemon = true; options->daemon = true;
options->stderr = false; options->log_stderr = false;
options->verbose = false; options->verbose = false;
options->create_db = 0; options->create_db = 0;

View File

@ -25,7 +25,7 @@
struct options { struct options {
gboolean kill; gboolean kill;
gboolean daemon; gboolean daemon;
gboolean stderr; gboolean log_stderr;
gboolean verbose; gboolean verbose;
int create_db; int create_db;
}; };

View File

@ -307,7 +307,7 @@ int main(int argc, char *argv[])
stats_global_init(); stats_global_init();
tag_lib_init(); tag_lib_init();
log_init(options.verbose, options.stderr); log_init(options.verbose, options.log_stderr);
listen_global_init(); listen_global_init();
@ -347,7 +347,7 @@ int main(int argc, char *argv[])
daemonize(options.daemon); daemonize(options.daemon);
setup_log_output(options.stderr); setup_log_output(options.log_stderr);
initSigHandlers(); initSigHandlers();