[Box Backup-dev] win32 review

Ben Summers boxbackup-dev at fluffy.co.uk
Sun Feb 12 14:36:01 GMT 2006


svn diff http://bbdev.fluffy.co.uk/svn/box/trunk http:// 
bbdev.fluffy.co.uk/svn/box/chris/win32/vc2005-compile-fixes


Mainly reviewed for chances of breaking POSIX, but here goes:


lib/win32/WinNamedPipeStream.cpp
	mWriteClosed = TRUE;
	-- mWriteClosed is of type "bool", so setting it to TRUE rather than  
true is not strictly correct. Similarly for all the other changes.

lib/server/Daemon.cpp
	-- not keen on all the #ifdefs for logging on Win32. Not sure  
there's a neater way if you really want to do this, apart from  
defining another function to do it, and calling that instead. Soon to  
be done away with with the iostream for logging stuff, I think.


lib/common/FdGetLine.cpp
	-- eeek! But whatever, shouldn't catch anyone unawares, but still, eek!

bin/bbackupd/BackupClientContext.cpp
	-- if Protocol doesn't log it, it wasn't sent.

bin/bbackupquery/BackupQueries.cpp
+		char* buffer = ConvertConsoleToUtf8(args[0].c_str());
+               if(!buffer) return;
+               std::string storeDirEncoded(buffer);
+               delete [] buffer;
	-- ugly. Why doesn't ConvertConsoleToUtf8() return std::string?
	-- why have we moved from storing a line in a std::string to using  
printf() (and without the :: prefix?)
	-- reformatting of code makes it hard to read the diff. Hope I  
haven't missed anything.
	-- please #define const_iterator iterator on Win32 only, rather than  
removing this type check on all platforms

bin/bbackupquery/bbackupquery.cpp
	-- I would have done unicode by default, with a flag to switch it off

distribution/boxbackup/DISTRIBUTION-MANIFEST.txt
	-- add your new directories, and check you have everything in the  
archive created by
		infrastructure/makedistribution.pl boxbackup

Usual mumblings about style. eg "if(command == "quit" || command ==  
"")" CHANGED to "if (command == "quit" || command == "")", it's not  
even new code!

Thanks!


Ben





More information about the Boxbackup-dev mailing list