[Box Backup-dev] Reviewing code -- help!

Chris Wilson boxbackup-dev@fluffy.co.uk
Sun, 11 Dec 2005 01:33:19 +0000 (GMT)


Hi Ben,

>> >  config.guess, config.sub -- is this necessary?
>> 
>>  If we want to cross-compile (native win32 build using cygwin or mingw) 
>>  then unfortunately it appears that we do need these files. Perhaps Martin 
>>  can find a way to automatically copy them from the user's automake 
>>  installation.
>
> Not terribly bothered if it's necessary, although maybe the 
> infrastructure/makedistribution.pl script could do the copying when it's all 
> wrapped up for release?

Same problem - how do we find the builder's automake directory? And I like 
the idea of these files being known quantities and versioned, rather than 
subject to the vagaries of the builder's machine. But I can try if you 
still want me to. Or we can try to rewrite these scripts ourselves to 
avoid the license issue.

>> >  lib/win32/win32test.cpp
>> >   -- wrong place, create test/win32
>> 
>>  I'm not sure it fits in with your test framework, are you sure?
>
> Can it not be made to do so?

It probably can, but the test framework doesn't work at all on win32 at 
the moment - it still uses Unix functions - so it's a bit difficult to 
test the tests. I'm still working on that.

>> >  lib/win32/win32.bat
>
> I suppose infrastructure/win32/ might be the logical place for it, although 
> it's rather inconvenient. And the VS project files would be nicer there 
> too... but on a pragmatic note, sticking it all in the root is going to be 
> perfect for now.

Done in 07-win32-fixes.

>> >  	-- WinNamedPipeStream::GetPeerCredentials() doesn't need any of the 
>> >  UNIX code
>> 
>>  And it's commented out (I think). Will probably delete it soon.
>
> Since that file is only compiled on Win32, it's unnecessary cruft.

Done in 07-win32-fixes.

>> >  bin/bbackupd/ServiceBackupDaemon.*
>> >   -- rename to Win32ServiceBackupDaemon.* ? or move to bbackupd.cpp?
>> 
>>  How about Win32BackupService?
>
> Far better!

Done in 07-win32-fixes.

>> >  bin/bbackupd/bbwinservice.*
>> >   -- rename to Win32bbackupdService.*
>> 
>>  How about Win32ServiceFunctions?
>
> Lovely!

Done in 07-win32-fixes.

>>  By the way, it compiles and runs on Win32 using MinGW. I'm just 
>>  working out some stability issues at the moment. :-)
>
> Great news. I'm really glad we're progressing so well towards a unified 
> tree and then a release from which we can move forward cleanly.

It now runs well on win2k when compiled with MinGW. I've had real problems 
trying to get the free VS2003 compiler to find its own libraries. I've 
also had problems with MinGW under emulation (both vmware and qemu) where 
exceptions thrown in one thread cause weird behaviour in other threads, 
leading to deadlocks.

This is particularly problematic if one uses bbackupctl to start a sync 
while the main thread is blocked in a library call like connect(). I can 
easily and reliably reproduce this.

I created a test case that shows this weird behaviour in win2k under 
emulation. MinGW developers have told me that my test case works fine on 
their Windows boxes, and that they're not aware of such problems in 
general. My test case also runs fine on a WinXP box. I've yet to set up a 
real Win2k box to test on.

Unless, for some bizarre reason, the problem is really an issue with win2k 
and MinGW, I doubt that the mingw developers will fix it, and I don't know 
if qemu or vmware will help me either.

I've tried to compile with other compilers (Watcom, Borland C++) but so 
far not been able to. Watcom's STL is broken (no std::string!) and Borland 
never sent me the evaluation key for C++ Builder 6.

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |