From c79d76b9c317b6469ad48eb296d807e6da261190 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 4 Jul 2007 18:23:24 +0000 Subject: Make char signed to fix getopt usage on ARM and PowerPC, thanks to TBP and Reinhard Tartler (refs #3, see http://lists.warhead.org.uk/pipermail/boxbackup/2007-July/003614.html) --- lib/server/Daemon.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lib/server') diff --git a/lib/server/Daemon.cpp b/lib/server/Daemon.cpp index 6817585b..34ac0440 100644 --- a/lib/server/Daemon.cpp +++ b/lib/server/Daemon.cpp @@ -110,7 +110,7 @@ int Daemon::Main(const char *DefaultConfigFile, int argc, const char *argv[]) int masterLevel = Log::INFO; // need an int to do math with #endif - char c; + signed char c; // reset getopt, just in case anybody used it before. // unfortunately glibc and BSD differ on this point! @@ -132,15 +132,6 @@ int Daemon::Main(const char *DefaultConfigFile, int argc, const char *argv[]) BOX_TRACE("getopt: optarg = " << optarg); BOX_TRACE("getopt: argv[optind] = " << argv[optind]); - // Workaround for weird behaviour noted by TBP in - // http://lists.warhead.org.uk/pipermail/boxbackup/2007-July/003614.html - if (c == '?' && optopt == 0) - { - // this apparently means "end of options" in some - // buggy libc? - break; - } - switch(c) { case 'c': -- cgit v1.2.3