From b8dd87a35b053e8bbcf167f5d2f3e9a198697f79 Mon Sep 17 00:00:00 2001 From: marschap Date: Tue, 19 Sep 2006 08:01:19 +0000 Subject: [PATCH] #include "getopt.h" instead of declaring external variabls, make sure SYSCONFDIR is defined; use correct type to hold getopt() return values --- clients/lcdvc/lcdvc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/clients/lcdvc/lcdvc.c b/clients/lcdvc/lcdvc.c index 7af554b..0cba89e 100644 --- a/clients/lcdvc/lcdvc.c +++ b/clients/lcdvc/lcdvc.c @@ -16,8 +16,8 @@ #include #include #include -extern char *optarg; -extern int optind, optopt, opterr; + +#include "getopt.h" #include "shared/str.h" #include "shared/report.h" @@ -27,8 +27,13 @@ extern int optind, optopt, opterr; #include "vc_link.h" #include "lcdvc.h" +#if !defined(SYSCONFDIR) +# define SYSCONFDIR "/etc" +#endif + #define DEFAULT_CONFIGFILE SYSCONFDIR "/lcdvc.conf" + char * help_text = "lcdvc - LCDproc virtual console displayer.\n" "Copyright (c) 2002, Joris Robijn\n" @@ -94,7 +99,7 @@ int main( int argc, char ** argv ) int process_command_line( int argc, char ** argv ) { - char c; + int c; int error = 0; /* No error output from getopt */