[Box Backup-commit] COMMIT r1722 - box/chris/merge/lib/server

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Wed Jul 4 19:23:24 BST 2007


Author: chris
Date: 2007-07-04 19:23:24 +0100 (Wed, 04 Jul 2007)
New Revision: 1722

Modified:
   box/chris/merge/lib/server/Daemon.cpp
Log:
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)


Modified: box/chris/merge/lib/server/Daemon.cpp
===================================================================
--- box/chris/merge/lib/server/Daemon.cpp	2007-07-03 21:18:03 UTC (rev 1721)
+++ box/chris/merge/lib/server/Daemon.cpp	2007-07-04 18:23:24 UTC (rev 1722)
@@ -110,7 +110,7 @@
 	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 @@
 		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':




More information about the Boxbackup-commit mailing list